From d9adcfe6169c6c10059a670f2ed984908eb4e105 Mon Sep 17 00:00:00 2001 From: Christian Raue Date: Wed, 23 Jul 2014 20:27:56 +0200 Subject: removed lots of trailing whitespace --- tests/PHPUnit/Benchmarks/ArchiveQueryBenchmark.php | 6 +- .../Fixtures/ManyThousandSitesOneVisitEach.php | 10 +- .../OneSiteThousandsOfDistinctUrlsOverMonth.php | 12 +- tests/PHPUnit/Benchmarks/MultiSitesBenchmark.php | 4 +- tests/PHPUnit/Benchmarks/README.md | 4 +- tests/PHPUnit/Core/AssetManagerTest.php | 2 +- tests/PHPUnit/Core/CookieTest.php | 4 +- tests/PHPUnit/Core/DataTableTest.php | 6 +- tests/PHPUnit/Core/DateTest.php | 2 +- tests/PHPUnit/Core/HttpTest.php | 4 +- tests/PHPUnit/Core/IPTest.php | 12 +- tests/PHPUnit/Core/Period/RangeTest.php | 4 +- tests/PHPUnit/Core/RankingQueryTest.php | 10 +- tests/PHPUnit/Core/ScheduledTaskTest.php | 2 +- tests/PHPUnit/Core/ScheduledTime/WeeklyTest.php | 4 +- tests/PHPUnit/Core/TaskSchedulerTest.php | 10 +- tests/PHPUnit/Core/UrlTest.php | 2 +- tests/PHPUnit/FakeAccess.php | 4 +- tests/PHPUnit/Fixture.php | 2 +- tests/PHPUnit/Fixtures/ManySitesImportedLogs.php | 12 +- .../ManySitesImportedLogsWithXssAttempts.php | 4 +- .../ManyVisitsWithMockLocationProvider.php | 8 +- tests/PHPUnit/Fixtures/OmniFixture.php | 2 +- ...VisitsCustomVariablesCampaignsNotHeuristics.php | 6 +- .../SomeVisitsManyPageviewsWithTransitions.php | 12 +- .../PHPUnit/Fixtures/TwoVisitsNoKeywordWithBot.php | 2 +- tests/PHPUnit/Fixtures/UITestFixture.php | 14 +- .../PHPUnit/Integration/BlobReportLimitingTest.php | 22 +- .../Integration/Core/ArchiveProcessingTest.php | 6 +- tests/PHPUnit/Integration/Core/LogTest.php | 12 +- tests/PHPUnit/Integration/Core/SegmentTest.php | 2 +- .../Integration/Core/Tracker/ActionTest.php | 4 +- .../PHPUnit/Integration/Core/Tracker/VisitTest.php | 4 +- tests/PHPUnit/Integration/ImportLogsTest.php | 2 +- .../Integration/OneVisitorTwoVisitsTest.php | 2 +- .../Integration/Plugins/SitesManagerTest.php | 4 +- .../Integration/Plugins/UsersManagerTest.php | 2 +- tests/PHPUnit/Integration/PrivacyManagerTest.php | 2 +- tests/PHPUnit/Integration/RowEvolutionTest.php | 8 +- tests/PHPUnit/Integration/TransitionsTest.php | 4 +- tests/PHPUnit/IntegrationTestCase.php | 2 +- tests/PHPUnit/Plugins/UserCountryTest.php | 4 +- tests/PHPUnit/TestingEnvironment.php | 2 +- tests/PHPUnit/config.ini.travis.php | 4 +- tests/README.md | 10 +- tests/README.screenshots.md | 6 +- tests/README.troubleshooting.md | 2 +- tests/README.xhprof.md | 10 +- tests/angularjs/README.md | 4 +- tests/javascript/frameworks/dojo/dojo-1.0.3.js | 794 ++++++------- tests/javascript/frameworks/dojo/dojo-1.1.2.js | 920 +++++++-------- tests/javascript/frameworks/dojo/dojo-1.3.3.js | 1180 ++++++++++---------- tests/javascript/frameworks/dojo/dojo-1.4.3.js | 856 +++++++------- tests/javascript/frameworks/dojo/dojo-1.5.0.js | 802 ++++++------- tests/javascript/frameworks/dojo/dojo-1.6.0.js | 106 +- tests/javascript/frameworks/ext/ext-all-2.3.0.js | 2 +- tests/javascript/frameworks/ext/ext-all-3.3.1.js | 4 +- tests/javascript/frameworks/ext/ext-base-2.3.0.js | 2 +- tests/javascript/frameworks/ext/ext-core-3.0.0.js | 4 +- tests/javascript/frameworks/ext/ext-core-3.1.0.js | 2 +- tests/javascript/frameworks/jquery/jquery-1.0.4.js | 164 +-- tests/javascript/frameworks/jquery/jquery-1.1.4.js | 298 ++--- tests/javascript/frameworks/jquery/jquery-1.2.6.js | 8 +- tests/javascript/frameworks/jquery/jquery-1.3.2.js | 158 +-- tests/javascript/frameworks/jquery/jquery-1.4.4.js | 248 ++-- tests/javascript/frameworks/jquery/jquery-1.5.1.js | 78 +- .../frameworks/jquery/jquery.json-2.2.js | 64 +- .../frameworks/mootools/mootools-1.1.2.js | 2 +- .../frameworks/mootools/mootools-1.2.5.js | 78 +- .../frameworks/mootools/mootools-1.3.1.js | 58 +- tests/javascript/frameworks/yui/yui-3.3.0.js | 14 +- tests/javascript/jash/Jash.css | 10 +- tests/javascript/jash/Jash.js | 324 +++--- tests/lib/chai-1.9.0/History.md | 84 +- tests/lib/chai-1.9.0/ReleaseNotes.md | 118 +- tests/lib/jsdoc-toolkit/README.txt | 6 +- tests/lib/jsdoc-toolkit/app/frame/Chain.js | 2 +- tests/lib/jsdoc-toolkit/app/frame/Dumper.js | 34 +- tests/lib/jsdoc-toolkit/app/frame/Hash.js | 2 +- tests/lib/jsdoc-toolkit/app/frame/Link.js | 36 +- tests/lib/jsdoc-toolkit/app/frame/Namespace.js | 2 +- tests/lib/jsdoc-toolkit/app/frame/Opt.js | 30 +- tests/lib/jsdoc-toolkit/app/frame/String.js | 30 +- tests/lib/jsdoc-toolkit/app/frame/Testrun.js | 16 +- tests/lib/jsdoc-toolkit/app/handlers/FOODOC.js | 2 +- tests/lib/jsdoc-toolkit/app/handlers/XMLDOC.js | 6 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC.js | 16 +- .../lib/jsdoc-toolkit/app/lib/JSDOC/DocComment.js | 48 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC/DocTag.js | 90 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js | 30 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js | 12 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC/Lang.js | 10 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC/Parser.js | 36 +- .../jsdoc-toolkit/app/lib/JSDOC/PluginManager.js | 4 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC/Symbol.js | 144 +-- tests/lib/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js | 40 +- .../lib/jsdoc-toolkit/app/lib/JSDOC/TextStream.js | 4 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC/Token.js | 2 +- .../lib/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js | 56 +- .../lib/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js | 16 +- tests/lib/jsdoc-toolkit/app/lib/JSDOC/Walker.js | 174 +-- tests/lib/jsdoc-toolkit/app/main.js | 30 +- .../app/plugins/frameworkPrototype.js | 2 +- .../jsdoc-toolkit/app/plugins/publishSrcHilite.js | 16 +- .../jsdoc-toolkit/app/plugins/tagParamConfig.js | 2 +- tests/lib/jsdoc-toolkit/app/plugins/tagSynonyms.js | 2 +- tests/lib/jsdoc-toolkit/app/run.js | 46 +- tests/lib/jsdoc-toolkit/app/t/TestDoc.js | 22 +- tests/lib/jsdoc-toolkit/app/test.js | 58 +- tests/lib/jsdoc-toolkit/app/test/anon_inner.js | 2 +- tests/lib/jsdoc-toolkit/app/test/augments.js | 4 +- tests/lib/jsdoc-toolkit/app/test/borrows.js | 6 +- tests/lib/jsdoc-toolkit/app/test/borrows2.js | 4 +- tests/lib/jsdoc-toolkit/app/test/event.js | 2 +- tests/lib/jsdoc-toolkit/app/test/exports.js | 4 +- tests/lib/jsdoc-toolkit/app/test/functions_anon.js | 2 +- .../lib/jsdoc-toolkit/app/test/functions_nested.js | 6 +- tests/lib/jsdoc-toolkit/app/test/globals.js | 4 +- tests/lib/jsdoc-toolkit/app/test/jsdoc_test.js | 88 +- tests/lib/jsdoc-toolkit/app/test/memberof.js | 2 +- tests/lib/jsdoc-toolkit/app/test/memberof2.js | 6 +- .../lib/jsdoc-toolkit/app/test/namespace_nested.js | 4 +- tests/lib/jsdoc-toolkit/app/test/nocode.js | 2 +- tests/lib/jsdoc-toolkit/app/test/oblit_anon.js | 2 +- tests/lib/jsdoc-toolkit/app/test/overview.js | 10 +- tests/lib/jsdoc-toolkit/app/test/param_inline.js | 10 +- tests/lib/jsdoc-toolkit/app/test/prototype.js | 2 +- .../app/test/prototype_oblit_constructor.js | 2 +- tests/lib/jsdoc-toolkit/app/test/shared.js | 4 +- tests/lib/jsdoc-toolkit/app/test/shortcuts.js | 8 +- tests/lib/jsdoc-toolkit/app/test/synonyms.js | 4 +- .../jsdoc-toolkit/app/test/variable_redefine.js | 4 +- tests/lib/jsdoc-toolkit/changes.txt | 9 +- tests/lib/jsdoc-toolkit/conf/sample.conf | 12 +- tests/lib/jsdoc-toolkit/java/build.xml | 4 +- tests/lib/jsdoc-toolkit/java/build_1.4.xml | 4 +- tests/lib/jsdoc-toolkit/java/src/JsDebugRun.java | 8 +- tests/lib/jsdoc-toolkit/java/src/JsRun.java | 8 +- .../jsdoc-toolkit/templates/jsdoc/allfiles.tmpl | 12 +- tests/lib/jsdoc-toolkit/templates/jsdoc/class.tmpl | 74 +- tests/lib/jsdoc-toolkit/templates/jsdoc/index.tmpl | 14 +- tests/lib/jsdoc-toolkit/templates/jsdoc/publish.js | 56 +- .../templates/jsdoc/static/default.css | 2 +- .../lib/jsdoc-toolkit/templates/jsdoc/symbol.tmpl | 4 +- tests/lib/mocha-1.17.1/lib/browser/progress.js | 12 +- tests/lib/mocha-1.17.1/mocha.js | 12 +- tests/lib/mocha-1.17.1/test/hook.err.js | 4 +- .../extractSearchEngineInformationFromUrlTests.yml | 2 +- tests/resources/lipsum.txt | 2 +- tests/resources/overlay-test-site/index.html | 2 +- tests/resources/overlay-test-site/page-1.html | 2 +- tests/resources/overlay-test-site/page-2.html | 2 +- tests/resources/overlay-test-site/page-3.html | 2 +- tests/resources/overlay-test-site/page-4.html | 2 +- tests/resources/overlay-test-site/page-5.html | 2 +- tests/resources/overlay-test-site/page-6.html | 2 +- 156 files changed, 4060 insertions(+), 4061 deletions(-) (limited to 'tests') diff --git a/tests/PHPUnit/Benchmarks/ArchiveQueryBenchmark.php b/tests/PHPUnit/Benchmarks/ArchiveQueryBenchmark.php index 63307ec667..05e14b02fd 100644 --- a/tests/PHPUnit/Benchmarks/ArchiveQueryBenchmark.php +++ b/tests/PHPUnit/Benchmarks/ArchiveQueryBenchmark.php @@ -19,7 +19,7 @@ require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/BenchmarkTestCase.php'; class ArchiveQueryBenchmark extends BenchmarkTestCase { private $archivingLaunched = false; - + public function setUp() { $archivingTables = ArchiveTableCreator::getTablesArchivesInstalled(); @@ -40,10 +40,10 @@ class ArchiveQueryBenchmark extends BenchmarkTestCase } Rules::$archivingDisabledByTests = true; - + $period = Period\Factory::build(self::$fixture->period, Date::factory(self::$fixture->date)); $dateRange = $period->getDateStart().','.$period->getDateEnd(); - + API::getInstance()->get(self::$fixture->idSite, 'day', $dateRange); } } diff --git a/tests/PHPUnit/Benchmarks/Fixtures/ManyThousandSitesOneVisitEach.php b/tests/PHPUnit/Benchmarks/Fixtures/ManyThousandSitesOneVisitEach.php index 6a89c57a90..f399b9ffa7 100644 --- a/tests/PHPUnit/Benchmarks/Fixtures/ManyThousandSitesOneVisitEach.php +++ b/tests/PHPUnit/Benchmarks/Fixtures/ManyThousandSitesOneVisitEach.php @@ -17,16 +17,16 @@ class Piwik_Test_Fixture_ManyThousandSitesOneVisitEach public $period = 'day'; public $siteCount = 20000; public $idSite = 'all'; - + public function setUp() { for ($i = 0; $i != $this->siteCount; ++$i) { $idSite = Fixture::createWebsite( $this->date, $ecommerce = 1, $siteName = "Site #$i", $siteUrl = "http://site$i.com/"); - + API::getInstance()->addGoal($idSite, 'all', 'url', 'http', 'contains', false, 5); } - + // track one visit for each site $t = BenchmarkTestCase::getLocalTracker(1); $t->setForceVisitDateTime(Date::factory($this->date)->addHour(6)); @@ -34,9 +34,9 @@ class Piwik_Test_Fixture_ManyThousandSitesOneVisitEach $ip = "157.5.6.4"; $t->setIp($ip); $t->setNewVisitorId(); - + $t->setIdSite($idSite); - + $t->setUrl("http://site" . ($idSite - 1) . ".com/page.html"); $t->doTrackPageView('page title'); } diff --git a/tests/PHPUnit/Benchmarks/Fixtures/OneSiteThousandsOfDistinctUrlsOverMonth.php b/tests/PHPUnit/Benchmarks/Fixtures/OneSiteThousandsOfDistinctUrlsOverMonth.php index c719d7bfa3..cab9278adb 100644 --- a/tests/PHPUnit/Benchmarks/Fixtures/OneSiteThousandsOfDistinctUrlsOverMonth.php +++ b/tests/PHPUnit/Benchmarks/Fixtures/OneSiteThousandsOfDistinctUrlsOverMonth.php @@ -29,16 +29,16 @@ class Piwik_Test_Fixture_OneSiteThousandsOfDistinctUrlsOverMonth $goals = API::getInstance(); $goals->addGoal($this->idSite, 'all', 'url', 'http', 'contains', false, 5); $goals->addGoal($this->idSite, 'all', 'url', 'thing2', 'contains'); - + $start = Date::factory($this->date); - + $dates = array(); for ($day = 0; $day != 31; ++$day) { $dates[] = $start->addDay($day); } - + $t = BenchmarkTestCase::getLocalTracker($this->idSite); - + $actionNum = 0; foreach ($dates as $date) { for ($visitNum = 0; $visitNum != 1000; ++$visitNum) { @@ -50,10 +50,10 @@ class Piwik_Test_Fixture_OneSiteThousandsOfDistinctUrlsOverMonth $referrerUrl = "http://"; } $title = "A page title / $actionNum / 0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 /9"; - + $t->setNewVisitorId(); $t->setForceVisitDateTime($date); - + $t->setUrl($url); $t->setUrlReferrer($referrerUrl); Fixture::checkResponse($t->doTrackPageView($title)); diff --git a/tests/PHPUnit/Benchmarks/MultiSitesBenchmark.php b/tests/PHPUnit/Benchmarks/MultiSitesBenchmark.php index 54dc180f53..249b006251 100644 --- a/tests/PHPUnit/Benchmarks/MultiSitesBenchmark.php +++ b/tests/PHPUnit/Benchmarks/MultiSitesBenchmark.php @@ -18,7 +18,7 @@ require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/BenchmarkTestCase.php'; class MultiSitesBenchmark extends BenchmarkTestCase { private $archivingLaunched = false; - + public function setUp() { $archivingTables = ArchiveTableCreator::getTablesArchivesInstalled(); @@ -37,7 +37,7 @@ class MultiSitesBenchmark extends BenchmarkTestCase if ($this->archivingLaunched) { echo "NOTE: Had to archive data, memory results will not be accurate. Run again for better results."; } - + Rules::$archivingDisabledByTests = true; APIMultiSites::getInstance()->getAll(self::$fixture->period, self::$fixture->date); } diff --git a/tests/PHPUnit/Benchmarks/README.md b/tests/PHPUnit/Benchmarks/README.md index ce750f6918..d82892cfaa 100644 --- a/tests/PHPUnit/Benchmarks/README.md +++ b/tests/PHPUnit/Benchmarks/README.md @@ -2,7 +2,7 @@ Piwik comes with a system that can be used to benchmark certain Piwik processes. The benchmarking system relies both on PHPUnit. -## Benchmarks & Fixtures +## Benchmarks & Fixtures Piwik's benchmarks are written as unit tests. Except, they don't setup the database by themselves. Instead, there are several 'fixture' classes that do the setup. You can mix and match different @@ -41,7 +41,7 @@ These are the fixtures currently included with Piwik: website with ~230,000 visits on one day. There are around ~2.3 pageviews per visit and each visit resulted in at least one conversion. -## Benchmarking with git +## Benchmarking with git If you use git, you can use the benchmarking system to easily see if there are performance regressions caused by your changes. diff --git a/tests/PHPUnit/Core/AssetManagerTest.php b/tests/PHPUnit/Core/AssetManagerTest.php index e26443f8b3..ca77a609f7 100644 --- a/tests/PHPUnit/Core/AssetManagerTest.php +++ b/tests/PHPUnit/Core/AssetManagerTest.php @@ -538,7 +538,7 @@ class AssetManagerTest extends PHPUnit_Framework_TestCase public function test_getMergedStylesheet_Generated_MergedAssetsEnabled_Stale() { $this->activateMergedAssets(); - + $this->setStylesheetCacheBuster(self::FIRST_CACHE_BUSTER_SS); $this->triggerGetMergedStylesheet(); diff --git a/tests/PHPUnit/Core/CookieTest.php b/tests/PHPUnit/Core/CookieTest.php index d173e60f4c..9b77aeddaf 100644 --- a/tests/PHPUnit/Core/CookieTest.php +++ b/tests/PHPUnit/Core/CookieTest.php @@ -36,7 +36,7 @@ class CookieTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getJsonSerializeData */ public function testJsonSerialize($testData, $id) @@ -78,7 +78,7 @@ class CookieTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getSafeSerializeData */ public function testSafeSerialize($id, $testData) diff --git a/tests/PHPUnit/Core/DataTableTest.php b/tests/PHPUnit/Core/DataTableTest.php index 97d53e860e..656df66a90 100644 --- a/tests/PHPUnit/Core/DataTableTest.php +++ b/tests/PHPUnit/Core/DataTableTest.php @@ -312,7 +312,7 @@ class DataTableTest extends PHPUnit_Framework_TestCase * Test that adding two string column values results in an exception. * * @group Core - * + * * @expectedException Exception */ public function testSumRow_stringException() @@ -336,7 +336,7 @@ class DataTableTest extends PHPUnit_Framework_TestCase * After 100 recursion must throw an exception * * @group Core - * + * * @expectedException Exception */ public function testSerializeWithInfiniteRecursion() @@ -434,7 +434,7 @@ class DataTableTest extends PHPUnit_Framework_TestCase /* * create some fake tables to make sure that the serialized array of the first TABLE * does not take in consideration those tables - * -> we check that the DataTable_Manager is not impacting DataTable + * -> we check that the DataTable_Manager is not impacting DataTable */ $useless1->addRowFromArray(array(Row::COLUMNS => array(8487,),)); $useless3 = new DataTable; diff --git a/tests/PHPUnit/Core/DateTest.php b/tests/PHPUnit/Core/DateTest.php index f208e90c28..fbff27519e 100644 --- a/tests/PHPUnit/Core/DateTest.php +++ b/tests/PHPUnit/Core/DateTest.php @@ -55,7 +55,7 @@ class DateTest extends PHPUnit_Framework_TestCase */ public function testFactoryTimezone() { - // now in UTC converted to UTC+10 means adding 10 hours + // now in UTC converted to UTC+10 means adding 10 hours $date = Date::factory('now', 'UTC+10'); $dateExpected = Date::now()->addHour(10); $this->assertEquals($dateExpected->getDatetime(), $date->getDatetime()); diff --git a/tests/PHPUnit/Core/HttpTest.php b/tests/PHPUnit/Core/HttpTest.php index 5589a5c358..ae5ecb96ec 100644 --- a/tests/PHPUnit/Core/HttpTest.php +++ b/tests/PHPUnit/Core/HttpTest.php @@ -26,7 +26,7 @@ class HttpTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getMethodsToTest */ public function testFetchRemoteFile($method) @@ -88,7 +88,7 @@ class HttpTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getMethodsToTest */ public function testHEADOperation($method) diff --git a/tests/PHPUnit/Core/IPTest.php b/tests/PHPUnit/Core/IPTest.php index c80af0c201..cbf0c59816 100644 --- a/tests/PHPUnit/Core/IPTest.php +++ b/tests/PHPUnit/Core/IPTest.php @@ -165,7 +165,7 @@ class IPTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getP2NInvalidInputData */ public function testP2NInvalidInput($P) @@ -535,7 +535,7 @@ class IPTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getIpsInRangeData */ public function testIsIpInRange($range, $test) @@ -603,7 +603,7 @@ class IPTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getIpTestData */ public function testGetNonProxyIpFromHeader($ip) @@ -613,7 +613,7 @@ class IPTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getIpTestData */ public function testGetNonProxyIpFromHeader2($ip) @@ -626,7 +626,7 @@ class IPTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getIpTestData */ public function testGetNonProxyIpFromHeader3($ip) @@ -662,7 +662,7 @@ class IPTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getLastIpFromListTestData */ public function testGetLastIpFromList($csv, $expected) diff --git a/tests/PHPUnit/Core/Period/RangeTest.php b/tests/PHPUnit/Core/Period/RangeTest.php index 2a70eb00d5..6d87dffb10 100644 --- a/tests/PHPUnit/Core/Period/RangeTest.php +++ b/tests/PHPUnit/Core/Period/RangeTest.php @@ -1305,8 +1305,8 @@ class Period_RangeTest extends PHPUnit_Framework_TestCase /** * @group Core - * - * + * + * * @dataProvider getDataForLastNLimitsTest */ public function testLastNLimits($period, $lastN, $expectedLastN) diff --git a/tests/PHPUnit/Core/RankingQueryTest.php b/tests/PHPUnit/Core/RankingQueryTest.php index 17d3cdd2c6..7941c25d35 100644 --- a/tests/PHPUnit/Core/RankingQueryTest.php +++ b/tests/PHPUnit/Core/RankingQueryTest.php @@ -32,10 +32,10 @@ class RankingQueryTest extends PHPUnit_Framework_TestCase END AS `label`, `column`, sum(`columnSum`) AS `columnSum` - FROM ( + FROM ( SELECT `label`, - CASE + CASE WHEN @counter = 11 THEN 11 ELSE @counter:=@counter+1 END AS counter, @@ -69,7 +69,7 @@ class RankingQueryTest extends PHPUnit_Framework_TestCase ELSE `label` END AS `label`, `exclude_marker` - FROM ( + FROM ( SELECT `label`, CASE @@ -106,7 +106,7 @@ class RankingQueryTest extends PHPUnit_Framework_TestCase ELSE `label` END AS `label`, `partition` - FROM ( + FROM ( SELECT `label`, CASE @@ -122,7 +122,7 @@ class RankingQueryTest extends PHPUnit_Framework_TestCase FROM ( SELECT @counter1:=0 ) initCounter1, ( SELECT @counter2:=0 ) initCounter2, - ( SELECT @counter3:=0 ) initCounter3, + ( SELECT @counter3:=0 ) initCounter3, ( SELECT label, partition FROM myTable ) actualQuery ) AS withCounter GROUP BY counter, `partition` diff --git a/tests/PHPUnit/Core/ScheduledTaskTest.php b/tests/PHPUnit/Core/ScheduledTaskTest.php index 6cdbebbc35..5a131521ff 100644 --- a/tests/PHPUnit/Core/ScheduledTaskTest.php +++ b/tests/PHPUnit/Core/ScheduledTaskTest.php @@ -36,7 +36,7 @@ class ScheduledTaskTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getTaskNameTestCases */ public function testGetTaskName($expectedTaskName, $className, $methodName, $methodParameter) diff --git a/tests/PHPUnit/Core/ScheduledTime/WeeklyTest.php b/tests/PHPUnit/Core/ScheduledTime/WeeklyTest.php index b1956f570b..2f6df0230a 100644 --- a/tests/PHPUnit/Core/ScheduledTime/WeeklyTest.php +++ b/tests/PHPUnit/Core/ScheduledTime/WeeklyTest.php @@ -158,12 +158,12 @@ class ScheduledTime_WeeklyTest extends PHPUnit_Framework_TestCase /** * Tests getRescheduledTime on Weekly with unspecified hour and specified day - * + * * Context : * - getRescheduledTime called Monday January 4 1971 09:00:00 UTC * - setHour is not called, defaulting to midnight * - setDay is set to $dayToSet - * + * * @dataProvider getSetDayParametersToTest */ public function testGetRescheduledTimeWeeklyUnspecifiedHourSpecifiedDay($dayToSet, $expectedRescheduledTime) diff --git a/tests/PHPUnit/Core/TaskSchedulerTest.php b/tests/PHPUnit/Core/TaskSchedulerTest.php index f11b7e2745..3ec8781df7 100644 --- a/tests/PHPUnit/Core/TaskSchedulerTest.php +++ b/tests/PHPUnit/Core/TaskSchedulerTest.php @@ -73,7 +73,7 @@ class TaskSchedulerTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider taskHasBeenScheduledOnceTestCases */ public function testTaskHasBeenScheduledOnce($expectedDecision, $taskName, $timetable) @@ -132,7 +132,7 @@ class TaskSchedulerTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider taskShouldBeExecutedTestCases */ public function testTaskShouldBeExecuted($expectedDecision, $taskName, $timetable) @@ -157,7 +157,7 @@ class TaskSchedulerTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider executeTaskTestCases */ public function testExecuteTask($methodName, $parameterValue) @@ -270,7 +270,7 @@ class TaskSchedulerTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider testRunTasksTestCases */ public function testRunTasks($expectedTimetable, $expectedExecutedTasks, $timetableBeforeTaskExecution, $configuredTasks) @@ -280,7 +280,7 @@ class TaskSchedulerTest extends PHPUnit_Framework_TestCase $plugins = array_map(function ($p) { return $p->getPluginName(); }, $plugins); \Piwik\Plugin\Manager::getInstance()->unloadPlugins(); - + // make sure the get tasks event returns our configured tasks \Piwik\Piwik::addAction(TaskScheduler::GET_TASKS_EVENT, function(&$tasks) use($configuredTasks) { $tasks = $configuredTasks; diff --git a/tests/PHPUnit/Core/UrlTest.php b/tests/PHPUnit/Core/UrlTest.php index 3bf4a3e41d..f30508186c 100644 --- a/tests/PHPUnit/Core/UrlTest.php +++ b/tests/PHPUnit/Core/UrlTest.php @@ -258,7 +258,7 @@ class UrlTest extends PHPUnit_Framework_TestCase /** * @group Core - * + * * @dataProvider getQueryParameters */ public function testGetQueryStringFromParameters($params, $queryString) diff --git a/tests/PHPUnit/FakeAccess.php b/tests/PHPUnit/FakeAccess.php index d576da702f..be97babff0 100644 --- a/tests/PHPUnit/FakeAccess.php +++ b/tests/PHPUnit/FakeAccess.php @@ -87,7 +87,7 @@ class FakeAccess if (self::$superUser) { return; } - + $websitesAccess = array_merge(self::$idSitesView, self::$idSitesAdmin); if (!is_array($idSites)) { @@ -160,7 +160,7 @@ class FakeAccess } return array_merge(self::$idSitesView, self::$idSitesAdmin); } - + public function getRawSitesWithSomeViewAccess($login) { $result = array(); diff --git a/tests/PHPUnit/Fixture.php b/tests/PHPUnit/Fixture.php index 255153e367..d9c213f01a 100644 --- a/tests/PHPUnit/Fixture.php +++ b/tests/PHPUnit/Fixture.php @@ -809,7 +809,7 @@ class Fixture extends PHPUnit_Framework_Assert { Cache::deleteTrackerCache(); Option::clearCache(); - + if ($force) { // remove version options to force update Option::deleteLike('version%'); diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php index 33e13f7999..2ddc236f0c 100644 --- a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php +++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php @@ -25,7 +25,7 @@ class ManySitesImportedLogs extends Fixture public $idSite2 = 2; public $idGoal = 1; public $segments = null; // should be array mapping segment name => segment definition - + public $addSegments = false; public static function createAccessInstance() @@ -112,28 +112,28 @@ class ManySitesImportedLogs extends Fixture $this->replayLogFile(); $this->logCustomFormat(); } - + private function setupSegments() { if (!$this->addSegments) { return; } - + if ($this->segments === null) { $this->segments = $this->getDefaultSegments(); } - + foreach ($this->segments as $segmentName => $info) { $idSite = false; if (isset($info['idSite'])) { $idSite = $info['idSite']; } - + $autoArchive = true; if (isset($info['autoArchive'])) { $autoArchive = $info['autoArchive']; } - + $enabledAllUsers = true; if (isset($info['enabledAllUsers'])) { $enabledAllUsers = $info['enabledAllUsers']; diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php index 4ed24f8573..70f2d07ca5 100644 --- a/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php +++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogsWithXssAttempts.php @@ -27,7 +27,7 @@ class ManySitesImportedLogsWithXssAttempts extends ManySitesImportedLogs { $this->now = Date::factory('now'); } - + public function setUp() { parent::setUp(); @@ -56,7 +56,7 @@ class ManySitesImportedLogsWithXssAttempts extends ManySitesImportedLogs $siteUrl = 'http://example-site-two.com'); } } - + public function addAnnotations() { APIAnnotations::getInstance()->add($this->idSite, '2012-08-09', "Note 1", $starred = 1); diff --git a/tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php b/tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php index b53d88d25f..aee0adbba9 100644 --- a/tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php +++ b/tests/PHPUnit/Fixtures/ManyVisitsWithMockLocationProvider.php @@ -120,7 +120,7 @@ class ManyVisitsWithMockLocationProvider extends Fixture // track outlinks $this->trackActions($t, $visitorCounter, 'outlink', $userAgents, $resolutions); - + // track ecommerce product orders $this->trackOrders($t); } @@ -175,15 +175,15 @@ class ManyVisitsWithMockLocationProvider extends Fixture } } } - + private function trackOrders($t) { $nextDay = Date::factory($this->nextDay); $t->setForceVisitDateTime($nextDay); - + for ($i = 0; $i != 25; ++$i) { $cat = $i % 5; - + $t->setNewVisitorId(); $t->setIp("155.5.4.$i"); $t->setEcommerceView("id_book$i", "Book$i", "Books Cat #$cat", 7.50); diff --git a/tests/PHPUnit/Fixtures/OmniFixture.php b/tests/PHPUnit/Fixtures/OmniFixture.php index 406deb77bc..197939904d 100644 --- a/tests/PHPUnit/Fixtures/OmniFixture.php +++ b/tests/PHPUnit/Fixtures/OmniFixture.php @@ -60,7 +60,7 @@ class OmniFixture extends Fixture $fixture = new $className(); if (!property_exists($fixture, 'dateTime')) { continue; - } + } $fixture->dateTime = $this->adjustDateTime($fixture->dateTime, $date); diff --git a/tests/PHPUnit/Fixtures/SomeVisitsCustomVariablesCampaignsNotHeuristics.php b/tests/PHPUnit/Fixtures/SomeVisitsCustomVariablesCampaignsNotHeuristics.php index 53db8ca2f5..3d43cb159b 100644 --- a/tests/PHPUnit/Fixtures/SomeVisitsCustomVariablesCampaignsNotHeuristics.php +++ b/tests/PHPUnit/Fixtures/SomeVisitsCustomVariablesCampaignsNotHeuristics.php @@ -69,10 +69,10 @@ class SomeVisitsCustomVariablesCampaignsNotHeuristics extends Fixture $visitorId2 = $t2->getVisitorId(); self::assertTrue($visitorId != $visitorId2); - // Then force the visitor ID + // Then force the visitor ID $t2->setVisitorId($visitorId); - // And Record a Goal: The previous visit should be updated rather than a new visit Created + // And Record a Goal: The previous visit should be updated rather than a new visit Created $t2->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.3)->getDatetime()); self::checkResponse($t2->doTrackGoal($idGoal, $revenue = 42.256)); @@ -80,7 +80,7 @@ class SomeVisitsCustomVariablesCampaignsNotHeuristics extends Fixture $t3 = self::getTracker($idSite, $dateTime); $t3->setUrlReferrer('http://example.org/referrer'); $t3->setForceVisitDateTime(Date::factory($dateTime)->addHour(1.3)->getDatetime()); - // fake a website ref cookie, the campaign should be credited for conversion, not referrer.example.com nor example.org + // fake a website ref cookie, the campaign should be credited for conversion, not referrer.example.com nor example.org $t3->DEBUG_APPEND_URL = '&_ref=http%3A%2F%2Freferrer.example.com%2Fpage%2Fsub%3Fquery%3Dtest%26test2%3Dtest3'; $t3->setUrl('http://example.org/index.htm#pk_campaign=CREDITED TO GOAL PLEASE'); self::checkResponse($t3->doTrackGoal($idGoal, 42)); diff --git a/tests/PHPUnit/Fixtures/SomeVisitsManyPageviewsWithTransitions.php b/tests/PHPUnit/Fixtures/SomeVisitsManyPageviewsWithTransitions.php index 1791b43750..52845bc0b8 100644 --- a/tests/PHPUnit/Fixtures/SomeVisitsManyPageviewsWithTransitions.php +++ b/tests/PHPUnit/Fixtures/SomeVisitsManyPageviewsWithTransitions.php @@ -44,7 +44,7 @@ class SomeVisitsManyPageviewsWithTransitions extends Fixture { $tracker = self::getTracker($this->idSite, $this->dateTime, $defaultInit = true); $tracker->enableBulkTracking(); - + $tracker->setIp('156.5.3.1'); $tracker->setUrlReferrer('http://www.google.com.vn/url?sa=t&rct=j&q=%3C%3E%26%5C%22the%20pdo%20extension%20is%20required%20for%20this%20adapter%20but%20the%20extension%20is%20not%20loaded&source=web&cd=4&ved=0FjAD&url=http%3A%2F%2Fforum.piwik.org%2Fread.php%3F2%2C1011&ei=y-HHAQ&usg=AFQjCN2-nt5_GgDeg&cad=rja'); $this->trackPageView($tracker, 0, 'page/one.html'); @@ -88,7 +88,7 @@ class SomeVisitsManyPageviewsWithTransitions extends Fixture $tracker->setNewVisitorId(); $tracker->setUrlReferrer(''); $this->trackPageView($tracker, 0, 'page/one.html'); - + // perform site search before & after page/one.html, then outlink after page/one.html, then download // before & after $tracker->setIp('156.5.3.6'); @@ -105,7 +105,7 @@ class SomeVisitsManyPageviewsWithTransitions extends Fixture $this->trackPageView($tracker, 0.5, '', $this->dateTime, $pageViewType = 'download'); $this->trackPageView($tracker, 0.55, 'page/one.html'); $this->trackPageView($tracker, 0.6, 'to/outlink/page2.html', $this->dateTime, $pageViewType = 'outlink'); - + // perform new searches/outlinks before & after in later date to test 'month' period $laterDate = Date::factory($this->dateTime)->addDay(8)->getDatetime(); $tracker->setIp('156.5.3.7'); @@ -120,7 +120,7 @@ class SomeVisitsManyPageviewsWithTransitions extends Fixture $this->trackPageView($tracker, 0.35, 'page/search.html#q=anotherkwd', $laterDate, $pageViewType = 'site-search', $searchKeyword = 'anotherkwd', $searchCategory = 'mysearchcat'); - + self::checkBulkTrackingResponse($tracker->doBulkTrack()); } @@ -130,7 +130,7 @@ class SomeVisitsManyPageviewsWithTransitions extends Fixture if ($dateTime === null) { $dateTime = $this->dateTime; } - + // rotate protocol and www to make sure it doesn't matter $prefixes = array('http://', 'http://www.', 'https://', 'https://'); $prefix = $prefixes[$this->prefixCounter % 4]; @@ -139,7 +139,7 @@ class SomeVisitsManyPageviewsWithTransitions extends Fixture /** @var $visit PiwikTracker */ $visit->setUrl($prefix . 'example.org/' . $path); $visit->setForceVisitDateTime(Date::factory($dateTime)->addHour($timeOffset)->getDatetime()); - + if ($pageViewType == 'normal') { self::assertTrue($visit->doTrackPageView('page title - ' . $path)); } else if ($pageViewType == 'outlink') { diff --git a/tests/PHPUnit/Fixtures/TwoVisitsNoKeywordWithBot.php b/tests/PHPUnit/Fixtures/TwoVisitsNoKeywordWithBot.php index eb48a6bd61..fcbb864bfb 100644 --- a/tests/PHPUnit/Fixtures/TwoVisitsNoKeywordWithBot.php +++ b/tests/PHPUnit/Fixtures/TwoVisitsNoKeywordWithBot.php @@ -62,7 +62,7 @@ class TwoVisitsNoKeywordWithBot extends Fixture $t->setForceVisitDateTime(Date::factory($dateTime)->addHour(0.3)->getDatetime()); self::checkResponse($t->doTrackGoal($idGoal, $revenue = 42)); - // VISIT 2 = Referrer has keyword, but the URL should be rewritten + // VISIT 2 = Referrer has keyword, but the URL should be rewritten // in Live Output to point to google search result page $t->setForceVisitDateTime(Date::factory($dateTime)->addHour(2)->getDatetime()); $t->setUrlReferrer('http://www.google.com.vn/url?sa=t&rct=j&q=%3C%3E%26%5C%22the%20pdo%20extension%20is%20required%20for%20this%20adapter%20but%20the%20extension%20is%20not%20loaded&source=web&cd=4&ved=0FjAD&url=http%3A%2F%2Fforum.piwik.org%2Fread.php%3F2%2C1011&ei=y-HHAQ&usg=AFQjCN2-nt5_GgDeg&cad=rja'); diff --git a/tests/PHPUnit/Fixtures/UITestFixture.php b/tests/PHPUnit/Fixtures/UITestFixture.php index 453a0c7d10..a65b0bc1f0 100644 --- a/tests/PHPUnit/Fixtures/UITestFixture.php +++ b/tests/PHPUnit/Fixtures/UITestFixture.php @@ -176,7 +176,7 @@ class UITestFixture extends SqlDump { $dashboardColumnCount = 3; $dashboardCount = 4; - + $layout = array(); for ($j = 0; $j != $dashboardColumnCount; ++$j) { $layout[] = array(); @@ -186,10 +186,10 @@ class UITestFixture extends SqlDump for ($i = 0; $i != $dashboardCount; ++$i) { $dashboards[] = $layout; } - + $oldGet = $_GET; $_GET['idSite'] = 1; - + // collect widgets & sort them so widget order is not important $allWidgets = array(); foreach (WidgetsList::get() as $category => $widgets) { @@ -218,7 +218,7 @@ class UITestFixture extends SqlDump 'uniqueId' => $widget['uniqueId'], 'parameters' => $widget['parameters'] ); - + // dashboard images must have height of less than 4000px to avoid odd discoloration of last line of image $widgetEntry['parameters']['filter_limit'] = 5; @@ -233,13 +233,13 @@ class UITestFixture extends SqlDump throw new Exception("Unexpected error: Incorrect dashboard widget placement logic. Something's wrong w/ the code."); } } - + // distribute widgets in each dashboard $column = 0; foreach ($groupedWidgets as $dashboardIndex => $dashboardWidgets) { foreach ($dashboardWidgets as $widget) { $column = ($column + 1) % $dashboardColumnCount; - + $dashboards[$dashboardIndex][$column][] = $widget; } } @@ -279,7 +279,7 @@ class UITestFixture extends SqlDump $_GET = $oldGet; } - + public function createSegments() { Db::exec("TRUNCATE TABLE " . Common::prefixTable('segment')); diff --git a/tests/PHPUnit/Integration/BlobReportLimitingTest.php b/tests/PHPUnit/Integration/BlobReportLimitingTest.php index 8010501886..b0aa0731a2 100755 --- a/tests/PHPUnit/Integration/BlobReportLimitingTest.php +++ b/tests/PHPUnit/Integration/BlobReportLimitingTest.php @@ -43,40 +43,40 @@ class BlobReportLimitingTest extends IntegrationTestCase 'UserSettings.getBrowserVersion', 'UserCountry.getRegion', 'UserCountry.getCity', ); - + $ecommerceApi = array('Goals.getItemsSku', 'Goals.getItemsName', 'Goals.getItemsCategory'); return array( array($apiToCall, array('idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime, 'periods' => array('day'))), - + array($ecommerceApi, array('idSite' => self::$fixture->idSite, 'date' => self::$fixture->nextDay, 'periods' => 'day')), ); } - + public function getRankingQueryDisabledApiForTesting() { $idSite = self::$fixture->idSite; $dateTime = self::$fixture->dateTime; - + return array( array('Actions.getPageUrls', array('idSite' => $idSite, 'date' => $dateTime, 'periods' => array('day'))), - + array('Provider.getProvider', array('idSite' => $idSite, 'date' => $dateTime, 'periods' => array('month'))), - + array('Provider.getProvider', array('idSite' => $idSite, 'date' => $dateTime, 'periods' => array('month'), 'segment' => 'provider==comcast.net', 'testSuffix' => '_segment_provider')), - + // test getDownloads w/ period=range & flat=1 array('Actions.getDownloads', array('idSite' => $idSite, 'date' => '2010-01-02,2010-01-05', @@ -106,7 +106,7 @@ class BlobReportLimitingTest extends IntegrationTestCase foreach ($this->getApiForTesting() as $pair) { list($apiToCall, $params) = $pair; - + if (empty($params['testSuffix'])) { $params['testSuffix'] = ''; } @@ -115,7 +115,7 @@ class BlobReportLimitingTest extends IntegrationTestCase $this->runApiTests($apiToCall, $params); } } - + public function testApiWithRankingQueryDisabled() { self::deleteArchiveTables(); @@ -128,10 +128,10 @@ class BlobReportLimitingTest extends IntegrationTestCase $generalConfig['datatable_archiving_maximum_rows_custom_variables'] = 500; $generalConfig['datatable_archiving_maximum_rows_subtable_custom_variables'] = 500; $generalConfig['archiving_ranking_query_row_limit'] = 0; - + foreach ($this->getRankingQueryDisabledApiForTesting() as $pair) { list($apiToCall, $params) = $pair; - + if (empty($params['testSuffix'])) { $params['testSuffix'] = ''; } diff --git a/tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php b/tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php index 3a522ee0cc..d67e899c1a 100644 --- a/tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php +++ b/tests/PHPUnit/Integration/Core/ArchiveProcessingTest.php @@ -136,7 +136,7 @@ class Core_ArchiveProcessingTest extends DatabaseTestCase { $archiveProcessor = $this->_createArchiveProcessor('day', '2010-01-01', 'UTC'); - // min finished timestamp considered when looking at archive timestamp + // min finished timestamp considered when looking at archive timestamp $dateMinArchived = Date::factory('2010-01-02')->getTimestamp(); $this->assertEquals($dateMinArchived, $archiveProcessor->public_getMinTimeArchiveProcessed() + 1); @@ -153,7 +153,7 @@ class Core_ArchiveProcessingTest extends DatabaseTestCase { $timezone = 'UTC+5.5'; $archiveProcessor = $this->_createArchiveProcessor('day', '2010-01-01', $timezone); - // min finished timestamp considered when looking at archive timestamp + // min finished timestamp considered when looking at archive timestamp $dateMinArchived = Date::factory('2010-01-01 18:30:00'); $this->assertEquals($dateMinArchived->getTimestamp(), $archiveProcessor->public_getMinTimeArchiveProcessed() + 1); @@ -170,7 +170,7 @@ class Core_ArchiveProcessingTest extends DatabaseTestCase { $timezone = 'UTC-5.5'; $archiveProcessor = $this->_createArchiveProcessor('month', '2010-01-02', $timezone); - // min finished timestamp considered when looking at archive timestamp + // min finished timestamp considered when looking at archive timestamp $dateMinArchived = Date::factory('2010-02-01 05:30:00'); $this->assertEquals($dateMinArchived->getTimestamp(), $archiveProcessor->public_getMinTimeArchiveProcessed() + 1); diff --git a/tests/PHPUnit/Integration/Core/LogTest.php b/tests/PHPUnit/Integration/Core/LogTest.php index 3e9a2cf64d..a2ef5b5502 100644 --- a/tests/PHPUnit/Integration/Core/LogTest.php +++ b/tests/PHPUnit/Integration/Core/LogTest.php @@ -97,7 +97,7 @@ dummy backtrace' /** * @group Core - * + * * @dataProvider getBackendsToTest */ public function testLoggingWorksWhenMessageIsString($backend) @@ -114,7 +114,7 @@ dummy backtrace' /** * @group Core - * + * * @dataProvider getBackendsToTest */ public function testLoggingWorksWhenMessageIsSprintfString($backend) @@ -131,7 +131,7 @@ dummy backtrace' /** * @group Core - * + * * @dataProvider getBackendsToTest */ public function testLoggingWorksWhenMessageIsError($backend) @@ -150,7 +150,7 @@ dummy backtrace' /** * @group Core - * + * * @dataProvider getBackendsToTest */ public function testLoggingWorksWhenMessageIsException($backend) @@ -169,7 +169,7 @@ dummy backtrace' /** * @group Core - * + * * @dataProvider getBackendsToTest */ public function testLoggingCorrectlyIdentifiesPlugin($backend) @@ -186,7 +186,7 @@ dummy backtrace' /** * @group Core - * + * * @dataProvider getBackendsToTest */ public function testLogMessagesIgnoredWhenNotWithinLevel($backend) diff --git a/tests/PHPUnit/Integration/Core/SegmentTest.php b/tests/PHPUnit/Integration/Core/SegmentTest.php index 17667bf59c..79f1273a23 100644 --- a/tests/PHPUnit/Integration/Core/SegmentTest.php +++ b/tests/PHPUnit/Integration/Core/SegmentTest.php @@ -467,7 +467,7 @@ class SegmentTest extends DatabaseTestCase /** * @group Core - * + * * @dataProvider getBogusSegments */ public function testBogusSegmentThrowsException($segment) diff --git a/tests/PHPUnit/Integration/Core/Tracker/ActionTest.php b/tests/PHPUnit/Integration/Core/Tracker/ActionTest.php index f180db3a86..1498e67578 100644 --- a/tests/PHPUnit/Integration/Core/Tracker/ActionTest.php +++ b/tests/PHPUnit/Integration/Core/Tracker/ActionTest.php @@ -37,7 +37,7 @@ class Core_Tracker_ActionTest extends DatabaseTestCase Config::getInstance()->Tracker = $section; \Piwik\Plugin\Manager::getInstance()->loadPlugins(array('SitesManager')); - + Translate::loadEnglishTranslation(); } @@ -180,7 +180,7 @@ class Core_Tracker_ActionTest extends DatabaseTestCase */ public function testExcludeQueryParametersSiteAndGlobalExcluded($url, $filteredUrl) { - // testing also that query parameters are case insensitive + // testing also that query parameters are case insensitive $excludedQueryParameters = 'P2,var[value][date]'; $excludedGlobalParameters = 'blabla, P4'; $this->setUpRootAccess(); diff --git a/tests/PHPUnit/Integration/Core/Tracker/VisitTest.php b/tests/PHPUnit/Integration/Core/Tracker/VisitTest.php index 9ddf6647e4..1aef6fc6ea 100644 --- a/tests/PHPUnit/Integration/Core/Tracker/VisitTest.php +++ b/tests/PHPUnit/Integration/Core/Tracker/VisitTest.php @@ -131,11 +131,11 @@ class Core_Tracker_VisitTest extends DatabaseTestCase $excludedUserAgent); $request = new Request(array('idsite' => $idsite)); - + // test that user agents that contain excluded user agent strings are excluded foreach ($tests as $ua => $expected) { $excluded = new VisitExcluded_public($request, $ip = false, $ua); - + $this->assertSame($expected, $excluded->public_isUserAgentExcluded(), "Result if isUserAgentExcluded('$ua') was not " . ($expected ? 'true' : 'false') . "."); } } diff --git a/tests/PHPUnit/Integration/ImportLogsTest.php b/tests/PHPUnit/Integration/ImportLogsTest.php index 83b1da785a..a08750d128 100755 --- a/tests/PHPUnit/Integration/ImportLogsTest.php +++ b/tests/PHPUnit/Integration/ImportLogsTest.php @@ -21,7 +21,7 @@ use Piwik\Tests\Fixtures\ManySitesImportedLogs; class ImportLogsTest extends IntegrationTestCase { public static $fixture = null; // initialized below class definition - + /** * @dataProvider getApiForTesting */ diff --git a/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php b/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php index 94f8f79153..0de2982ad3 100755 --- a/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php +++ b/tests/PHPUnit/Integration/OneVisitorTwoVisitsTest.php @@ -209,7 +209,7 @@ class OneVisitorTwoVisitsTest extends IntegrationTestCase $this->assertTrue($foundSubtable, "Actions_actions subtable was not loaded"); } - + /** * Test that restricting the number of sites to those viewable to another login * works when building an archive query object. diff --git a/tests/PHPUnit/Integration/Plugins/SitesManagerTest.php b/tests/PHPUnit/Integration/Plugins/SitesManagerTest.php index 3c9b6042bc..65d520337c 100644 --- a/tests/PHPUnit/Integration/Plugins/SitesManagerTest.php +++ b/tests/PHPUnit/Integration/Plugins/SitesManagerTest.php @@ -759,7 +759,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, $excludedIps = null, $excludedQueryParameters = null, $timezone = null, $currency = null, $groupAfter); - // no result for the group before update + // no result for the group before update $websites = API::getInstance()->getSitesFromGroup($group); $this->assertEquals(0, count($websites)); @@ -848,7 +848,7 @@ class Plugins_SitesManagerTest extends DatabaseTestCase $excludedQueryParameters = API::getInstance()->getExcludedQueryParametersGlobal(); $this->assertEquals('', $excludedQueryParameters); - // test that when not specified, defaults are set as expected + // test that when not specified, defaults are set as expected $idsite = API::getInstance()->addSite("site1", array('http://example.org')); $site = new Site($idsite); $this->assertEquals('UTC', $site->getTimezone()); diff --git a/tests/PHPUnit/Integration/Plugins/UsersManagerTest.php b/tests/PHPUnit/Integration/Plugins/UsersManagerTest.php index cbcb6da860..5b4e162c4e 100644 --- a/tests/PHPUnit/Integration/Plugins/UsersManagerTest.php +++ b/tests/PHPUnit/Integration/Plugins/UsersManagerTest.php @@ -30,7 +30,7 @@ class Plugins_UsersManagerTest extends DatabaseTestCase * @var Model */ private $model; - + public function setUp() { parent::setUp(); diff --git a/tests/PHPUnit/Integration/PrivacyManagerTest.php b/tests/PHPUnit/Integration/PrivacyManagerTest.php index 336361b31c..f0d044c709 100644 --- a/tests/PHPUnit/Integration/PrivacyManagerTest.php +++ b/tests/PHPUnit/Integration/PrivacyManagerTest.php @@ -37,7 +37,7 @@ require_once 'PrivacyManager/PrivacyManager.php'; class PrivacyManagerTest extends IntegrationTestCase { // constants used in checking whether numeric tables are populated correctly. - // 'done' entries exist for every period, even if there's no metric data, so we need the + // 'done' entries exist for every period, even if there's no metric data, so we need the // total archive count for each month. const TOTAL_JAN_ARCHIVE_COUNT = 37; // 31 + 4 + 1 + 1; const TOTAL_FEB_ARCHIVE_COUNT = 34; // 29 + 4 + 1; diff --git a/tests/PHPUnit/Integration/RowEvolutionTest.php b/tests/PHPUnit/Integration/RowEvolutionTest.php index 6fac424f54..268692df7e 100755 --- a/tests/PHPUnit/Integration/RowEvolutionTest.php +++ b/tests/PHPUnit/Integration/RowEvolutionTest.php @@ -97,7 +97,7 @@ class RowEvolutionTest extends IntegrationTestCase $label = urlencode('incredible title 0') . ',' . urlencode('incredible title 2'); $config['otherRequestParameters']['label'] = ($label); $return[] = array('API.getRowEvolution', $config); - + // standard label, entry page titles $config['testSuffix'] = '_entryPageTitles'; $config['periods'] = 'day'; @@ -183,7 +183,7 @@ class RowEvolutionTest extends IntegrationTestCase 'label' => 'Desktop,Mobile' ) )); - + // test multi row evolution w/ filter_limit to limit all available labels $return[] = array('API.getRowEvolution', array( 'testSuffix' => '_multiWithFilterLimit', @@ -198,7 +198,7 @@ class RowEvolutionTest extends IntegrationTestCase 'filter_limit' => 3, // only 3 labels should show up ) )); - + // test multi row evolution when there is no data $return[] = array('API.getRowEvolution', array( 'testSuffix' => '_multiWithNoData', @@ -213,7 +213,7 @@ class RowEvolutionTest extends IntegrationTestCase // no label ) )); - + // (non-rowevolution test) test flattener w/ search engines to make sure // queued filters are not applied twice $return[] = array('Referrers.getSearchEngines', array( diff --git a/tests/PHPUnit/Integration/TransitionsTest.php b/tests/PHPUnit/Integration/TransitionsTest.php index 7bb55b9f56..613e66dd45 100644 --- a/tests/PHPUnit/Integration/TransitionsTest.php +++ b/tests/PHPUnit/Integration/TransitionsTest.php @@ -49,7 +49,7 @@ class TransitionsTest extends IntegrationTestCase 'pageTitle' => 'page title - page/one.html', ) )); - + // test w/ pages that don't exist $return[] = array('Transitions.getTransitionsForPageUrl', array( 'idSite' => self::$fixture->idSite, @@ -69,7 +69,7 @@ class TransitionsTest extends IntegrationTestCase 'pageTitle' => 'not a page title', ) )); - + $return[] = array('Transitions.getTransitionsForPageUrl', array( // test w/ limiting 'idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime, diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index 961aa7ab13..2678196801 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -415,7 +415,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase $parametersToSet['serialize'] = 1; $exampleUrl = $apiMetadata->getExampleUrl($class, $methodName, $parametersToSet); - + if ($exampleUrl === false) { continue; } diff --git a/tests/PHPUnit/Plugins/UserCountryTest.php b/tests/PHPUnit/Plugins/UserCountryTest.php index 7ca0709a1c..72f9e7bfce 100644 --- a/tests/PHPUnit/Plugins/UserCountryTest.php +++ b/tests/PHPUnit/Plugins/UserCountryTest.php @@ -71,7 +71,7 @@ class Test_Piwik_UserCountry extends PHPUnit_Framework_Testcase /** * Test that redundant checks work. - * + * * @group Plugins */ public function testGeoIpUpdaterRedundantChecks() @@ -169,7 +169,7 @@ class Piwik_UserCountry_GeoIPAutoUpdater_publictest extends GeoIPAutoUpdater { // empty } - + public function performRedundantDbChecks() { parent::performRedundantDbChecks(); diff --git a/tests/PHPUnit/TestingEnvironment.php b/tests/PHPUnit/TestingEnvironment.php index ca17163585..dae74b4a3c 100644 --- a/tests/PHPUnit/TestingEnvironment.php +++ b/tests/PHPUnit/TestingEnvironment.php @@ -235,7 +235,7 @@ class Piwik_TestingEnvironment 'subject' => $mail->getSubject(), 'contents' => $outputContent ); - + file_put_contents($outputFile, Common::json_encode($outputContents)); }); } diff --git a/tests/PHPUnit/config.ini.travis.php b/tests/PHPUnit/config.ini.travis.php index 40ca106158..185973d488 100644 --- a/tests/PHPUnit/config.ini.travis.php +++ b/tests/PHPUnit/config.ini.travis.php @@ -9,7 +9,7 @@ password = dbname = piwik_tests adapter = PDO\MYSQL ; no table prefix for tests on travis -tables_prefix = +tables_prefix = ;charset = utf8 [database_tests] @@ -19,7 +19,7 @@ password = dbname = piwik_tests adapter = PDO\MYSQL ; no table prefix for tests on travis -tables_prefix = +tables_prefix = [log] log_writers[] = file diff --git a/tests/README.md b/tests/README.md index 8cfdf0ef7f..cabef0a92a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,5 +1,5 @@ Piwik comes with unit tests, integration tests, Javascript tests and Webtests. -This document briefly describes how to use and modify Piwik tests. +This document briefly describes how to use and modify Piwik tests. ## Continuous Integration @@ -64,7 +64,7 @@ To execute the tests: -3. Ensure the `[database_tests]` section in `piwik/config/config.php.ini` is set up correctly, +3. Ensure the `[database_tests]` section in `piwik/config/config.php.ini` is set up correctly, i.e. with the correct password to prevent the following error: `SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)` @@ -78,7 +78,7 @@ To execute the tests: There are three main groups of tests: Core, Plugins and Integration For example run `phpunit --group Core` to run all Core Piwik tests. - + 5. Write more tests :) See ["Writing Unit tests with PHPUnit"](http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html) @@ -104,7 +104,7 @@ Otherwise, if you didn't expect to modify the API outputs, it might be that your ### Scheduled Reports Tests -As part of our integration tests we generate the scheduled reports (in HTML, PDF & SMS). +As part of our integration tests we generate the scheduled reports (in HTML, PDF & SMS). Some of these scheduled reports contain PNG graphs. Depending on the system under test, generated images can differ. Therefore, PNG graphs are only tested and compared against "expected" graphs, if the system under test has the same characteristics as the integration server. The characteristics of the integration server are described in `IntegrationTestCase::canImagesBeIncludedInScheduledReports()` @@ -133,7 +133,7 @@ See [tests/PHPUnit/Benchmarks/README.md](https://github.com/piwik/piwik/blob/mas You can retrieve the files generated during the build (the build artifacts) at [builds-artifacts.piwik.org](http://builds-artifacts.piwik.org/) -## Troubleshooting +## Troubleshooting See [tests/README.troubleshooting.md](https://github.com/piwik/piwik/blob/master/tests/README.troubleshooting.md) for troubleshooting the tests. diff --git a/tests/README.screenshots.md b/tests/README.screenshots.md index b8f54c0263..6203313f71 100644 --- a/tests/README.screenshots.md +++ b/tests/README.screenshots.md @@ -11,7 +11,7 @@ Changes made to Piwik that affect the UI (such as changes to CSS, JavaScript, Tw break the UI tests build. This is an opportunity to review your code and as a Piwik developer you should ensure that any side effects created by your changes are correct. -If they are not correct, determine the cause of the change and fix it in a new commit. If the changes are correct, +If they are not correct, determine the cause of the change and fix it in a new commit. If the changes are correct, then you should update the expected screenshots accordingly. **Steps to fix a broken build** @@ -25,7 +25,7 @@ To fix a broken build, follow these steps: like this: View UI failures (if any) here http://builds-artifacts.piwik.org/ui-tests.master/1837.1/screenshot-diffs/diffviewer.html - + Click on the link in the message. * The diff viewer will list links to the generated screenshots for failed tests as well as the expected screenshots and image diffs. * For each failure, check if the change is desired. Sometimes we introduce regression without realising, and screenshot tests can help us spot such regressions. @@ -233,7 +233,7 @@ The following are examples of test environment manipulation: * [Dashboard_spec.js](https://github.com/piwik/piwik-ui-tests/blob/master/specs/Dashboard_spec.js) * [Login_spec.js](https://github.com/piwik/piwik-ui-tests/blob/master/specs/Login_spec.js) -## Learn more +## Learn more Check out this blog post to learn more about Screenshot Tests in Piwik: [QA Screenshot Testing blog post](http://piwik.org/blog/2013/10/our-latest-improvement-to-qa-screenshot-testing/) diff --git a/tests/README.troubleshooting.md b/tests/README.troubleshooting.md index 882ff9c7d7..a82c84a3da 100644 --- a/tests/README.troubleshooting.md +++ b/tests/README.troubleshooting.md @@ -1,6 +1,6 @@ # Troubleshooting Piwik Tests -If you have problems with running Piwik tests see below. +If you have problems with running Piwik tests see below. If you cannot solve your issues please [ask in the forums](http://forum.piwik.org/list.php?9) diff --git a/tests/README.xhprof.md b/tests/README.xhprof.md index 81a6a3f1f2..b7856f4f5d 100644 --- a/tests/README.xhprof.md +++ b/tests/README.xhprof.md @@ -10,23 +10,23 @@ First, XHProf must be built (this guide assumes you're using a linux variant): $ cd /path/to/piwik/tests/lib/ $ wget http://pecl.php.net/get/xhprof $ tar -xzvf xhprof - + * Build XHProf. $ phpize $ ./configure $ make - + xhprof.so will now exist in the ./modules directory. - + * Configure PHP to use XHProf. Add the following to your php.ini file: - + ``` [xhprof] extension=/path/to/piwik/tests/lib/xhprof-0.9.4/extension/modules/xhprof.so xhprof.output_dir=/path/to/output/dir ``` - + Replace /path/to/output/dir with an existing directory. All your profiles will be stored there. diff --git a/tests/angularjs/README.md b/tests/angularjs/README.md index 40437418c1..53c2b611e5 100644 --- a/tests/angularjs/README.md +++ b/tests/angularjs/README.md @@ -20,7 +20,7 @@ On Ubuntu you might be able to use the `scripts/install-ubuntu.sh` script. Have We do not have a general `tests` folder containing all test files. Instead we create a file having the same name appended by `_spec.js` in the same directory. For instance you want to test a file named `startfrom.js` then we create a file named `startfrom_spec.js`: -`plugins/CoreHome/angularjs/common/filters/startfrom.js` => +`plugins/CoreHome/angularjs/common/filters/startfrom.js` => `plugins/CoreHome/angularjs/common/filters/startfrom_spec.js` ## Execution @@ -41,7 +41,7 @@ Before executing a test it'll always run [JSHint](http://www.jshint.com/) to det ## Testing existing jQuery code -Just in case you want to write a test for your jQuery code you can do this the same way. You might be interested in the [Chai jQuery](http://chaijs.com/plugins/chai-jquery) plugin. +Just in case you want to write a test for your jQuery code you can do this the same way. You might be interested in the [Chai jQuery](http://chaijs.com/plugins/chai-jquery) plugin. ## Examples * [Testing a filter](../../plugins/CoreHome/angularjs/common/filters/startfrom_spec.js) diff --git a/tests/javascript/frameworks/dojo/dojo-1.0.3.js b/tests/javascript/frameworks/dojo/dojo-1.0.3.js index da6e171f67..793be17a79 100644 --- a/tests/javascript/frameworks/dojo/dojo-1.0.3.js +++ b/tests/javascript/frameworks/dojo/dojo-1.0.3.js @@ -142,7 +142,7 @@ if(typeof dojo == "undefined"){ } dojo.mixin = function(/*Object*/obj, /*Object...*/props){ - // summary: Adds all properties and methods of props to obj. + // summary: Adds all properties and methods of props to obj. for(var i=1, l=arguments.length; i 0){ + if(d._inFlightCount > 0){ console.debug("files still in flight!"); return; } @@ -502,8 +502,8 @@ if(typeof dojo == "undefined"){ var syms = modulename.split("."); for(var i = syms.length; i>0; i--){ var parentModule = syms.slice(0, i).join("."); - if((i==1) && !this._moduleHasPrefix(parentModule)){ - // Support default module directory (sibling of dojo) for top-level modules + if((i==1) && !this._moduleHasPrefix(parentModule)){ + // Support default module directory (sibling of dojo) for top-level modules syms[0] = "../" + syms[0]; }else{ var parentModulePath = this._getModulePrefix(parentModule); @@ -527,25 +527,25 @@ if(typeof dojo == "undefined"){ // description: // _loadModule("A.B") first checks to see if symbol A.B is defined. If // it is, it is simply returned (nothing to do). - // + // // If it is not defined, it will look for "A/B.js" in the script root // directory. - // + // // It throws if it cannot find a file to load, or if the symbol A.B is // not defined after loading. - // + // // It returns the object A.B. - // + // // This does nothing about importing symbols into the current package. // It is presumed that the caller will take care of that. For example, // to import all symbols: - // + // // | with (dojo._loadModule("A.B")) { // | ... // | } - // + // // And to import just the leaf symbol: - // + // // | var B = dojo._loadModule("A.B"); // | ... // returns: the required namespace object @@ -571,7 +571,7 @@ if(typeof dojo == "undefined"){ // pass in false so we can give better error module = this._loadedModules[moduleName]; if(!module){ - throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); + throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); } } @@ -588,7 +588,7 @@ if(typeof dojo == "undefined"){ // Each javascript source file is called a resource. When a resource // is loaded by the browser, dojo.provide() registers that it has been // loaded. - // + // // For backwards compatibility reasons, in addition to registering the // resource, dojo.provide() also ensures that the javascript object // for the module exists. For example, @@ -619,11 +619,11 @@ if(typeof dojo == "undefined"){ // hostenv.name_ item. The items in the "common" array will _always_ // be loaded, regardless of which list is chosen. Here's how it's // normally called: - // + // // | dojo.platformRequire({ // | // an example that passes multiple args to _loadModule() // | browser: [ - // | ["foo.bar.baz", true, true], + // | ["foo.bar.baz", true, true], // | "foo.sample", // | "foo.test, // | ], @@ -654,7 +654,7 @@ if(typeof dojo == "undefined"){ if(condition === true){ // FIXME: why do we support chained require()'s here? does the build system? var args = []; - for(var i = 1; i < arguments.length; i++){ + for(var i = 1; i < arguments.length; i++){ args.push(arguments[i]); } d.require.apply(d, args); @@ -664,13 +664,13 @@ if(typeof dojo == "undefined"){ dojo.requireAfterIf = d.requireIf; dojo.registerModulePath = function(/*String*/module, /*String*/prefix){ - // summary: + // summary: // maps a module name to a path - // description: + // description: // An unregistered module is given the default path of ../, // relative to Dojo root. For example, module acme is mapped to // ../acme. If you want to use a different module name, use - // dojo.registerModulePath. + // dojo.registerModulePath. d._modulePrefixes[module] = { name: module, value: prefix }; } @@ -680,15 +680,15 @@ if(typeof dojo == "undefined"){ // same style as dojo.require. Contents of the resource bundle are // typically strings, but may be any name/value pair, represented in // JSON format. See also dojo.i18n.getLocalization. - // moduleName: + // moduleName: // name of the package containing the "nls" directory in which the // bundle is found - // bundleName: + // bundleName: // bundle name, i.e. the filename without the '.js' suffix - // locale: + // locale: // the locale to load (optional) By default, the browser's user // locale as defined by dojo.locale - // availableFlatLocales: + // availableFlatLocales: // A comma-separated list of the available, flattened locales for this // bundle. This argument should only be set by the build process. // description: @@ -745,11 +745,11 @@ if(typeof dojo == "undefined"){ var ire = new RegExp("^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"); dojo._Url = function(/*dojo._Url||String...*/){ - // summary: + // summary: // Constructor to create an object representing a URL. // It is marked as private, since we might consider removing // or simplifying it. - // description: + // description: // Each argument is evaluated in order relative to the next until // a canonical uri is produced. To get an absolute Uri relative to // the current document use: @@ -817,7 +817,7 @@ if(typeof dojo == "undefined"){ } uri = ""; - if(relobj.scheme){ + if(relobj.scheme){ uri += relobj.scheme + ":"; } if(relobj.authority){ @@ -857,10 +857,10 @@ if(typeof dojo == "undefined"){ dojo._Url.prototype.toString = function(){ return this.uri; }; dojo.moduleUrl = function(/*String*/module, /*dojo._Url||String*/url){ - // summary: + // summary: // Returns a Url object relative to a module - // - // example: + // + // example: // | dojo.moduleUrl("dojo.widget","templates/template.html"); // example: // | dojo.moduleUrl("acme","images/small.png") @@ -870,7 +870,7 @@ if(typeof dojo == "undefined"){ if(loc.lastIndexOf("/") != loc.length-1){ loc += "/"; } - + //If the path is an absolute path (starts with a / or is on another //domain/xdomain) then don't add the baseUrl. var colonIndex = loc.indexOf(":"); @@ -962,7 +962,7 @@ if(typeof window != 'undefined'){ d._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0']; d._xhrObj= function(){ - // summary: + // summary: // does the work of portably generating a new XMLHTTPRequest // object. var http = null; @@ -1080,7 +1080,7 @@ if(typeof window != 'undefined'){ // START DOMContentLoaded // Mozilla and Opera 9 expose the event we could use if(document.addEventListener){ - // NOTE: + // NOTE: // due to a threading issue in Firefox 2.0, we can't enable // DOMContentLoaded on that platform. For more information, see: // http://trac.dojotoolkit.org/ticket/1704 @@ -1225,7 +1225,7 @@ dojo.isFunction = (function(){ })(); dojo.isObject = function(/*anything*/ it){ - // summary: + // summary: // Returns true if it is a JavaScript object (or an Array, a Function or null) return it !== undefined && (it === null || typeof it == "object" || dojo.isArray(it) || dojo.isFunction(it)); // Boolean @@ -1252,7 +1252,7 @@ dojo.isArrayLike = function(/*anything*/ it){ } dojo.isAlien = function(/*anything*/ it){ - // summary: + // summary: // Returns true if it is a built-in function or some other kind of // oddball that *should* report as a function but doesn't return it && !dojo.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean @@ -1283,23 +1283,23 @@ dojo._hitchArgs = function(scope, method /*,...*/){ } dojo.hitch = function(/*Object*/scope, /*Function|String*/method /*,...*/){ - // summary: - // Returns a function that will only ever execute in the a given scope. + // summary: + // Returns a function that will only ever execute in the a given scope. // This allows for easy use of object member functions // in callbacks and other places in which the "this" keyword may - // otherwise not reference the expected scope. - // Any number of default positional arguments may be passed as parameters + // otherwise not reference the expected scope. + // Any number of default positional arguments may be passed as parameters // beyond "method". // Each of these values will be used to "placehold" (similar to curry) - // for the hitched function. - // scope: - // The scope to use when method executes. If method is a string, + // for the hitched function. + // scope: + // The scope to use when method executes. If method is a string, // scope is also the object containing method. // method: // A function to be hitched to scope, or the name of the method in // scope to be hitched. // example: - // | dojo.hitch(foo, "bar")(); + // | dojo.hitch(foo, "bar")(); // runs foo.bar() in the scope of foo // example: // | dojo.hitch(foo, myFunction); @@ -1324,7 +1324,7 @@ dojo.delegate = function(obj, props){ // summary: // returns a new object which "looks" to obj for properties which it // does not have a value for. Optionally takes a bag of properties to - // seed the returned object with initially. + // seed the returned object with initially. // description: // This is a small implementaton of the Boodman/Crockford delegation // pattern in JavaScript. An intermediate object constructor mediates @@ -1427,7 +1427,7 @@ dojo.clone = function(/*anything*/ o){ } dojo.trim = function(/*String*/ str){ - // summary: + // summary: // trims whitespaces from both sides of the string // description: // This version of trim() was selected for inclusion into the base due @@ -1449,27 +1449,27 @@ dojo.provide("dojo._base.declare"); // this file courtesy of the TurboAjax group, licensed under a Dojo CLA dojo.declare = function(/*String*/ className, /*Function|Function[]*/ superclass, /*Object*/ props){ - // summary: + // summary: // Create a feature-rich constructor from compact notation // className: // The name of the constructor (loosely, a "class") // stored in the "declaredClass" property in the created prototype // superclass: - // May be null, a Function, or an Array of Functions. If an array, + // May be null, a Function, or an Array of Functions. If an array, // the first element is used as the prototypical ancestor and // any following Functions become mixin ancestors. // props: // An object whose properties are copied to the // created prototype. - // Add an instance-initialization function by making it a property + // Add an instance-initialization function by making it a property // named "constructor". // description: // Create a constructor using a compact notation for inheritance and - // prototype extension. + // prototype extension. // // All superclasses (including mixins) must be Functions (not simple Objects). // - // Mixin ancestors provide a type of multiple inheritance. Prototypes of mixin + // Mixin ancestors provide a type of multiple inheritance. Prototypes of mixin // ancestors are copied to the new class: changes to mixin prototypes will // not affect classes to which they have been mixed in. // @@ -1481,16 +1481,16 @@ dojo.declare = function(/*String*/ className, /*Function|Function[]*/ superclass // | someValue: 2, // | // initialization function // | constructor: function(){ - // | this.myComplicatedObject = new ReallyComplicatedObject(); + // | this.myComplicatedObject = new ReallyComplicatedObject(); // | }, // | // other functions - // | someMethod: function(){ - // | doStuff(); + // | someMethod: function(){ + // | doStuff(); // | } // | ); // argument juggling (deprecated) - if(dojo.isFunction(props)||(arguments.length>3)){ + if(dojo.isFunction(props)||(arguments.length>3)){ dojo.deprecated("dojo.declare: for class '" + className + "' pass initializer function as 'constructor' property instead of as a separate argument.", "", "1.0"); var c = props; props = arguments[3] || {}; @@ -1516,7 +1516,7 @@ dojo.declare = function(/*String*/ className, /*Function|Function[]*/ superclass // name methods (experimental) for(var i in props){if(dojo.isFunction(fn=props[i])&&(!0[i])){fn.nom=i;}} // decorate prototype - dojo.extend(ctor, {declaredClass: className, _constructor: init, preamble: null}, props||0); + dojo.extend(ctor, {declaredClass: className, _constructor: init, preamble: null}, props||0); // special help for IE ctor.prototype.constructor = ctor; // create named reference @@ -1548,13 +1548,13 @@ dojo.mixin(dojo.declare, { // we have to make a function, but don't want to close over anything return function(){ this._construct(arguments); } }, - _core: { + _core: { _construct: function(args){ var c=args.callee, s=c.superclass, ct=s&&s.constructor, m=c.mixin, mct=m&&m.constructor, a=args, ii, fn; // side-effect of = used on purpose here, lint may complain, don't try this at home - if(a[0]){ + if(a[0]){ // FIXME: preambles for each mixin should be allowed - // FIXME: + // FIXME: // should we allow the preamble here NOT to modify the // default args, but instead to act on each mixin // independently of the class instance being constructed @@ -1562,13 +1562,13 @@ dojo.mixin(dojo.declare, { // allow any first argument w/ a "preamble" property to act as a // class preamble (not exclusive of the prototype preamble) - if(/*dojo.isFunction*/(fn = a[0]["preamble"])){ - a = fn.apply(this, a) || a; + if(/*dojo.isFunction*/(fn = a[0]["preamble"])){ + a = fn.apply(this, a) || a; } - } + } // prototype preamble if(fn=c.prototype.preamble){a = fn.apply(this, a) || a;} - // FIXME: + // FIXME: // need to provide an optional prototype-settable // "_explicitSuper" property which disables this // initialize superclass @@ -1611,14 +1611,14 @@ dojo.mixin(dojo.declare, { var a = arguments; if(!dojo.isString(a[0])){newArgs=args; args=name; name=args.callee.nom;} var c=args.callee, p=this.constructor.prototype, a=newArgs||args, fn, mp; - // if not an instance override + // if not an instance override if(this[name]!=c || p[name]==c){ mp = this._findMethod(name, c, p, true); if(!mp){throw(this.declaredClass + ': name argument ("' + name + '") to inherited must match callee (declare.js)');} p = this._findMethod(name, c, mp, false); } fn = p && p[name]; - // FIXME: perhaps we should throw here? + // FIXME: perhaps we should throw here? if(!fn){console.debug(mp.declaredClass + ': no inherited "' + name + '" was found (declare.js)'); return;} // if the function exists, invoke it in our scope return fn.apply(this, a); @@ -1639,11 +1639,11 @@ dojo.provide("dojo._base.connect"); dojo._listener = { // create a dispatcher function getDispatcher: function(){ - // following comments pulled out-of-line to prevent cloning them + // following comments pulled out-of-line to prevent cloning them // in the returned function. - // - indices (i) that are really in the array of listeners (ls) will + // - indices (i) that are really in the array of listeners (ls) will // not be in Array.prototype. This is the 'sparse array' trick - // that keeps us safe from libs that take liberties with built-in + // that keeps us safe from libs that take liberties with built-in // objects // - listener is invoked with current scope (this) return function(){ @@ -1663,12 +1663,12 @@ dojo._listener = { // add a listener to an object add: function(/*Object*/ source, /*String*/ method, /*Function*/ listener){ // Whenever 'method' is invoked, 'listener' will have the same scope. - // Trying to supporting a context object for the listener led to - // complexity. + // Trying to supporting a context object for the listener led to + // complexity. // Non trivial to provide 'once' functionality here // because listener could be the result of a dojo.hitch call, // in which case two references to the same hitch target would not - // be equivalent. + // be equivalent. source = source || dojo.global; // The source method is either null, a dispatcher, or some other function var f = source[method]; @@ -1678,15 +1678,15 @@ dojo._listener = { // original target function is special d.target = f; // dispatcher holds a list of listeners - d._listeners = []; + d._listeners = []; // redirect source to dispatcher f = source[method] = d; } - // The contract is that a handle is returned that can - // identify this listener for disconnect. + // The contract is that a handle is returned that can + // identify this listener for disconnect. // - // The type of the handle is private. Here is it implemented as Integer. - // DOM event code has this same contract but handle is Function + // The type of the handle is private. Here is it implemented as Integer. + // DOM event code has this same contract but handle is Function // in non-IE browsers. // // We could have separate lists of before and after listeners. @@ -1697,26 +1697,26 @@ dojo._listener = { var f = (source||dojo.global)[method]; // remember that handle is the index+1 (0 is not a valid handle) if(f && f._listeners && handle--){ - delete f._listeners[handle]; + delete f._listeners[handle]; } } }; // Multiple delegation for arbitrary methods. -// This unit knows nothing about DOM, -// but we include DOM aware +// This unit knows nothing about DOM, +// but we include DOM aware // documentation and dontFix // argument here to help the autodocs. // Actual DOM aware code is in event.js. -dojo.connect = function(/*Object|null*/ obj, - /*String*/ event, - /*Object|null*/ context, +dojo.connect = function(/*Object|null*/ obj, + /*String*/ event, + /*Object|null*/ context, /*String|Function*/ method, /*Boolean*/ dontFix){ // summary: - // Create a link that calls one function when another executes. + // Create a link that calls one function when another executes. // // description: // Connects method to event, so that after event fires, method @@ -1728,41 +1728,41 @@ dojo.connect = function(/*Object|null*/ obj, // // null arguments may simply be omitted. // - // obj[event] can resolve to a function or undefined (null). + // obj[event] can resolve to a function or undefined (null). // If obj[event] is null, it is assigned a function. // - // The return value is a handle that is needed to + // The return value is a handle that is needed to // remove this connection with dojo.disconnect. // - // obj: - // The source object for the event function. + // obj: + // The source object for the event function. // Defaults to dojo.global if null. - // If obj is a DOM node, the connection is delegated + // If obj is a DOM node, the connection is delegated // to the DOM event manager (unless dontFix is true). // // event: - // String name of the event function in obj. + // String name of the event function in obj. // I.e. identifies a property obj[event]. // - // context: + // context: // The object that method will receive as "this". // // If context is null and method is a function, then method // inherits the context of event. - // - // If method is a string then context must be the source + // + // If method is a string then context must be the source // object object for method (context[method]). If context is null, // dojo.global is used. // // method: - // A function reference, or name of a function in context. - // The function identified by method fires after event does. + // A function reference, or name of a function in context. + // The function identified by method fires after event does. // method receives the same arguments as the event. // See context argument comments for information on method's scope. // // dontFix: - // If obj is a DOM node, set dontFix to true to prevent delegation - // of this connection to the DOM event manager. + // If obj is a DOM node, set dontFix to true to prevent delegation + // of this connection to the DOM event manager. // // example: // When obj.onchange(), do ui.update(): @@ -1811,7 +1811,7 @@ dojo.connect = function(/*Object|null*/ obj, // used by non-browser hostenvs. always overriden by event.js dojo._connect = function(obj, event, context, method){ - var l=dojo._listener, h=l.add(obj, event, dojo.hitch(context, method)); + var l=dojo._listener, h=l.add(obj, event, dojo.hitch(context, method)); return [obj, event, h, l]; // Handle } @@ -1849,7 +1849,7 @@ dojo.subscribe = function(/*String*/ topic, /*Object|null*/ context, /*String|Fu // is invoked when topic is published. // example: // | dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); }; - // | dojo.publish("alerts", [ "read this", "hello world" ]); + // | dojo.publish("alerts", [ "read this", "hello world" ]); // support for 2 argument invocation (omitting context) depends on hitch return [topic, dojo._listener.add(dojo._topics, topic, dojo.hitch(context, method))]; /*Handle*/ @@ -1857,7 +1857,7 @@ dojo.subscribe = function(/*String*/ topic, /*Object|null*/ context, /*String|Fu dojo.unsubscribe = function(/*Handle*/ handle){ // summary: - // Remove a topic listener. + // Remove a topic listener. // handle: // The handle returned from a call to subscribe. // example: @@ -1875,11 +1875,11 @@ dojo.publish = function(/*String*/ topic, /*Array*/ args){ // topic: // The name of the topic to publish. // args: - // An array of arguments. The arguments will be applied + // An array of arguments. The arguments will be applied // to each topic subscriber (as first class parameters, via apply). // example: // | dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); }; - // | dojo.publish("alerts", [ "read this", "hello world" ]); + // | dojo.publish("alerts", [ "read this", "hello world" ]); // Note that args is an array, which is more efficient vs variable length // argument list. Ideally, var args would be implemented via Array @@ -1890,8 +1890,8 @@ dojo.publish = function(/*String*/ topic, /*Array*/ args){ } } -dojo.connectPublisher = function( /*String*/ topic, - /*Object|null*/ obj, +dojo.connectPublisher = function( /*String*/ topic, + /*Object|null*/ obj, /*String*/ event){ // summary: // Ensure that everytime obj.event() is called, a message is published @@ -1900,11 +1900,11 @@ dojo.connectPublisher = function( /*String*/ topic, // the topic. // topic: // The name of the topic to publish. - // obj: + // obj: // The source object for the event function. Defaults to dojo.global // if null. // event: - // The name of the event function in obj. + // The name of the event function in obj. // I.e. identifies a property obj[event]. // example: // | dojo.connectPublisher("/ajax/start", dojo, "xhrGet"}; @@ -1965,7 +1965,7 @@ dojo.Deferred = function(/*Function?*/ canceller){ // The sequence of callbacks is internally represented as a list of // 2-tuples containing the callback/errback pair. For example, the // following call sequence: - // + // // | var d = new dojo.Deferred(); // | d.addCallback(myCallback); // | d.addErrback(myErrback); @@ -1988,7 +1988,7 @@ dojo.Deferred = function(/*Function?*/ canceller){ // * -1: no value yet (initial condition) // * 0: success // * 1: error - // + // // A Deferred will be in the error state if one of the following three // conditions are met: // @@ -2087,7 +2087,7 @@ dojo.Deferred = function(/*Function?*/ canceller){ // | renderDataitem(data[x]); // | } // | d.callback(true); - // | }catch(e){ + // | }catch(e){ // | d.errback(new Error("rendering failed")); // | } // | return d; @@ -2114,7 +2114,7 @@ dojo.Deferred = function(/*Function?*/ canceller){ // | renderDataitem(data[x]); // | } // | d.callback(true); - // | }catch(e){ + // | }catch(e){ // | d.errback(new Error("rendering failed")); // | } // | }, 100); @@ -2168,7 +2168,7 @@ dojo.extend(dojo.Deferred, { })(), cancel: function(){ - // summary: + // summary: // Cancels a Deferred that has not yet received a value, or is // waiting on another Deferred as its value. // description: @@ -2197,7 +2197,7 @@ dojo.extend(dojo.Deferred, { this.results[0].cancel(); } }, - + _resback: function(res){ // summary: @@ -2219,7 +2219,7 @@ dojo.extend(dojo.Deferred, { callback: function(res){ // summary: Begin the callback sequence with a non-error value. - + /* callback or errback should only be called once on a given Deferred. @@ -2229,7 +2229,7 @@ dojo.extend(dojo.Deferred, { }, errback: function(/*Error*/res){ - // summary: + // summary: // Begin the callback sequence with an error result. this._check(); if(!(res instanceof Error)){ @@ -2251,7 +2251,7 @@ dojo.extend(dojo.Deferred, { }, addCallback: function(cb, cbfn){ - // summary: + // summary: // Add a single callback to the end of the callback sequence. var enclosed = dojo.hitch(cb, cbfn); if(arguments.length > 2){ @@ -2261,7 +2261,7 @@ dojo.extend(dojo.Deferred, { }, addErrback: function(cb, cbfn){ - // summary: + // summary: // Add a single callback to the end of the callback sequence. var enclosed = dojo.hitch(cb, cbfn); if(arguments.length > 2){ @@ -2271,7 +2271,7 @@ dojo.extend(dojo.Deferred, { }, addCallbacks: function(cb, eb){ - // summary: + // summary: // Add separate callback and errback to the end of the callback // sequence. this.chain.push([cb, eb]) @@ -2282,7 +2282,7 @@ dojo.extend(dojo.Deferred, { }, _fire: function(){ - // summary: + // summary: // Used internally to exhaust the callback sequence when a result // is available. var chain = this.chain; @@ -2306,7 +2306,7 @@ dojo.extend(dojo.Deferred, { // inlined from _pause() self.paused--; if( - (self.paused == 0) && + (self.paused == 0) && (self.fired >= 0) ){ self._fire(); @@ -2340,7 +2340,7 @@ dojo.provide("dojo._base.json"); dojo.fromJson = function(/*String*/ json){ // summary: // evaluates the passed string-form of a JSON object - // json: + // json: // a string literal of a JSON item, for instance: // '{ "foo": [ "bar", 1, { "baz": "thud" } ] }' // return: @@ -2371,7 +2371,7 @@ dojo._escapeString = function(/*String*/str){ dojo.toJsonIndentStr = "\t"; dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _indentStr){ // summary: - // Create a JSON serialization of an object. + // Create a JSON serialization of an object. // Note that this doesn't check for infinite recursion, so don't do that! // // it: @@ -2382,13 +2382,13 @@ dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _ind // // prettyPrint: // if true, we indent objects and arrays to make the output prettier. - // The variable dojo.toJsonIndentStr is used as the indent string - // -- to use something other than the default (tab), + // The variable dojo.toJsonIndentStr is used as the indent string + // -- to use something other than the default (tab), // change that variable before calling dojo.toJson(). // // _indentStr: // private variable for recursive calls when pretty printing, do not use. - // + // // return: // a String representing the serialized version of the passed object. @@ -2403,8 +2403,8 @@ dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _ind }else if(it === null){ return "null"; } - if(dojo.isString(it)){ - return dojo._escapeString(it); + if(dojo.isString(it)){ + return dojo._escapeString(it); } if(it.nodeType && it.cloneNode){ // isNode return ""; // FIXME: would something like outerHTML be better here? @@ -2485,8 +2485,8 @@ dojo.provide("dojo._base.array"); (function(){ var _getParts = function(arr, obj, cb){ - return [ - (dojo.isString(arr) ? arr.split("") : arr), + return [ + (dojo.isString(arr) ? arr.split("") : arr), (obj||dojo.global), // FIXME: cache the anonymous functions we create here? (dojo.isString(cb) ? (new Function("item", "index", "array", cb)) : cb) @@ -2494,7 +2494,7 @@ dojo.provide("dojo._base.array"); } dojo.mixin(dojo, { - indexOf: function( /*Array*/ array, + indexOf: function( /*Array*/ array, /*Object*/ value, /*Integer?*/ fromIndex, /*Boolean?*/ findLast){ @@ -2518,7 +2518,7 @@ dojo.provide("dojo._base.array"); lastIndexOf: function(/*Array*/array, /*Object*/value, /*Integer?*/fromIndex){ // summary: - // locates the last index of the provided value in the passed array. + // locates the last index of the provided value in the passed array. // If the value is not found, -1 is returned. // description: // For details on this method, see: @@ -2542,7 +2542,7 @@ dojo.provide("dojo._base.array"); // FIXME: there are several ways of handilng thisObject. Is // dojo.global always the default context? var _p = _getParts(arr, obj, callback); arr = _p[0]; - for(var i=0,l=_p[0].length; i0; }); - // returns true + // returns true return this._everyOrSome(true, arr, callback, thisObject); // Boolean }, @@ -2703,7 +2703,7 @@ dojo.extend(dojo.Color, { sanitize: function(){ // summary: // makes sure that the object has correct attributes - // description: + // description: // the default implementation does nothing, include dojo.colors to // augment it to real checks return this; // dojo.Color @@ -2738,12 +2738,12 @@ dojo.extend(dojo.Color, { }); dojo.blendColors = function( - /*dojo.Color*/ start, - /*dojo.Color*/ end, + /*dojo.Color*/ start, + /*dojo.Color*/ end, /*Number*/ weight, /*dojo.Color?*/ obj ){ - // summary: + // summary: // blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend, // can reuse a previously allocated dojo.Color object for the result var d = dojo, t = obj || new dojo.Color(); @@ -2836,15 +2836,15 @@ dojo._hasResource["dojo._base.window"] = true; dojo.provide("dojo._base.window"); dojo._gearsObject = function(){ - // summary: + // summary: // factory method to get a Google Gears plugin instance to // expose in the browser runtime environment, if present var factory; var results; - + var gearsObj = dojo.getObject("google.gears"); if(gearsObj){ return gearsObj; } // already defined elsewhere - + if(typeof GearsFactory != "undefined"){ // Firefox factory = new GearsFactory(); }else{ @@ -2868,7 +2868,7 @@ dojo._gearsObject = function(){ // still nothing? if(!factory){ return null; } - + // define the global objects now; don't overwrite them though if they // were somehow set internally by the Gears plugin, which is on their // dev roadmap for the future @@ -2919,9 +2919,9 @@ dojo._fireCallback = function(callback, context, cbArguments){ return (context ? callback.apply(context, cbArguments || [ ]) : callback()); } -dojo.withGlobal = function( /*Object*/globalObject, - /*Function*/callback, - /*Object?*/thisObject, +dojo.withGlobal = function( /*Object*/globalObject, + /*Function*/callback, + /*Object?*/thisObject, /*Array?*/cbArguments){ // summary: // Call callback with globalObject as dojo.global and @@ -2942,9 +2942,9 @@ dojo.withGlobal = function( /*Object*/globalObject, return rval; } -dojo.withDoc = function( /*Object*/documentObject, - /*Function*/callback, - /*Object?*/thisObject, +dojo.withDoc = function( /*Object*/documentObject, + /*Function*/callback, + /*Object?*/thisObject, /*Array?*/cbArguments){ // summary: // Call callback with documentObject as dojo.doc. If provided, @@ -2988,7 +2988,7 @@ dojo.provide("dojo._base.event"); // DOM event listener machinery var del = dojo._event_listener = { add: function(/*DOMNode*/node, /*String*/name, /*Function*/fp){ - if(!node){return;} + if(!node){return;} name = del._normalizeEventName(name); fp = del._fixCallback(name, fp); @@ -3034,11 +3034,11 @@ dojo.provide("dojo._base.event"); // to revisit this optimization. // This also applies to _fixEvent overrides for Safari and Opera // below. - return (name!="keypress" ? fp : function(e){ return fp.call(this, del._fixEvent(e, this)); }); + return (name!="keypress" ? fp : function(e){ return fp.call(this, del._fixEvent(e, this)); }); }, _fixEvent: function(evt, sender){ // _fixCallback only attaches us to keypress. - // Switch on evt.type anyway because we might + // Switch on evt.type anyway because we might // be called directly from dojo.fixEvent. switch(evt.type){ case "keypress": @@ -3053,7 +3053,7 @@ dojo.provide("dojo._base.event"); }; // DOM events - + dojo.fixEvent = function(/*Event*/evt, /*DOMNode*/sender){ // summary: // normalizes properties on the event object including event @@ -3078,7 +3078,7 @@ dojo.provide("dojo._base.event"); // the default listener to use on dontFix nodes, overriden for IE var node_listener = dojo._listener; - + // Unify connect and event listeners dojo._connect = function(obj, event, context, method, dontFix){ // FIXME: need a more strict test @@ -3089,7 +3089,7 @@ dojo.provide("dojo._base.event"); // create a listener var h = l.add(obj, event, dojo.hitch(context, method)); // formerly, the disconnect package contained "l" directly, but if client code - // leaks the disconnect package (by connecting it to a node), referencing "l" + // leaks the disconnect package (by connecting it to a node), referencing "l" // compounds the problem. // instead we return a listener id, which requires custom _disconnect below. // return disconnect package @@ -3165,9 +3165,9 @@ dojo.provide("dojo._base.event"); NUM_LOCK: 144, SCROLL_LOCK: 145 }; - + // IE event normalization - if(dojo.isIE){ + if(dojo.isIE){ var _trySetKeyCode = function(e, code){ try{ // squelch errors when keyCode is read-only @@ -3184,7 +3184,7 @@ dojo.provide("dojo._base.event"); if(!djConfig._allow_leaks){ // custom listener that handles leak protection for DOM events node_listener = iel = dojo._ie_listener = { - // support handler indirection: event handler functions are + // support handler indirection: event handler functions are // referenced here. Event dispatchers hold only indices. handlers: [], // add a listener to an object @@ -3207,7 +3207,7 @@ dojo.provide("dojo._base.event"); var f = (source||dojo.global)[method], l = f&&f._listeners; if(f && l && handle--){ delete ieh[l[handle]]; - delete l[handle]; + delete l[handle]; } } }; @@ -3220,22 +3220,22 @@ dojo.provide("dojo._base.event"); if(!node){return;} // undefined event = del._normalizeEventName(event); if(event=="onkeypress"){ - // we need to listen to onkeydown to synthesize + // we need to listen to onkeydown to synthesize // keypress events that otherwise won't fire // on IE var kd = node.onkeydown; if(!kd||!kd._listeners||!kd._stealthKeydown){ // we simply ignore this connection when disconnecting - // because it's side-effects are harmless + // because it's side-effects are harmless del.add(node, "onkeydown", del._stealthKeyDown); // we only want one stealth listener per node node.onkeydown._stealthKeydown = true; - } + } } return iel.add(node, event, del._fixCallback(fp)); }, remove: function(/*DOMNode*/node, /*String*/event, /*Handle*/handle){ - iel.remove(node, del._normalizeEventName(event), handle); + iel.remove(node, del._normalizeEventName(event), handle); }, _normalizeEventName: function(/*String*/eventName){ // Generally, eventName should be lower case, unless it is @@ -3252,11 +3252,11 @@ dojo.provide("dojo._base.event"); // sender: node to treat as "currentTarget" if(!evt){ var w = (sender)&&((sender.ownerDocument || sender.document || sender).parentWindow)||window; - evt = w.event; + evt = w.event; } if(!evt){return(evt);} - evt.target = evt.srcElement; - evt.currentTarget = (sender || evt.srcElement); + evt.target = evt.srcElement; + evt.currentTarget = (sender || evt.srcElement); evt.layerX = evt.offsetX; evt.layerY = evt.offsetY; // FIXME: scroll position query is duped from dojo.html to @@ -3269,10 +3269,10 @@ dojo.provide("dojo._base.event"); var offset = dojo._getIeDocumentElementOffset(); evt.pageX = evt.clientX + dojo._fixIeBiDiScrollLeft(docBody.scrollLeft || 0) - offset.x; evt.pageY = evt.clientY + (docBody.scrollTop || 0) - offset.y; - if(evt.type == "mouseover"){ + if(evt.type == "mouseover"){ evt.relatedTarget = evt.fromElement; } - if(evt.type == "mouseout"){ + if(evt.type == "mouseout"){ evt.relatedTarget = evt.toElement; } evt.stopPropagation = del._stopPropagation; @@ -3303,20 +3303,20 @@ dojo.provide("dojo._base.event"); // some ctrl-key combinations (mostly w/punctuation) do not emit a char code in IE // we map those virtual key codes to ascii here // not valid for all (non-US) keyboards, so maybe we shouldn't bother - _punctMap: { - 106:42, - 111:47, - 186:59, - 187:43, - 188:44, - 189:45, - 190:46, - 191:47, - 192:96, - 219:91, - 220:92, - 221:93, - 222:39 + _punctMap: { + 106:42, + 111:47, + 186:59, + 187:43, + 188:44, + 189:45, + 190:46, + 191:47, + 192:96, + 219:91, + 220:92, + 221:93, + 222:39 }, _stealthKeyDown: function(evt){ // IE doesn't fire keypress for most non-printable characters. @@ -3334,12 +3334,12 @@ dojo.provide("dojo._base.event"); var c = (unprintable ? 0 : k); if(evt.ctrlKey){ if(k==3 || k==13){ - return; // IE will post CTRL-BREAK, CTRL-ENTER as keypress natively - }else if(c>95 && c<106){ + return; // IE will post CTRL-BREAK, CTRL-ENTER as keypress natively + }else if(c>95 && c<106){ c -= 48; // map CTRL-[numpad 0-9] to ASCII - }else if((!evt.shiftKey)&&(c>=65&&c<=90)){ + }else if((!evt.shiftKey)&&(c>=65&&c<=90)){ c += 32; // map CTRL-[A-Z] to lowercase - }else{ + }else{ c = del._punctMap[c] || c; // map other problematic CTRL combinations to ASCII } } @@ -3353,13 +3353,13 @@ dojo.provide("dojo._base.event"); }, // Called in Event scope _stopPropagation: function(){ - this.cancelBubble = true; + this.cancelBubble = true; }, _preventDefault: function(){ // Setting keyCode to 0 is the only way to prevent certain keypresses (namely // ctrl-combinations that correspond to menu accelerator keys). // Otoh, it prevents upstream listeners from getting this information - // Try to split the difference here by clobbering keyCode only for ctrl + // Try to split the difference here by clobbering keyCode only for ctrl // combinations. If you still need to access the key upstream, bubbledKeyCode is // provided as a workaround. this.bubbledKeyCode = this.keyCode; @@ -3367,7 +3367,7 @@ dojo.provide("dojo._base.event"); this.returnValue = false; } }); - + // override stopEvent for IE dojo.stopEvent = function(evt){ evt = evt || window.event; @@ -3379,14 +3379,14 @@ dojo.provide("dojo._base.event"); del._synthesizeEvent = function(evt, props){ var faux = dojo.mixin({}, evt, props); del._setKeyChar(faux); - // FIXME: would prefer to use dojo.hitch: dojo.hitch(evt, evt.preventDefault); + // FIXME: would prefer to use dojo.hitch: dojo.hitch(evt, evt.preventDefault); // but it throws an error when preventDefault is invoked on Safari // does Event.preventDefault not support "apply" on Safari? - faux.preventDefault = function(){ evt.preventDefault(); }; - faux.stopPropagation = function(){ evt.stopPropagation(); }; + faux.preventDefault = function(){ evt.preventDefault(); }; + faux.stopPropagation = function(){ evt.stopPropagation(); }; return faux; } - + // Opera event normalization if(dojo.isOpera){ dojo.mixin(del, { @@ -3436,7 +3436,7 @@ dojo.provide("dojo._base.event"); return evt; } }); - + dojo.mixin(dojo.keys, { SHIFT_TAB: 25, UP_ARROW: 63232, @@ -3466,7 +3466,7 @@ dojo.provide("dojo._base.event"); SCROLL_LOCK: 63249, NUM_LOCK: 63289 }); - var dk = dojo.keys, identifierMap = { "Up": dk.UP_ARROW, "Down": dk.DOWN_ARROW, "Left": dk.LEFT_ARROW, "Right": dk.RIGHT_ARROW, "PageUp": dk.PAGE_UP, "PageDown": dk.PAGE_DOWN }; + var dk = dojo.keys, identifierMap = { "Up": dk.UP_ARROW, "Down": dk.DOWN_ARROW, "Left": dk.LEFT_ARROW, "Right": dk.RIGHT_ARROW, "PageUp": dk.PAGE_UP, "PageDown": dk.PAGE_DOWN }; } })(); @@ -3535,7 +3535,7 @@ if(dojo.isIE || dojo.isOpera){ if(dojo.isString(id)){ var _d = doc || dojo.doc; var te = _d.getElementById(id); - // attributes.id.value is better than just id in case the + // attributes.id.value is better than just id in case the // user has a name=id inside a form if(te && te.attributes.id.value == id){ return te; @@ -3588,7 +3588,7 @@ if(dojo.isIE || dojo.isOpera){ } _destroyContainer.appendChild(node.parentNode ? node.parentNode.removeChild(node) : node); // NOTE: see http://trac.dojotoolkit.org/ticket/2931. This may be a bug and not a feature - _destroyContainer.innerHTML = ""; + _destroyContainer.innerHTML = ""; }catch(e){ /* squelch */ } @@ -3651,9 +3651,9 @@ if(dojo.isIE || dojo.isOpera){ dojo.place = function(/*String|DomNode*/node, /*String|DomNode*/refNode, /*String|Number*/position){ // summary: // attempt to insert node in relation to ref based on position - // node: + // node: // id or reference to node to place relative to refNode - // refNode: + // refNode: // id or reference of node to use as basis for placement // position: // string noting the position of node relative to refNode or a @@ -3666,8 +3666,8 @@ if(dojo.isIE || dojo.isOpera){ // "first" and "last" indicate positions as children of refNode. // FIXME: need to write tests for this!!!! - if(!node || !refNode || position === undefined){ - return false; // boolean + if(!node || !refNode || position === undefined){ + return false; // boolean } node = dojo.byId(node); refNode = dojo.byId(refNode); @@ -3704,14 +3704,14 @@ if(dojo.isIE || dojo.isOpera){ // Box functions will assume this model. // On IE/Opera, BORDER_BOX will be set if the primary document is in quirks mode. // Can be set to change behavior of box setters. - + // can be either: // "border-box" // "content-box" (default) dojo.boxModel = "content-box"; - + // We punt per-node box mode testing completely. - // If anybody cares, we can provide an additional (optional) unit + // If anybody cares, we can provide an additional (optional) unit // that overrides existing code to include per-node box sensitivity. // Opera documentation claims that Opera 9 uses border-box in BackCompat mode. @@ -3728,17 +3728,17 @@ if(dojo.isIE || dojo.isOpera){ // ============================= // Style Functions // ============================= - + // getComputedStyle drives most of the style code. // Wherever possible, reuse the returned object. // - // API functions below that need to access computed styles accept an + // API functions below that need to access computed styles accept an // optional computedStyle parameter. // // If this parameter is omitted, the functions will call getComputedStyle themselves. // - // This way, calling code can access computedStyle once, and then pass the reference to - // multiple API functions. + // This way, calling code can access computedStyle once, and then pass the reference to + // multiple API functions. // // This is a faux declaration to take pity on the doc tool @@ -3748,11 +3748,11 @@ if(dojo.isIE || dojo.isOpera){ // Returns a "computed style" object. // description: // get "computed style" object which can be used to gather - // information about the current state of the rendered node. + // information about the current state of the rendered node. // // Note that this may behave differently on different browsers. // Values may have different formats and value encodings across - // browsers. + // browsers. // // Use the dojo.style() method for more consistent (pixelized) // return values. @@ -3769,12 +3769,12 @@ if(dojo.isIE || dojo.isOpera){ if(dojo.isSafari){ gcs = function(/*DomNode*/node){ var s = dv.getComputedStyle(node, null); - if(!s && node.style){ - node.style.display = ""; + if(!s && node.style){ + node.style.display = ""; s = dv.getComputedStyle(node, null); } return s || {}; - }; + }; }else if(dojo.isIE){ gcs = function(node){ return node.currentStyle; @@ -3790,7 +3790,7 @@ if(dojo.isIE || dojo.isOpera){ dojo._toPixelValue = function(element, value){ // style values can be floats, client code may want // to round for integer pixels. - return parseFloat(value) || 0; + return parseFloat(value) || 0; } }else{ dojo._toPixelValue = function(element, avalue){ @@ -3916,7 +3916,7 @@ if(dojo.isIE || dojo.isOpera){ } // public API - + dojo.style = function(/*DomNode|String*/ node, /*String*/style, /*String?*/value){ // summary: // gets or sets a style property on node. If 2 arguments are @@ -3950,18 +3950,18 @@ if(dojo.isIE || dojo.isOpera){ // Returns object with special values specifically useful for node // fitting. // l/t = left/top padding (respectively) - // w = the total of the left and right padding + // w = the total of the left and right padding // h = the total of the top and bottom padding - // If 'node' has position, l/t forms the origin for child nodes. + // If 'node' has position, l/t forms the origin for child nodes. // The w/h are used for calculating boxes. // Normally application code will not need to invoke this // directly, and will use the ...box... functions instead. - var - s=computedStyle||gcs(n), + var + s=computedStyle||gcs(n), px=dojo._toPixelValue, - l=px(n, s.paddingLeft), + l=px(n, s.paddingLeft), t=px(n, s.paddingTop); - return { + return { l: l, t: t, w: l+px(n, s.paddingRight), @@ -3979,13 +3979,13 @@ if(dojo.isIE || dojo.isOpera){ // The w/h are used for calculating boxes. // Normally application code will not need to invoke this // directly, and will use the ...box... functions instead. - var + var ne='none', - px=dojo._toPixelValue, - s=computedStyle||gcs(n), + px=dojo._toPixelValue, + s=computedStyle||gcs(n), bl=(s.borderLeftStyle!=ne ? px(n, s.borderLeftWidth) : 0), bt=(s.borderTopStyle!=ne ? px(n, s.borderTopWidth) : 0); - return { + return { l: bl, t: bt, w: bl + (s.borderRightStyle!=ne ? px(n, s.borderRightWidth) : 0), @@ -4003,11 +4003,11 @@ if(dojo.isIE || dojo.isOpera){ // The w/h are used for calculating boxes. // Normally application code will not need to invoke this // directly, and will use the ...box... functions instead. - var - s=computedStyle||gcs(n), + var + s=computedStyle||gcs(n), p=dojo._getPadExtents(n, s), b=dojo._getBorderExtents(n, s); - return { + return { l: p.l + b.l, t: p.t + b.t, w: p.w + b.w, @@ -4025,8 +4025,8 @@ if(dojo.isIE || dojo.isOpera){ // The w/h are used for calculating boxes. // Normally application code will not need to invoke this // directly, and will use the ...box... functions instead. - var - s=computedStyle||gcs(n), + var + s=computedStyle||gcs(n), px=dojo._toPixelValue, l=px(n, s.marginLeft), t=px(n, s.marginTop), @@ -4034,14 +4034,14 @@ if(dojo.isIE || dojo.isOpera){ b=px(n, s.marginBottom); if (dojo.isSafari && (s.position != "absolute")){ // FIXME: Safari's version of the computed right margin - // is the space between our right edge and the right edge - // of our offsetParent. - // What we are looking for is the actual margin value as + // is the space between our right edge and the right edge + // of our offsetParent. + // What we are looking for is the actual margin value as // determined by CSS. // Hack solution is to assume left/right margins are the same. r = l; } - return { + return { l: l, t: t, w: l+r, @@ -4055,15 +4055,15 @@ if(dojo.isIE || dojo.isOpera){ // They do *not* work for display: inline objects that have padding styles // because the user agent ignores padding (it's bogus styling in any case) // - // Be careful with IMGs because they are inline or block depending on + // Be careful with IMGs because they are inline or block depending on // browser and browser mode. - // Although it would be easier to read, there are not separate versions of + // Although it would be easier to read, there are not separate versions of // _getMarginBox for each browser because: // 1. the branching is not expensive // 2. factoring the shared code wastes cycles (function call overhead) // 3. duplicating the shared code wastes bytes - + dojo._getMarginBox = function(/*DomNode*/node, /*Object*/computedStyle){ // summary: // returns an object that encodes the width, height, left and top @@ -4099,14 +4099,14 @@ if(dojo.isIE || dojo.isOpera){ l -= be.l, t -= be.t; } } - return { - l: l, - t: t, - w: node.offsetWidth + me.w, - h: node.offsetHeight + me.h + return { + l: l, + t: t, + w: node.offsetWidth + me.w, + h: node.offsetHeight + me.h }; } - + dojo._getContentBox = function(node, computedStyle){ // summary: // Returns an object that encodes the width, height, left and top @@ -4119,24 +4119,24 @@ if(dojo.isIE || dojo.isOpera){ if(!w){ w=node.offsetWidth, h=node.offsetHeight; }else{ - h=node.clientHeight, be.w = be.h = 0; + h=node.clientHeight, be.w = be.h = 0; } // On Opera, offsetLeft includes the parent's border if(dojo.isOpera){ pe.l += be.l; pe.t += be.t; }; - return { - l: pe.l, - t: pe.t, - w: w - pe.w - be.w, + return { + l: pe.l, + t: pe.t, + w: w - pe.w - be.w, h: h - pe.h - be.h }; } dojo._getBorderBox = function(node, computedStyle){ var s=computedStyle||gcs(node), pe=dojo._getPadExtents(node, s), cb=dojo._getContentBox(node, s); - return { - l: cb.l - pe.l, - t: cb.t - pe.t, - w: cb.w + pe.w, + return { + l: cb.l - pe.l, + t: cb.t - pe.t, + w: cb.w + pe.w, h: cb.h + pe.h }; } @@ -4150,14 +4150,14 @@ if(dojo.isIE || dojo.isOpera){ // Beware of display: inline objects that have padding styles // because the user agent ignores padding (it's a bogus setup anyway) // - // Be careful with IMGs because they are inline or block depending on + // Be careful with IMGs because they are inline or block depending on // browser and browser mode. - // + // // Elements other than DIV may have special quirks, like built-in // margins or padding, or values not detectable via computedStyle. - // In particular, margins on TABLE do not seems to appear + // In particular, margins on TABLE do not seems to appear // at all in computedStyle on Mozilla. - + dojo._setBox = function(/*DomNode*/node, /*Number?*/l, /*Number?*/t, /*Number?*/w, /*Number?*/h, /*String?*/u){ // summary: // sets width/height/left/top in the current (native) box-model @@ -4178,7 +4178,7 @@ if(dojo.isIE || dojo.isOpera){ } dojo._usesBorderBox = function(/*DomNode*/node){ - // summary: + // summary: // True if the node uses border-box layout. // We could test the computed style of node to see if a particular box @@ -4203,8 +4203,8 @@ if(dojo.isIE || dojo.isOpera){ dojo._setBox(node, NaN, NaN, widthPx, heightPx); } - dojo._setMarginBox = function(/*DomNode*/node, /*Number?*/leftPx, /*Number?*/topPx, - /*Number?*/widthPx, /*Number?*/heightPx, + dojo._setMarginBox = function(/*DomNode*/node, /*Number?*/leftPx, /*Number?*/topPx, + /*Number?*/widthPx, /*Number?*/heightPx, /*Object*/computedStyle){ // summary: // sets the size of the node's margin box and palcement @@ -4213,7 +4213,7 @@ if(dojo.isIE || dojo.isOpera){ // you. var s = computedStyle || dojo.getComputedStyle(node); - // Some elements have special padding, margin, and box-model settings. + // Some elements have special padding, margin, and box-model settings. // To use box functions you may need to set padding, margin explicitly. // Controlling box-model is harder, in a pinch you might set dojo.boxModel. var bb=dojo._usesBorderBox(node), @@ -4223,15 +4223,15 @@ if(dojo.isIE || dojo.isOpera){ if(heightPx>=0){ heightPx = Math.max(heightPx - pb.h - mb.h, 0); } dojo._setBox(node, leftPx, topPx, widthPx, heightPx); } - + var _nilExtents = { l:0, t:0, w:0, h:0 }; // public API - + dojo.marginBox = function(/*DomNode|String*/node, /*Object?*/box){ // summary: // getter/setter for the margin-box of node. - // description: + // description: // Returns an object in the expected format of box (regardless // if box is passed). The object might look like: // { l: 50, t: 200, w: 300: h: 150 } @@ -4269,11 +4269,11 @@ if(dojo.isIE || dojo.isOpera){ var n=dojo.byId(node), s=gcs(n), b=box; return !b ? dojo._getContentBox(n, s) : dojo._setContentSize(n, b.w, b.h, s); // Object } - + // ============================= - // Positioning + // Positioning // ============================= - + var _sumAncestorProperties = function(node, prop){ if(!(node = (node||0).parentNode)){return 0}; var val, retVal = 0, _b = dojo.body(); @@ -4302,19 +4302,19 @@ if(dojo.isIE || dojo.isOpera){ x: (_w.pageXOffset || dojo._fixIeBiDiScrollLeft(de.scrollLeft) || _b.scrollLeft || 0) }; }; - + dojo._isBodyLtr = function(){ //FIXME: could check html and body tags directly instead of computed style? need to ignore case, accept empty values - return !("_bodyLtr" in dojo) ? + return !("_bodyLtr" in dojo) ? dojo._bodyLtr = dojo.getComputedStyle(dojo.body()).direction == "ltr" : - dojo._bodyLtr; // Boolean + dojo._bodyLtr; // Boolean } - + dojo._getIeDocumentElementOffset = function(){ // summary // The following values in IE contain an offset: - // event.clientX - // event.clientY + // event.clientX + // event.clientY // node.getBoundingClientRect().left // node.getBoundingClientRect().top // But other position related values do not contain this offset, such as @@ -4331,13 +4331,13 @@ if(dojo.isIE || dojo.isOpera){ }else{ // IE 6.0 return {x: dojo._isBodyLtr() || window.parent == window ? - de.clientLeft : de.offsetWidth - de.clientWidth - de.clientLeft, + de.clientLeft : de.offsetWidth - de.clientWidth - de.clientLeft, y: de.clientTop}; // Object } }; - + dojo._fixIeBiDiScrollLeft = function(/*Integer*/ scrollLeft){ - // In RTL direction, scrollLeft should be a negative value, but IE + // In RTL direction, scrollLeft should be a negative value, but IE // returns a positive one. All codes using documentElement.scrollLeft // must call this function to fix this error, otherwise the position // will offset to right when there is a horizonal scrollbar. @@ -4347,7 +4347,7 @@ if(dojo.isIE || dojo.isOpera){ } return scrollLeft; // Integer } - + dojo._abs = function(/*DomNode*/node, /*Boolean?*/includeScroll){ // summary: // Gets the absolute position of the passed element based on the @@ -4404,8 +4404,8 @@ if(dojo.isIE || dojo.isOpera){ var curnode = node; do{ var n = curnode["offsetLeft"]; - //FIXME: ugly hack to workaround the submenu in - //popupmenu2 does not shown up correctly in opera. + //FIXME: ugly hack to workaround the submenu in + //popupmenu2 does not shown up correctly in opera. //Someone have a better workaround? if(!dojo.isOpera || n>0){ ret.x += isNaN(n) ? 0 : n; @@ -4456,7 +4456,7 @@ if(dojo.isIE || dojo.isOpera){ dojo.hasClass = function(/*DomNode|String*/node, /*String*/classStr){ // summary: // Returns whether or not the specified classes are a portion of the - // class list currently applied to the node. + // class list currently applied to the node. return ((" "+dojo.byId(node).className+" ").indexOf(" "+classStr+" ") >= 0); // Boolean }; @@ -4479,7 +4479,7 @@ dojo.removeClass = function(/*DomNode|String*/node, /*String*/classStr){ }; dojo.toggleClass = function(/*DomNode|String*/node, /*String*/classStr, /*Boolean?*/condition){ - // summary: + // summary: // Adds a class to node if not present, or removes if present. // Pass a boolean condition if you want to explicitly add or remove. // condition: @@ -4510,8 +4510,8 @@ dojo.provide("dojo._base.NodeList"); dojo.NodeList = function(){ // summary: - // dojo.NodeList is as subclass of Array which adds syntactic - // sugar for chaining, common iteration operations, animation, + // dojo.NodeList is as subclass of Array which adds syntactic + // sugar for chaining, common iteration operations, animation, // and node manipulation. NodeLists are most often returned as // the result of dojo.query() calls. // example: @@ -4528,7 +4528,7 @@ dojo.provide("dojo._base.NodeList"); // FIXME: handle return values for #3244 // http://trac.dojotoolkit.org/ticket/3244 - + // FIXME: // need to wrap or implement: // join (perhaps w/ innerHTML/outerHTML overload for toString() of items?) @@ -4601,10 +4601,10 @@ dojo.provide("dojo._base.NodeList"); var a = dojo._toArray(arguments, 0, [this]); return tnl(a.concat.apply([], a)); }, - + indexOf: function(/*Object*/ value, /*Integer?*/ fromIndex){ // summary: - // see dojo.indexOf(). The primary difference is that the acted-on + // see dojo.indexOf(). The primary difference is that the acted-on // array is implicitly this NodeList // value: // The value to search for. @@ -4665,7 +4665,7 @@ dojo.provide("dojo._base.NodeList"); forEach: function(callback, thisObj){ // summary: - // see dojo.forEach(). The primary difference is that the acted-on + // see dojo.forEach(). The primary difference is that the acted-on // array is implicitly this NodeList d.forEach(this, callback, thisObj); @@ -4673,12 +4673,12 @@ dojo.provide("dojo._base.NodeList"); }, // custom methods - + coords: function(){ // summary: // Returns the box objects all elements in a node list as // an Array (*not* a NodeList) - + return d.map(this, d.coords); }, @@ -4687,7 +4687,7 @@ dojo.provide("dojo._base.NodeList"); // gets or sets the CSS property for every element in the NodeList // property: String // the CSS property to get/set, in JavaScript notation - // ("lineHieght" instead of "line-height") + // ("lineHieght" instead of "line-height") // value: String? // optional. The value to set the property to // return: @@ -4708,7 +4708,7 @@ dojo.provide("dojo._base.NodeList"); // in the NodeList // property: String // the CSS property to get/set, in JavaScript notation - // ("lineHieght" instead of "line-height") + // ("lineHieght" instead of "line-height") // value: String? // optional. The value to set the property to // return: @@ -4739,7 +4739,7 @@ dojo.provide("dojo._base.NodeList"); // by queryOrNode. Returns the original NodeList. // queryOrNode: // may be a string representing any valid CSS3 selector or a DOM node. - // In the selector case, only the first matching element will be used + // In the selector case, only the first matching element will be used // for relative positioning. // position: // can be one of: @@ -4768,7 +4768,7 @@ dojo.provide("dojo._base.NodeList"); // if 2 arguments are passed (methodName, objOrFunc), objOrFunc should // reference a function or be the name of the function in the global // namespace to attach. If 3 arguments are provided - // (methodName, objOrFunc, funcName), objOrFunc must be the scope to + // (methodName, objOrFunc, funcName), objOrFunc must be the scope to // locate the bound function in // funcName: // optional. A string naming the function in objOrFunc to bind to the @@ -4862,9 +4862,9 @@ dojo.provide("dojo._base.NodeList"); var items = this; var _a = arguments; var r = d.NodeList(); - var rp = function(t){ + var rp = function(t){ if(typeof t != "undefined"){ - r.push(t); + r.push(t); } } if(d.isString(simpleQuery)){ @@ -4882,7 +4882,7 @@ dojo.provide("dojo._base.NodeList"); return r; // dojo.NodeList }, - + /* // FIXME: should this be "copyTo" and include parenting info? clone: function(){ @@ -4894,7 +4894,7 @@ dojo.provide("dojo._base.NodeList"); addContent: function(/*String*/ content, /*String||Integer?*/ position){ // summary: - // add a node or some HTML as a string to every item in the list. + // add a node or some HTML as a string to every item in the list. // Returns the original list. // content: // the HTML in string format to add at position to every item @@ -4933,8 +4933,8 @@ dojo.provide("dojo._base.NodeList"); } // FIXME: should these events trigger publishes? /* - return (a ? this.connect(_oe, a, b) : - this.forEach(function(n){ + return (a ? this.connect(_oe, a, b) : + this.forEach(function(n){ // FIXME: // listeners get buried by // addEventListener and can't be dug back @@ -4972,7 +4972,7 @@ dojo.provide("dojo._base.query"); designed to take any valid CSS3 selector and return the nodes matching the selector. To do this quickly, it processes queries in several steps, applying caching where profitable. - + The steps (roughly in reverse order of the way they appear in the code): 1.) check to see if we already have a "query dispatcher" - if so, use that with the given parameterization. Skip to step 4. @@ -5024,7 +5024,7 @@ dojo.provide("dojo._base.query"); } // the overall data graph of the full query, as represented by queryPart objects - var qparts = []; + var qparts = []; // state keeping vars var inBrackets = -1; var inParens = -1; @@ -5135,8 +5135,8 @@ dojo.provide("dojo._base.query"); }; }else if(cc == "("){ if(inPseudo >= 0){ - _cp = { - name: ts(inPseudo+1, x), + _cp = { + name: ts(inPseudo+1, x), value: null } currentPart.pseudos.push(_cp); @@ -5148,9 +5148,9 @@ dojo.provide("dojo._base.query"); if(inPseudo >= 0){ currentPart.pseudos.push({ name: ts(inPseudo+1, x) }); } - currentPart.hasLoops = ( - currentPart.pseudos.length || - currentPart.attrs.length || + currentPart.hasLoops = ( + currentPart.pseudos.length || + currentPart.attrs.length || currentPart.classes.length ); currentPart.query = ts(pStart, x); currentPart.tag = (currentPart["oper"]) ? null : (currentPart.tag || "*"); @@ -5160,7 +5160,7 @@ dojo.provide("dojo._base.query"); } return qparts; }; - + //////////////////////////////////////////////////////////////////////// // XPath query code @@ -5195,9 +5195,9 @@ dojo.provide("dojo._base.query"); // matching function that generates whatever type of yes/no distinguisher // the query method needs. The method is a bit tortured and hard to read // because it needs to be used in both the XPath and DOM branches. - var handleAttrs = function( attrList, - query, - getDefault, + var handleAttrs = function( attrList, + query, + getDefault, handleMatch){ d.forEach(query.attrs, function(attr){ var matcher; @@ -5230,7 +5230,7 @@ dojo.provide("dojo._base.query"); // get the tag name (if any) xpath += prefix + tqp.tag; - + // check to see if it's got an id. Needs to come first in xpath. if(tqp.id){ xpath += "[@id='"+tqp.id+"'][1]"; @@ -5242,12 +5242,12 @@ dojo.provide("dojo._base.query"); if(cn.charAt(cnl-1) == "*"){ padding = ""; cn = cn.substr(0, cnl-1); } - xpath += + xpath += "[contains(concat(' ',@class,' '), ' "+ cn + padding + "')]"; }); - handleAttrs(xPathAttrs, tqp, + handleAttrs(xPathAttrs, tqp, function(condition){ return "[@"+condition+"]"; }, @@ -5277,7 +5277,7 @@ dojo.provide("dojo._base.query"); var ret = []; var xpathResult; try{ - xpathResult = doc.evaluate(xpath, parent, null, + xpathResult = doc.evaluate(xpath, parent, null, // XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null); XPathResult.ANY_TYPE, null); }catch(e){ @@ -5298,7 +5298,7 @@ dojo.provide("dojo._base.query"); d.xPathMatch = function(query){ // XPath based DOM query system. Handles a small subset of CSS // selectors, subset is identical to the non-XPath version of this - // function. + // function. // FIXME: need to add support for alternate roots return getXPathFunc(query)(); @@ -5396,14 +5396,14 @@ dojo.provide("dojo._base.query"); // does it have a tagName component? if(q.tag){ if(q.tag == "*"){ - ff = agree(ff, + ff = agree(ff, function(elem){ return (elem.nodeType == 1); } ); }else{ // tag name match - ff = agree(ff, + ff = agree(ff, function(elem){ return ( (elem.nodeType == 1) && @@ -5417,7 +5417,7 @@ dojo.provide("dojo._base.query"); // does the node have an ID? if(q.id){ - ff = agree(ff, + ff = agree(ff, function(elem){ return ( (elem.nodeType == 1) && @@ -5437,7 +5437,7 @@ dojo.provide("dojo._base.query"); } var getNodeIndex = function(node){ - // NOTE: + // NOTE: // we could have a more accurate caching mechanism by invalidating // caches after the query has finished, but I think that'd lead to // significantly more cache churn than the cache would provide @@ -5482,7 +5482,7 @@ dojo.provide("dojo._base.query"); child = child.nextSibling; }while(child); }else{ - // NOTE: + // NOTE: // could be incorrect in some cases (node swaps involving the // passed node, etc.), but we ignore those due to the relative // unlikelihood of that occuring @@ -5522,7 +5522,7 @@ dojo.provide("dojo._base.query"); } }, "$=": function(attr, value){ - // E[foo$="bar"] + // E[foo$="bar"] // an E element whose "foo" attribute value ends exactly // with the string "bar" var tval = " "+value; @@ -5532,7 +5532,7 @@ dojo.provide("dojo._base.query"); } }, "~=": function(attr, value){ - // E[foo~="bar"] + // E[foo~="bar"] // an E element whose "foo" attribute value is a list of // space-separated values, one of which is exactly equal // to "bar" @@ -5782,10 +5782,10 @@ dojo.provide("dojo._base.query"); // "div.foo .bar") into simple query expressions (e.g., ["div.foo", // ".bar"]) var _queryFuncCache = { - "*": d.isIE ? - function(root){ + "*": d.isIE ? + function(root){ return root.all; - } : + } : function(root){ return root.getElementsByTagName("*"); }, @@ -5827,15 +5827,15 @@ dojo.provide("dojo._base.query"); // a specialized method that implements our primoridal "query optimizer". // This allows us to dispatch queries to the fastest subsystem we can get. var _getQueryFunc = ( - // NOTE: + // NOTE: // XPath on the Webkit nighlies is slower than it's DOM iteration // for most test cases - // FIXME: + // FIXME: // we should try to capture some runtime speed data for each query // function to determine on the fly if we should stick w/ the // potentially optimized variant or if we should try something // new. - (document["evaluate"] && !d.isSafari) ? + (document["evaluate"] && !d.isSafari) ? function(query){ // has xpath support that's faster than DOM var qparts = query.split(" "); @@ -5852,7 +5852,7 @@ dojo.provide("dojo._base.query"); // should we handle it? // kind of a lame heuristic, but it works - if( + if( // a "div div div" style query ((qparts.length > 2)&&(query.indexOf(">") == -1))|| // or something else with moderate complexity. kinda janky @@ -5908,7 +5908,7 @@ dojo.provide("dojo._base.query"); } } - // FIXME: + // FIXME: // Dean's new Base2 uses a system whereby queries themselves note if // they'll need duplicate filtering. We need to get on that plan!! @@ -5926,7 +5926,7 @@ dojo.provide("dojo._base.query"); _zipIdx++; arr[0]["_zipIdx"] = _zipIdx; for(var x=1, te; te = arr[x]; x++){ - if(arr[x]["_zipIdx"] != _zipIdx){ + if(arr[x]["_zipIdx"] != _zipIdx){ ret.push(te); } te["_zipIdx"] = _zipIdx; @@ -5956,7 +5956,7 @@ dojo.provide("dojo._base.query"); // * class selectors (e.g., ".foo") // * node type selectors like "span" // * " " descendant selectors - // * ">" child element selectors + // * ">" child element selectors // * "#foo" style ID selectors // * "*" universal selector // * attribute queries: @@ -5977,14 +5977,14 @@ dojo.provide("dojo._base.query"); // with this palette of selectors and when combined with functions for // maniplation presented by dojo.NodeList, many types of DOM // manipulation operations become very straightforward. - // + // // Unsupported Selectors: // -------------------- // // While dojo.query handles many CSS3 selectors, some fall outside of // what's resaonable for a programmatic node querying engine to // handle. Currently unsupported selectors include: - // + // // * namespace-differentiated selectors of any form // * "~", the immediately preceeded-by sibling selector // * "+", the preceeded-by sibling selector @@ -5994,11 +5994,11 @@ dojo.provide("dojo._base.query"); // * all visual and state selectors: // * :root, :active, :hover, :visisted, :link, :enabled, :disabled, :checked // * :*-of-type pseudo selectors - // + // // dojo.query and XML Documents: // ----------------------------- // FIXME - // + // // query: String // The CSS3 expression to match against. For details on the syntax of // CSS3 selectors, see: @@ -6094,14 +6094,14 @@ dojo.provide("dojo._base.xhr"); // yields this object structure as the result of a call to // formToObject(): // - // { + // { // blah: "blah", // multi: [ // "thud", // "thonk" // ] // }; - + var ret = {}; var iq = "input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button]), select, textarea"; _d.query(iq, formNode).filter(function(node){ @@ -6118,7 +6118,7 @@ dojo.provide("dojo._base.xhr"); setValue(ret, _in, opt.value); } }); - }else{ + }else{ setValue(ret, _in, item.value); if(type == "image"){ ret[_in+".x"] = ret[_in+".y"] = ret[_in].x = ret[_in].y = 0; @@ -6135,7 +6135,7 @@ dojo.provide("dojo._base.xhr"); // example: // this object: // - // | { + // | { // | blah: "blah", // | multi: [ // | "thud", @@ -6144,7 +6144,7 @@ dojo.provide("dojo._base.xhr"); // | }; // // yeilds the following query string: - // + // // | "blah=blah&multi=thud&multi=thonk" @@ -6191,7 +6191,7 @@ dojo.provide("dojo._base.xhr"); // This string: // // "foo=bar&foo=baz&thinger=%20spaces%20=blah&zonk=blarg&" - // + // // returns this object structure: // // { @@ -6199,7 +6199,7 @@ dojo.provide("dojo._base.xhr"); // thinger: " spaces =blah", // zonk: "blarg" // } - // + // // Note that spaces and other urlencoded entities are correctly // handled. @@ -6237,13 +6237,13 @@ dojo.provide("dojo._base.xhr"); // every IO API timeout: 1000, // milliseconds handleAs: "text", // replaces the always-wrong "mimetype" - content: { + content: { key: "value" }, // browser-specific, MAY be unsupported sync: true, // defaults to false - form: dojo.byId("someForm") + form: dojo.byId("someForm") } */ @@ -6263,7 +6263,7 @@ dojo.provide("dojo._base.xhr"); } return _d.fromJson(xhr.responseText); }, - "json-comment-filtered": function(xhr){ + "json-comment-filtered": function(xhr){ // NOTE: we provide the json-comment-filtered option as one solution to // the "JavaScript Hijacking" issue noted by Fortify and others. It is // not appropriate for all circumstances. @@ -6276,11 +6276,11 @@ dojo.provide("dojo._base.xhr"); } return _d.fromJson(value.substring(cStartIdx+2, cEndIdx)); }, - "javascript": function(xhr){ + "javascript": function(xhr){ // FIXME: try Moz and IE specific eval variants? return _d.eval(xhr.responseText); }, - "xml": function(xhr){ + "xml": function(xhr){ if(_d.isIE && !xhr.responseXML){ _d.forEach(["MSXML2", "Microsoft", "MSXML", "MSXML3"], function(i){ try{ @@ -6334,13 +6334,13 @@ dojo.provide("dojo._base.xhr"); // error: Function? // function(response, ioArgs){}. response is an Object, ioArgs // is of type dojo.__ioCallbackArgs. The error function will - // be called in an error case. + // be called in an error case. // handle: Function // function(response, ioArgs){}. response is an Object, ioArgs // is of type dojo.__ioCallbackArgs. The handle function will // be called in either the successful or error case. For // the load, error and handle functions, the ioArgs object - // will contain the following properties: + // will contain the following properties: } =====*/ @@ -6388,7 +6388,7 @@ dojo.provide("dojo._base.xhr"); /*Function*/canceller, /*Function*/okHandler, /*Function*/errHandler){ - // summary: + // summary: // sets up the Deferred and ioArgs property on the Deferred so it // can be used in an io call. // args: @@ -6404,25 +6404,25 @@ dojo.provide("dojo._base.xhr"); // object returned from this function. // errHandler: // The first error callback to be registered with Deferred. It has the opportunity - // to do cleanup on an error. It will receive two arguments: error (the + // to do cleanup on an error. It will receive two arguments: error (the // Error object) and dfd, the Deferred object returned from this function. var ioArgs = {args: args, url: args.url}; //Get values from form if requestd. var formObject = null; - if(args.form){ + if(args.form){ var form = _d.byId(args.form); - //IE requires going through getAttributeNode instead of just getAttribute in some form cases, + //IE requires going through getAttributeNode instead of just getAttribute in some form cases, //so use it for all. See #2844 var actnNode = form.getAttributeNode("action"); - ioArgs.url = ioArgs.url || (actnNode ? actnNode.value : null); + ioArgs.url = ioArgs.url || (actnNode ? actnNode.value : null); formObject = _d.formToObject(form); } // set up the query params var miArgs = [{}]; - + if(formObject){ // potentially over-ride url-provided params w/ form values miArgs.push(formObject); @@ -6435,7 +6435,7 @@ dojo.provide("dojo._base.xhr"); miArgs.push({"dojo.preventCache": new Date().valueOf()}); } ioArgs.query = _d.objectToQuery(_d.mixin.apply(null, miArgs)); - + // .. and the real work of getting the deferred in order, etc. ioArgs.handleAs = args.handleAs || "text"; var d = new _d.Deferred(canceller); @@ -6465,9 +6465,9 @@ dojo.provide("dojo._base.xhr"); return handle.call(args, value, ioArgs); }); } - + d.ioArgs = ioArgs; - + // FIXME: need to wire up the xhr object's abort method to something // analagous in the Deferred return d; @@ -6475,7 +6475,7 @@ dojo.provide("dojo._base.xhr"); var _deferredCancel = function(/*Deferred*/dfd){ //summary: canceller function for dojo._ioSetArgs call. - + dfd.canceled = true; var xhr = dfd.ioArgs.xhr; var _at = (typeof xhr.abort); @@ -6493,7 +6493,7 @@ dojo.provide("dojo._base.xhr"); } var _deferError = function(/*Error*/error, /*Deferred*/dfd){ //summary: errHandler function for dojo._ioSetArgs call. - + // console.debug("xhr error in:", dfd.ioArgs.xhr); console.debug(error); return error; @@ -6512,10 +6512,10 @@ dojo.provide("dojo._base.xhr"); var _inFlightIntvl = null; var _inFlight = []; var _watchInFlight = function(){ - //summary: + //summary: // internal method that checks each inflight XMLHttpRequest to see // if it has completed or if the timeout situation applies. - + var now = (new Date()).getTime(); // make sure sync calls stay thread safe, if this callback is called // during a sync call and this results in another sync call before the @@ -6527,7 +6527,7 @@ dojo.provide("dojo._base.xhr"); var dfd = tif.dfd; try{ if(!dfd || dfd.canceled || !tif.validCheck(dfd)){ - _inFlight.splice(i--, 1); + _inFlight.splice(i--, 1); }else if(tif.ioCheck(dfd)){ _inFlight.splice(i--, 1); tif.resHandle(dfd); @@ -6649,7 +6649,7 @@ dojo.provide("dojo._base.xhr"); if(ioArgs.query.length){ ioArgs.url += (ioArgs.url.indexOf("?") == -1 ? "?" : "&") + ioArgs.query; ioArgs.query = null; - } + } } /*===== @@ -6657,7 +6657,7 @@ dojo.provide("dojo._base.xhr"); // summary: // In addition to the properties listed for the dojo.__ioArgs type, // the following properties are allowed for dojo.xhr* methods. - // handleAs: + // handleAs: // String. Acceptable values are: // "text" (default) // "json" @@ -6674,7 +6674,7 @@ dojo.provide("dojo._base.xhr"); =====*/ dojo.xhrGet = function(/*dojo.__xhrArgs*/ args){ - // summary: + // summary: // Sends an HTTP GET request to the server. var dfd = _makeXhrDeferred(args); _d._ioAddQueryToUrl(dfd.ioArgs); @@ -6682,7 +6682,7 @@ dojo.provide("dojo._base.xhr"); } dojo.xhrPost = function(/*dojo.__xhrArgs*/ args){ - //summary: + //summary: // Sends an HTTP POST request to the server. return _doIt("POST", _makeXhrDeferred(args)); // dojo.Deferred } @@ -6752,7 +6752,7 @@ dojo.provide("dojo._base.fx"); /* - Animation losely package based on Dan Pupius' work, contributed under CLA: + Animation losely package based on Dan Pupius' work, contributed under CLA: http://pupius.co.uk/js/Toolkit.Drawing.js */ @@ -6786,7 +6786,7 @@ dojo.declare("dojo._Animation", null, { this.curve = new dojo._Line(this.curve[0], this.curve[1]); } }, - + // duration: Integer // The time in milliseonds the animation will take to run duration: 1000, @@ -6794,11 +6794,11 @@ dojo.declare("dojo._Animation", null, { /*===== // curve: dojo._Line||Array // A two element array of start and end values, or a dojo._Line instance to be - // used in the Animation. + // used in the Animation. curve: null, // easing: Function - // A Function to adjust the acceleration (or deceleration) of the progress + // A Function to adjust the acceleration (or deceleration) of the progress // across a dojo._Line easing: null, =====*/ @@ -6808,11 +6808,11 @@ dojo.declare("dojo._Animation", null, { repeat: 0, // rate: Integer - // the time in milliseconds to wait before advancing to next frame + // the time in milliseconds to wait before advancing to next frame // (used as a fps timer: rate/1000 = fps) rate: 10 /* 100 fps */, -/*===== +/*===== // delay: Integer // The time in milliseconds to wait before starting animation after it has been .play()'ed delay: null, @@ -7054,7 +7054,7 @@ dojo.declare("dojo._Animation", null, { } : function(){}; dojo._fade = function(/*Object*/ args){ - // summary: + // summary: // Returns an animation that will fade the node defined by // args.node from the start to end values passed (args.start // args.end) (end is mandatory, start is optional) @@ -7082,14 +7082,14 @@ dojo.declare("dojo._Animation", null, { =====*/ dojo.fadeIn = function(/*dojo.__fadeArgs*/ args){ - // summary: + // summary: // Returns an animation that will fade node defined in 'args' from // its current opacity to fully opaque. return d._fade(d.mixin({ end: 1 }, args)); // dojo._Animation } dojo.fadeOut = function(/*dojo.__fadeArgs*/ args){ - // summary: + // summary: // Returns an animation that will fade node defined in 'args' // from its current opacity to fully transparent. return d._fade(d.mixin({ end: 0 }, args)); // dojo._Animation @@ -7125,7 +7125,7 @@ dojo.declare("dojo._Animation", null, { } dojo.animateProperty = function(/*Object*/ args){ - // summary: + // summary: // Returns an animation that will transition the properties of // node defined in 'args' depending how they are defined in // 'args.properties' @@ -7134,15 +7134,15 @@ dojo.declare("dojo._Animation", null, { // The foundation of most dojo.fx animations, dojo.AnimateProperty // will take an object of "properties" corresponding to style // properties, and animate them in parallel over a set duration. - // + // // args.node can be a String or a DomNode reference - // + // // example: // | dojo.animateProperty({ node: node, duration:2000, // | properties: { // | width: { start: '200', end: '400', unit:"px" }, // | height: { start:'200', end: '400', unit:"px" }, - // | paddingTop: { start:'5', end:'50', unit:"px" } + // | paddingTop: { start:'5', end:'50', unit:"px" } // | } // | }).play(); // diff --git a/tests/javascript/frameworks/dojo/dojo-1.1.2.js b/tests/javascript/frameworks/dojo/dojo-1.1.2.js index b2a110c017..a0749918f6 100644 --- a/tests/javascript/frameworks/dojo/dojo-1.1.2.js +++ b/tests/javascript/frameworks/dojo/dojo-1.1.2.js @@ -25,7 +25,7 @@ ["dojo", "fojo"], ["dijit", "fijit"], ["dojox", "fojox"] - + ] */ @@ -145,14 +145,14 @@ djConfig = { var cn = [ "assert", "count", "debug", "dir", "dirxml", "error", "group", "groupEnd", "info", "profile", "profileEnd", "time", "timeEnd", - "trace", "warn", "log" + "trace", "warn", "log" ]; var i=0, tn; while((tn=cn[i++])){ if(!console[tn]){ (function(){ var tcn = tn+""; - console[tcn] = function(){ + console[tcn] = function(){ var a = Array.apply({}, arguments); a.unshift(tcn+":"); console.log(a.join(" ")); @@ -183,7 +183,7 @@ djConfig = { if(typeof dojox == "undefined"){ this.dojox = {_scopeName: "dojox"}; } - + if(!d._scopeArgs){ d._scopeArgs = [dojo, dijit, dojox]; } @@ -224,11 +224,11 @@ dojo.global = { }; =====*/ dojo.locale = d.config.locale; - + var rev = "$Rev: 21532 $".match(/\d+/); dojo.version = { - // summary: + // summary: // version number of dojo // major: Integer // Major version. If total version is "1.2.0beta1", will be 1 @@ -281,7 +281,7 @@ dojo.global = { } dojo.mixin = function(/*Object*/obj, /*Object...*/props){ - // summary: + // summary: // Adds all properties and methods of props to obj and returns the // (now modified) obj. // description: @@ -307,7 +307,7 @@ dojo.global = { // | constructor: function(properties){ // | // property configuration: // | dojo.mixin(this, properties); - // | + // | // | console.debug(this.quip); // | // ... // | }, @@ -328,7 +328,7 @@ dojo.global = { // | name: "Carl Brutanananadilewski" // | } // | ); - // | + // | // | // will print "Carl Brutanananadilewski" // | console.debug(flattened.name); // | // will print "true" @@ -351,14 +351,14 @@ dojo.global = { } dojo.setObject = function(/*String*/name, /*Object*/value, /*Object?*/context){ - // summary: + // summary: // Set a property from a dot-separated string, such as "A.B.C" - // description: + // description: // Useful for longer api chains where you have to test each object in // the chain, or when you have an object reference in string format. // Objects are created as needed along `path`. Returns the passed // value if setting is successful or `undefined` if not. - // name: + // name: // Path to a property, in the form "A.B.C". // context: // Optional. Object to use as root of path. Defaults to @@ -381,29 +381,29 @@ dojo.global = { } dojo.getObject = function(/*String*/name, /*Boolean*/create, /*Object*/context){ - // summary: + // summary: // Get a property from a dot-separated string, such as "A.B.C" - // description: + // description: // Useful for longer api chains where you have to test each object in // the chain, or when you have an object reference in string format. - // name: + // name: // Path to an property, in the form "A.B.C". // context: // Optional. Object to use as root of path. Defaults to // 'dojo.global'. Null may be passed. - // create: + // create: // Optional. Defaults to `false`. If `true`, Objects will be // created at any point along the 'path' that is undefined. return d._getProp(name.split("."), create, context); // Object } dojo.exists = function(/*String*/name, /*Object?*/obj){ - // summary: + // summary: // determine if an object supports a given method - // description: + // description: // useful for longer api chains where you have to test each object in // the chain - // name: + // name: // Path to an object, in the form "A.B.C". // obj: // Object to use as root of path. Defaults to @@ -426,10 +426,10 @@ dojo.global = { dojo["eval"] = function(/*String*/ scriptFragment){ - // summary: + // summary: // Perform an evaluation in the global scope. Use this rather than // calling 'eval()' directly. - // description: + // description: // Placed in a separate function to minimize size of trapped // exceptions. Calling eval() directly from some other scope may // complicate tracebacks on some platforms. @@ -451,7 +451,7 @@ dojo.global = { /*===== dojo.deprecated = function(behaviour, extra, removal){ - // summary: + // summary: // Log a debug message to indicate that a behavior has been // deprecated. // behaviour: String @@ -470,7 +470,7 @@ dojo.global = { dojo.experimental = function(moduleName, extra){ // summary: Marks code as experimental. - // description: + // description: // This can be used to mark a function, file, or module as // experimental. Experimental code is not ready to be used, and the // APIs are subject to change without notice. Experimental code may be @@ -532,11 +532,11 @@ dojo.global = { _loadedUrls: [], - //WARNING: + //WARNING: // This variable is referenced by packages outside of bootstrap: // FloatingPane.js and undo/browser.js _postLoad: false, - + //Egad! Lots of test files push on this directly instead of using dojo.addOnLoad. _loaders: [], _unloaders: [], @@ -555,13 +555,13 @@ dojo.global = { // not caught by us, so the caller will see it. We return a true // value if and only if the script is found. // - // relpath: + // relpath: // A relative path to a script (no leading '/', and typically ending // in '.js'). - // module: + // module: // A module whose existance to check for after loading a path. Can be // used to determine success or failure of the load. - // cb: + // cb: // a callback function to pass the result of evaluating the script var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : this.baseUrl) + relpath; @@ -582,7 +582,7 @@ dojo.global = { // it succeeded. Returns false if the URI reading failed. Throws if // the evaluation throws. // uri: a uri which points at the script to be loaded - // cb: + // cb: // a callback function to process the result of evaluating the script // as an expression, typically used by the resource bundle loader to // load JSON-style resources @@ -606,7 +606,7 @@ dojo.global = { if(cb){ cb(value); } return true; // Boolean } - + // FIXME: probably need to add logging to this method dojo._loadUriAndCheck = function(/*String*/uri, /*String*/moduleName, /*Function?*/cb){ // summary: calls loadUri then findModule and returns true if both succeed @@ -630,7 +630,7 @@ dojo.global = { this._loadNotifying = true; this._postLoad = true; var mll = d._loaders; - + //Clear listeners so new ones can be added //For other xdomain package loads after the initial load. this._loaders = []; @@ -645,7 +645,7 @@ dojo.global = { } this._loadNotifying = false; - + //Make sure nothing else got added to the onload queue //after this first run. If something did, and we are not waiting for any //more inflight resources, run again. @@ -711,7 +711,7 @@ dojo.global = { dojo._modulesLoaded = function(){ if(d._postLoad){ return; } - if(d._inFlightCount > 0){ + if(d._inFlightCount > 0){ console.warn("files still in flight!"); return; } @@ -745,8 +745,8 @@ dojo.global = { var syms = modulename.split("."); for(var i = syms.length; i>0; i--){ var parentModule = syms.slice(0, i).join("."); - if((i==1) && !this._moduleHasPrefix(parentModule)){ - // Support default module directory (sibling of dojo) for top-level modules + if((i==1) && !this._moduleHasPrefix(parentModule)){ + // Support default module directory (sibling of dojo) for top-level modules syms[0] = "../" + syms[0]; }else{ var parentModulePath = this._getModulePrefix(parentModule); @@ -780,26 +780,26 @@ dojo.global = { // description: // `dojo._loadModule("A.B")` first checks to see if symbol A.B is // defined. If it is, it is simply returned (nothing to do). - // + // // If it is not defined, it will look for `A/B.js` in the script root // directory. - // + // // `dojo._loadModule` throws an excpetion if it cannot find a file // to load, or if the symbol `A.B` is not defined after loading. - // + // // It returns the object `A.B`. - // + // // `dojo._loadModule()` does nothing about importing symbols into // the current namespace. It is presumed that the caller will // take care of that. For example, to import all symbols into a // local block, you might write: - // + // // | with (dojo._loadModule("A.B")) { // | ... // | } - // + // // And to import just the leaf symbol to a local variable: - // + // // | var B = dojo._loadModule("A.B"); // | ... // returns: the required namespace object @@ -827,7 +827,7 @@ dojo.global = { // pass in false so we can give better error module = this._loadedModules[moduleName]; if(!module){ - throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); + throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); } } @@ -845,14 +845,14 @@ dojo.global = { // Each javascript source file is called a resource. When a // resource is loaded by the browser, `dojo.provide()` registers // that it has been loaded. - // + // // For backwards compatibility reasons, in addition to registering // the resource, `dojo.provide()` also ensures that the javascript // object for the module exists. For example, // `dojo.provide("dojox.data.FlickrStore")`, in addition to // registering that `FlickrStore.js` is a resource for the // `dojox.data` module, will ensure that the `dojox.data` - // javascript object exists, so that calls like + // javascript object exists, so that calls like // `dojo.data.foo = function(){ ... }` don't fail. // // In the case of a build where multiple javascript source files @@ -911,7 +911,7 @@ dojo.global = { if(condition === true){ // FIXME: why do we support chained require()'s here? does the build system? var args = []; - for(var i = 1; i < arguments.length; i++){ + for(var i = 1; i < arguments.length; i++){ args.push(arguments[i]); } d.require.apply(d, args); @@ -921,13 +921,13 @@ dojo.global = { dojo.requireAfterIf = d.requireIf; dojo.registerModulePath = function(/*String*/module, /*String*/prefix){ - // summary: + // summary: // maps a module name to a path - // description: + // description: // An unregistered module is given the default path of ../[module], // relative to Dojo root. For example, module acme is mapped to // ../acme. If you want to use a different module name, use - // dojo.registerModulePath. + // dojo.registerModulePath. // example: // If your dojo.js is located at this location in the web root: // | /myapp/js/dojo/dojo/dojo.js @@ -940,7 +940,7 @@ dojo.global = { // At which point you can then use dojo.require() to load the // modules (assuming they provide() the same things which are // required). The full code might be: - // | // | // | - // + // // This type of syntax works with both xdomain and normal loaders, so it is good // practice to always use this idiom for on-the-fly code loading and in HTML script // blocks. If at some point you change loaders and where the code is loaded from, // it will all still work. - // + // // More on how dojo.require // `dojo.require("A.B")` first checks to see if symbol A.B is // defined. If it is, it is simply returned (nothing to do). - // + // // If it is not defined, it will look for `A/B.js` in the script root // directory. - // + // // `dojo.require` throws an excpetion if it cannot find a file // to load, or if the symbol `A.B` is not defined after loading. - // + // // It returns the object `A.B`, but note the caveats above about on-the-fly loading and // HTML script blocks when the xdomain loader is loading a module. - // + // // `dojo.require()` does nothing about importing symbols into // the current namespace. It is presumed that the caller will // take care of that. For example, to import all symbols into a // local block, you might write: - // + // // | with (dojo.require("A.B")) { // | ... // | } - // + // // And to import just the leaf symbol to a local variable: - // + // // | var B = dojo.require("A.B"); // | ... // returns: the required namespace object @@ -980,7 +980,7 @@ dojo.global = { // pass in false so we can give better error module = d._loadedModules[moduleName]; if(!module){ - throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); + throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); } } @@ -1001,14 +1001,14 @@ dojo.global = { // the file name. For example, `js/dojo/foo.js` must have // `dojo.provide("dojo.foo");` before any calls to // `dojo.require()` are made. - // + // // For backwards compatibility reasons, in addition to registering // the resource, `dojo.provide()` also ensures that the javascript // object for the module exists. For example, // `dojo.provide("dojox.data.FlickrStore")`, in addition to // registering that `FlickrStore.js` is a resource for the // `dojox.data` module, will ensure that the `dojox.data` - // javascript object exists, so that calls like + // javascript object exists, so that calls like // `dojo.data.foo = function(){ ... }` don't fail. // // In the case of a build where multiple javascript source files @@ -1017,11 +1017,11 @@ dojo.global = { // note that it includes multiple resources. // // resourceName: String - // A dot-sperated string identifying a resource. + // A dot-sperated string identifying a resource. // // example: // Safely create a `my` object, and make dojo.require("my.CustomModule") work - // | dojo.provide("my.CustomModule"); + // | dojo.provide("my.CustomModule"); //Make sure we have a string. resourceName = resourceName + ""; @@ -1074,11 +1074,11 @@ dojo.global = { // // example: // | dojo.requireIf(dojo.isBrowser, "my.special.Module"); - + if(condition === true){ // FIXME: why do we support chained require()'s here? does the build system? var args = []; - for(var i = 1; i < arguments.length; i++){ + for(var i = 1; i < arguments.length; i++){ args.push(arguments[i]); } d.require.apply(d, args); @@ -1088,13 +1088,13 @@ dojo.global = { dojo.requireAfterIf = d.requireIf; dojo.registerModulePath = function(/*String*/module, /*String*/prefix){ - // summary: + // summary: // Maps a module name to a path - // description: + // description: // An unregistered module is given the default path of ../[module], // relative to Dojo root. For example, module acme is mapped to // ../acme. If you want to use a different module name, use - // dojo.registerModulePath. + // dojo.registerModulePath. // example: // If your dojo.js is located at this location in the web root: // | /myapp/js/dojo/dojo/dojo.js @@ -1107,7 +1107,7 @@ dojo.global = { // At which point you can then use dojo.require() to load the // modules (assuming they provide() the same things which are // required). The full code might be: - // | // | - // + // // This type of syntax works with both xdomain and normal loaders, so it is good // practice to always use this idiom for on-the-fly code loading and in HTML script // blocks. If at some point you change loaders and where the code is loaded from, // it will all still work. - // + // // More on how dojo.require // `dojo.require("A.B")` first checks to see if symbol A.B is // defined. If it is, it is simply returned (nothing to do). - // + // // If it is not defined, it will look for `A/B.js` in the script root // directory. - // + // // `dojo.require` throws an excpetion if it cannot find a file // to load, or if the symbol `A.B` is not defined after loading. - // + // // It returns the object `A.B`, but note the caveats above about on-the-fly loading and // HTML script blocks when the xdomain loader is loading a module. - // + // // `dojo.require()` does nothing about importing symbols into // the current namespace. It is presumed that the caller will // take care of that. For example, to import all symbols into a // local block, you might write: - // + // // | with (dojo.require("A.B")) { // | ... // | } - // + // // And to import just the leaf symbol to a local variable: - // + // // | var B = dojo.require("A.B"); // | ... // returns: the required namespace object @@ -967,7 +967,7 @@ dojo.global = { // pass in false so we can give better error module = d._loadedModules[moduleName]; if(!module){ - throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); + throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); } } @@ -988,14 +988,14 @@ dojo.global = { // the file name. For example, `js/dojo/foo.js` must have // `dojo.provide("dojo.foo");` before any calls to // `dojo.require()` are made. - // + // // For backwards compatibility reasons, in addition to registering // the resource, `dojo.provide()` also ensures that the javascript // object for the module exists. For example, // `dojo.provide("dojox.data.FlickrStore")`, in addition to // registering that `FlickrStore.js` is a resource for the // `dojox.data` module, will ensure that the `dojox.data` - // javascript object exists, so that calls like + // javascript object exists, so that calls like // `dojo.data.foo = function(){ ... }` don't fail. // // In the case of a build where multiple javascript source files @@ -1004,11 +1004,11 @@ dojo.global = { // note that it includes multiple resources. // // resourceName: String - // A dot-sperated string identifying a resource. + // A dot-sperated string identifying a resource. // // example: // Safely create a `my` object, and make dojo.require("my.CustomModule") work - // | dojo.provide("my.CustomModule"); + // | dojo.provide("my.CustomModule"); //Make sure we have a string. resourceName = resourceName + ""; @@ -1061,11 +1061,11 @@ dojo.global = { // // example: // | dojo.requireIf(dojo.isBrowser, "my.special.Module"); - + if(condition === true){ // FIXME: why do we support chained require()'s here? does the build system? var args = []; - for(var i = 1; i < arguments.length; i++){ + for(var i = 1; i < arguments.length; i++){ args.push(arguments[i]); } d.require.apply(d, args); @@ -1075,13 +1075,13 @@ dojo.global = { dojo.requireAfterIf = d.requireIf; dojo.registerModulePath = function(/*String*/module, /*String*/prefix){ - // summary: + // summary: // Maps a module name to a path - // description: + // description: // An unregistered module is given the default path of ../[module], // relative to Dojo root. For example, module acme is mapped to // ../acme. If you want to use a different module name, use - // dojo.registerModulePath. + // dojo.registerModulePath. // example: // If your dojo.js is located at this location in the web root: // | /myapp/js/dojo/dojo/dojo.js @@ -1094,7 +1094,7 @@ dojo.global = { // At which point you can then use dojo.require() to load the // modules (assuming they provide() the same things which are // required). The full code might be: - // | // | d._modulePrefixes[module] = { name: module, value: prefix }; }; - + dojo.requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String?*/availableFlatLocales){ // summary: // Declares translated resources and loads them if necessary, in the @@ -1341,7 +1341,7 @@ dojo.global = { if(loc.lastIndexOf("/") != loc.length-1){ loc += "/"; } - + //If the path is an absolute path (starts with a / or is on another //domain/xdomain) then don't add the baseUrl. var colonIndex = loc.indexOf(":"); @@ -1512,7 +1512,7 @@ if(typeof window != 'undefined'){ if(dojo.isIE && window.location.protocol === "file:"){ dojo.config.ieForceActiveXXhr=true; } - + d.isQuirks = document.compatMode == "BackCompat"; // TODO: is the HTML LANG attribute relevant? @@ -1520,7 +1520,7 @@ if(typeof window != 'undefined'){ // These are in order of decreasing likelihood; this will change in time. d._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0']; - + d._xhrObj = function(){ // summary: // does the work of portably generating a new XMLHTTPRequest object. @@ -1543,7 +1543,7 @@ if(typeof window != 'undefined'){ } } } - + if(!http){ throw new Error("XMLHTTP not available: "+last_e); } @@ -1612,7 +1612,7 @@ if(typeof window != 'undefined'){ } return http.responseText; // String } - + var _w = window; var _handleNodeEvent = function(/*String*/evtName, /*Function*/fp){ @@ -1630,7 +1630,7 @@ if(typeof window != 'undefined'){ d._windowUnloaders = []; - + d.windowUnloaded = function(){ // summary: // signal fired by impending window destruction. You may use @@ -1944,7 +1944,7 @@ dojo.provide("dojo._base.lang"); // | var foo = { bar: 2 }; // | dojo.hitch(foo, function(){ this.bar = 10; })(); // execute an anonymous function in scope of foo - + if(arguments.length > 2){ return d._hitchArgs.apply(d, arguments); // Function } @@ -2035,7 +2035,7 @@ dojo.provide("dojo._base.lang"); } return arr; }; - + dojo._toArray = d.isIE ? function(obj){ return ((obj.item) ? slow : efficient).apply(this, arguments); @@ -3974,7 +3974,7 @@ dojo.provide("dojo._base.Deferred"); // handle the asynchronous case. var result, finished, isError, head, nextListener; var promise = (this.promise = {}); - + function complete(value){ if(finished){ throw new Error("This deferred has already been resolved"); @@ -4025,8 +4025,8 @@ dojo.provide("dojo._base.Deferred"); this.results = [value, null]; complete(value); }; - - + + // calling error will indicate that the promise failed this.reject = this.errback = function(error){ // summary: @@ -4117,11 +4117,11 @@ dojo.provide("dojo._base.Deferred"); addCallback: function (/*Function*/callback) { return this.addCallbacks(dojo.hitch.apply(dojo, arguments)); }, - + addErrback: function (/*Function*/errback) { return this.addCallbacks(null, dojo.hitch.apply(dojo, arguments)); }, - + addBoth: function (/*Function*/callback) { var enclosed = dojo.hitch.apply(dojo, arguments); return this.addCallbacks(enclosed, enclosed); @@ -4151,7 +4151,7 @@ dojo.when = function(promiseOrValue, /*Function?*/callback, /*Function?*/errback // And now all three of his functions can be used sync or async. // | printFirstAndLast([1,2,3,4]) will work just as well as // | printFirstAndLast(dojo.xhrGet(...)); - + if(promiseOrValue && typeof promiseOrValue.then === "function"){ return promiseOrValue.then(callback, errback, progressHandler); } @@ -4734,7 +4734,7 @@ dojo.provide("dojo._base.event"); }); // DOM events - + dojo.fixEvent = function(/*Event*/ evt, /*DOMNode*/ sender){ // summary: // normalizes properties on the event object including event @@ -4759,7 +4759,7 @@ dojo.provide("dojo._base.event"); // the default listener to use on dontFix nodes, overriden for IE var node_listener = dojo._listener; - + // Unify connect and event listeners dojo._connect = function(obj, event, context, method, dontFix){ // FIXME: need a more strict test @@ -4851,9 +4851,9 @@ dojo.provide("dojo._base.event"); // virtual key mapping copyKey: dojo.isMac && !dojo.isAIR ? (dojo.isSafari ? 91 : 224 ) : 17 }; - + var evtCopyKey = dojo.isMac ? "metaKey" : "ctrlKey"; - + dojo.isCopyKey = function(e){ // summary: // Checks an event for the copy key (meta on Mac, and ctrl anywhere else) @@ -4875,7 +4875,7 @@ dojo.provide("dojo._base.event"); // RIGHT: Number // Numeric value of the right mouse button for the platform. RIGHT: 2, - + isButton: function(e, button){ // summary: // Checks an event object for a pressed button @@ -4932,7 +4932,7 @@ dojo.provide("dojo._base.event"); isRight: function(e){ return e.button == 2; } }; } - + // IE event normalization if(dojo.isIE){ var _trySetKeyCode = function(e, code){ @@ -5130,7 +5130,7 @@ dojo.provide("dojo._base.event"); this.returnValue = false; } }); - + // override stopEvent for IE dojo.stopEvent = (dojo.isIE < 9 || dojo.isQuirks) ? function(evt){ evt = evt || window.event; @@ -5138,7 +5138,7 @@ dojo.provide("dojo._base.event"); del._preventDefault.call(evt); } : dojo.stopEvent; } - + del._synthesizeEvent = function(evt, props){ var faux = dojo.mixin({}, evt, props); del._setKeyChar(faux); @@ -5149,7 +5149,7 @@ dojo.provide("dojo._base.event"); faux.stopPropagation = function(){ evt.stopPropagation(); }; return faux; }; - + // Opera event normalization if(dojo.isOpera){ dojo.mixin(del, { @@ -5173,7 +5173,7 @@ dojo.provide("dojo._base.event"); } }); } - + // Webkit event normalization if(dojo.isWebKit){ del._add = del.add; @@ -5369,7 +5369,7 @@ if(dojo.isIE){ d.addOnWindowUnload(function(){ _destroyContainer = null; //prevent IE leak }); - + /*===== dojo._destroyElement = function(node){ // summary: @@ -5587,7 +5587,7 @@ if(dojo.isIE){ // client code may have to adjust if compatMode varies across iframes d.boxModel = document.compatMode == "BackCompat" ? "border-box" : "content-box"; } - + // ============================= // Style Functions // ============================= @@ -6065,7 +6065,7 @@ if(dojo.isIE){ h: node.offsetHeight + me.h }; } - + dojo._getMarginSize = function(/*DomNode*/node, /*Object*/computedStyle){ // summary: // returns an object that encodes the width and height of @@ -6260,7 +6260,7 @@ if(dojo.isIE){ // Set a node's marginbox to the size of another node // | var box = dojo.marginBox("someNodeId"); // | dojo.marginBox("someOtherNode", box); - + var n = byId(node), s = gcs(n), b = box; return !b ? d._getMarginBox(n, s) : d._setMarginBox(n, b.l, b.t, b.w, b.h, s); // Object }; @@ -6367,7 +6367,7 @@ if(dojo.isIE){ } }; - + dojo._fixIeBiDiScrollLeft = function(/*Integer*/ scrollLeft){ // In RTL direction, scrollLeft should be a negative value, but IE // returns a positive one. All codes using documentElement.scrollLeft @@ -8075,7 +8075,7 @@ dojo.provide("dojo._base.NodeList"); "keyup", "load", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "submit" ]; - + // FIXME: pseudo-doc the above automatically generated on-event functions // syntactic sugar for DOM events @@ -8123,7 +8123,7 @@ dojo._hasResource["dojo._base.query"] = true; designed to take any valid CSS3 selector and return the nodes matching the selector. To do this quickly, it processes queries in several steps, applying caching where profitable. - + The steps (roughly in reverse order of the way they appear in the code): 1.) check to see if we already have a "query dispatcher" - if so, use that with the given parameterization. Skip to step 4. @@ -8496,7 +8496,7 @@ var defineQuery= function(d){ } return queryParts; }; - + //////////////////////////////////////////////////////////////////////// // DOM query infrastructure @@ -8921,7 +8921,7 @@ var defineQuery= function(d){ return ret; }; }; - + /* // thanks, Dean! var itemIsAfterRoot = d.isIE ? function(item, root){ @@ -9380,7 +9380,7 @@ var defineQuery= function(d){ if(arr.length < 2){ return ret; } _zipIdx++; - + // we have to fork here for IE and XML docs because we can't set // expandos on their nodes (apparently). *sigh* if(d.isIE && caseSensitive){ @@ -9693,8 +9693,8 @@ var defineAcme= function(){ //prefers queryPortability, then acme, then dojo if(this["dojo"]){ dojo.provide("dojo._base.query"); - - + + defineQuery(this["queryPortability"]||this["acme"]||dojo); }else{ defineQuery(this["queryPortability"]||this["acme"]||defineAcme()); @@ -9739,7 +9739,7 @@ dojo.provide("dojo._base.xhr"); obj[name] = value; } } - + dojo.fieldToObject = function(/*DOMNode||String*/ inputNode){ // summary: // Serialize a form field to a JavaScript object. @@ -10223,7 +10223,7 @@ dojo.provide("dojo._base.xhr"); // set up the query params var miArgs = [{}]; - + if(formObject){ // potentially over-ride url-provided params w/ form values miArgs.push(formObject); @@ -10236,7 +10236,7 @@ dojo.provide("dojo._base.xhr"); miArgs.push({"dojo.preventCache": new Date().valueOf()}); } ioArgs.query = _d.objectToQuery(_d.mixin.apply(null, miArgs)); - + // .. and the real work of getting the deferred in order, etc. ioArgs.handleAs = args.handleAs || "text"; var d = new _d.Deferred(canceller); @@ -10286,7 +10286,7 @@ dojo.provide("dojo._base.xhr"); } d.ioArgs = ioArgs; - + // FIXME: need to wire up the xhr object's abort method to something // analagous in the Deferred return d; @@ -10294,7 +10294,7 @@ dojo.provide("dojo._base.xhr"); var _deferredCancel = function(/*Deferred*/dfd){ // summary: canceller function for dojo._ioSetArgs call. - + dfd.canceled = true; var xhr = dfd.ioArgs.xhr; var _at = typeof xhr.abort; @@ -10327,8 +10327,8 @@ dojo.provide("dojo._base.xhr"); // something fierece if we don't use unified loops. var _inFlightIntvl = null; var _inFlight = []; - - + + //Use a separate count for knowing if we are starting/stopping io calls. //Cannot use _inFlight.length since it can change at a different time than //when we want to do this kind of test. We only want to decrement the count @@ -10348,7 +10348,7 @@ dojo.provide("dojo._base.xhr"); //summary: // internal method that checks each inflight XMLHttpRequest to see // if it has completed or if the timeout situation applies. - + var now = (new Date()).getTime(); // make sure sync calls stay thread safe, if this callback is called // during a sync call and this results in another sync call before the @@ -10417,7 +10417,7 @@ dojo.provide("dojo._base.xhr"); if(_d.isIE){ _d.addOnWindowUnload(_d._ioCancelAll); } - + _d._ioNotifyStart = function(/*Deferred*/dfd){ // summary: // If dojo.publish is available, publish topics @@ -10453,7 +10453,7 @@ dojo.provide("dojo._base.xhr"); if(args.timeout){ dfd.startTime = (new Date()).getTime(); } - + _inFlight.push({dfd: dfd, validCheck: validCheck, ioCheck: ioCheck, resHandle: resHandle}); if(!_inFlightIntvl){ _inFlightIntvl = setInterval(_watchInFlight, 50); diff --git a/tests/javascript/frameworks/ext/ext-all-2.3.0.js b/tests/javascript/frameworks/ext/ext-all-2.3.0.js index 2e00aaef43..90fde1bd39 100644 --- a/tests/javascript/frameworks/ext/ext-all-2.3.0.js +++ b/tests/javascript/frameworks/ext/ext-all-2.3.0.js @@ -5,7 +5,7 @@ Ext.lib={}; * Ext JS Library 2.3.0 * Copyright(c) 2006-2009, Ext JS, LLC. * licensing@extjs.com - * + * * http://extjs.com/license */ diff --git a/tests/javascript/frameworks/ext/ext-all-3.3.1.js b/tests/javascript/frameworks/ext/ext-all-3.3.1.js index 342138fd08..51a87b9902 100644 --- a/tests/javascript/frameworks/ext/ext-all-3.3.1.js +++ b/tests/javascript/frameworks/ext/ext-all-3.3.1.js @@ -5,7 +5,7 @@ * http://www.sencha.com/license */ (function(){var h=Ext.util,k=Ext.each,g=true,i=false;h.Observable=function(){var l=this,m=l.events;if(l.listeners){l.on(l.listeners);delete l.listeners}l.events=m||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var l=Array.prototype.slice.call(arguments,0),n=l[0].toLowerCase(),o=this,m=g,r=o.events[n],t,p,s;if(o.eventsSuspended===g){if(p=o.eventQueue){p.push(l)}}else{if(typeof r=="object"){if(r.bubble){if(r.fire.apply(r,l.slice(1))===i){return i}s=o.getBubbleTarget&&o.getBubbleTarget();if(s&&s.enableBubble){t=s.events[n];if(!t||typeof t!="object"||!t.bubble){s.enableBubble(n)}return s.fireEvent.apply(s,l)}}else{l.shift();m=r.fire.apply(r,l)}}}return m},addListener:function(l,n,m,s){var p=this,r,t,q;if(typeof l=="object"){s=l;for(r in s){t=s[r];if(!p.filterOptRe.test(r)){p.addListener(r,t.fn||t,t.scope||s.scope,t.fn?t:s)}}}else{l=l.toLowerCase();q=p.events[l]||g;if(typeof q=="boolean"){p.events[l]=q=new h.Event(p,l)}q.addListener(n,m,typeof s=="object"?s:{})}},removeListener:function(l,n,m){var o=this.events[l.toLowerCase()];if(typeof o=="object"){o.removeListener(n,m)}},purgeListeners:function(){var n=this.events,l,m;for(m in n){l=n[m];if(typeof l=="object"){l.clearListeners()}}},addEvents:function(p){var n=this;n.events=n.events||{};if(typeof p=="string"){var l=arguments,m=l.length;while(m--){n.events[l[m]]=n.events[l[m]]||g}}else{Ext.applyIf(n.events,p)}},hasListener:function(l){var m=this.events[l.toLowerCase()];return typeof m=="object"&&m.listeners.length>0},suspendEvents:function(l){this.eventsSuspended=g;if(l&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var l=this,m=l.eventQueue||[];l.eventsSuspended=i;delete l.eventQueue;k(m,function(n){l.fireEvent.apply(l,n)})}};var d=h.Observable.prototype;d.on=d.addListener;d.un=d.removeListener;h.Observable.releaseCapture=function(l){l.fireEvent=d.fireEvent};function e(m,n,l){return function(){if(n.target==arguments[0]){m.apply(l,Array.prototype.slice.call(arguments,0))}}}function b(p,q,m,n){m.task=new h.DelayedTask();return function(){m.task.delay(q.buffer,p,n,Array.prototype.slice.call(arguments,0))}}function c(n,o,m,l){return function(){o.removeListener(m,l);return n.apply(l,arguments)}}function a(p,q,m,n){return function(){var l=new h.DelayedTask(),o=Array.prototype.slice.call(arguments,0);if(!m.tasks){m.tasks=[]}m.tasks.push(l);l.delay(q.delay||10,function(){m.tasks.remove(l);p.apply(n,o)},n)}}h.Event=function(m,l){this.name=l;this.obj=m;this.listeners=[]};h.Event.prototype={addListener:function(p,o,n){var q=this,m;o=o||q.obj;if(!q.isListening(p,o)){m=q.createListener(p,o,n);if(q.firing){q.listeners=q.listeners.slice(0)}q.listeners.push(m)}},createListener:function(q,p,r){r=r||{};p=p||this.obj;var m={fn:q,scope:p,options:r},n=q;if(r.target){n=e(n,r,p)}if(r.delay){n=a(n,r,m,p)}if(r.single){n=c(n,this,q,p)}if(r.buffer){n=b(n,r,m,p)}m.fireFn=n;return m},findListener:function(p,o){var q=this.listeners,n=q.length,m;o=o||this.obj;while(n--){m=q[n];if(m){if(m.fn==p&&m.scope==o){return n}}}return -1},isListening:function(m,l){return this.findListener(m,l)!=-1},removeListener:function(r,q){var p,m,n,s=this,o=i;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel()}delete m.tasks}s.listeners.splice(p,1);o=g}return o},clearListeners:function(){var o=this,m=o.listeners,n=m.length;while(n--){o.removeListener(m[n].fn,m[n].scope)}},fire:function(){var r=this,q=r.listeners,m=q.length,p=0,n;if(m>0){r.firing=g;var o=Array.prototype.slice.call(arguments,0);for(;p",i="",b=a+"",k=""+i,m=b+"",w=""+k;function h(B,D,C,E,A,y){var z=s.insertHtml(E,Ext.getDom(B),u(D));return C?Ext.get(z,true):z}function u(D){var z="",y,C,B,E;if(typeof D=="string"){z=D}else{if(Ext.isArray(D)){for(var A=0;A"}}}return z}function g(F,C,B,D){x.innerHTML=[C,B,D].join("");var y=-1,A=x,z;while(++y "'+D+'"'},insertBefore:function(y,A,z){return h(y,A,z,c)},insertAfter:function(y,A,z){return h(y,A,z,q,"nextSibling")},insertFirst:function(y,A,z){return h(y,A,z,o,"firstChild")},append:function(y,A,z){return h(y,A,z,r,"",true)},overwrite:function(y,A,z){y=Ext.getDom(y);y.innerHTML=u(A);return z?Ext.get(y.firstChild):y.firstChild},createHtml:u};return s}();Ext.Template=function(h){var k=this,c=arguments,e=[],d;if(Ext.isArray(h)){h=h.join("")}else{if(c.length>1){for(var g=0,b=c.length;g+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{var cs=root.querySelectorAll(path);return Ext.toArray(cs)}catch(ex){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,l,k,h){e.cancel();d=l||d;c=k||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};(function(){var h=document;Ext.Element=function(m,n){var o=typeof m=="string"?h.getElementById(m):m,p;if(!o){return null}p=o.id;if(!n&&p&&Ext.elCache[p]){return Ext.elCache[p].el}this.dom=o;this.id=p||Ext.id(o)};var d=Ext.DomHelper,e=Ext.Element,a=Ext.elCache;e.prototype={set:function(r,n){var p=this.dom,m,q,n=(n!==false)&&!!p.setAttribute;for(m in r){if(r.hasOwnProperty(m)){q=r[m];if(m=="style"){d.applyStyles(p,q)}else{if(m=="cls"){p.className=q}else{if(n){p.setAttribute(m,q)}else{p[m]=q}}}}}return this},defaultUnit:"px",is:function(m){return Ext.DomQuery.is(this.dom,m)},focus:function(p,o){var m=this,o=o||m.dom;try{if(Number(p)){m.focus.defer(p,null,[null,o])}else{o.focus()}}catch(n){}return m},blur:function(){try{this.dom.blur()}catch(m){}return this},getValue:function(m){var n=this.dom.value;return m?parseInt(n,10):n},addListener:function(m,p,o,n){Ext.EventManager.on(this.dom,m,p,o||this,n);return this},removeListener:function(m,o,n){Ext.EventManager.removeListener(this.dom,m,o,n||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this},addUnits:function(m){if(m===""||m=="auto"||m===undefined){m=m||""}else{if(!isNaN(m)||!i.test(m)){m=m+(this.defaultUnit||"px")}}return m},load:function(n,o,m){Ext.Ajax.request(Ext.apply({params:o,url:n.url||n,callback:m,el:this.dom,indicatorText:n.indicatorText||""},Ext.isObject(n)?n:{}));return this},isBorderBox:function(){return Ext.isBorderBox||Ext.isForcedBorderBox||g[(this.dom.tagName||"").toLowerCase()]},remove:function(){var m=this,n=m.dom;if(n){delete m.dom;Ext.removeNode(n)}},hover:function(n,m,p,o){var q=this;q.on("mouseenter",n,p||q.dom,o);q.on("mouseleave",m,p||q.dom,o);return q},contains:function(m){return !m?false:Ext.lib.Dom.isAncestor(this.dom,m.dom?m.dom:m)},getAttributeNS:function(n,m){return this.getAttribute(m,n)},getAttribute:Ext.isIE?function(m,o){var p=this.dom,n=typeof p[o+":"+m];if(["undefined","unknown"].indexOf(n)==-1){return p[o+":"+m]}return p[m]}:function(m,n){var o=this.dom;return o.getAttributeNS(n,m)||o.getAttribute(n+":"+m)||o.getAttribute(m)||o[m]},update:function(m){if(this.dom){this.dom.innerHTML=m}return this}};var l=e.prototype;e.addMethods=function(m){Ext.apply(l,m)};l.on=l.addListener;l.un=l.removeListener;l.autoBoxAdjust=true;var i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;e.get=function(n){var m,q,p;if(!n){return null}if(typeof n=="string"){if(!(q=h.getElementById(n))){return null}if(a[n]&&a[n].el){m=a[n].el;m.dom=q}else{m=e.addToCache(new e(q))}return m}else{if(n.tagName){if(!(p=n.id)){p=Ext.id(n)}if(a[p]&&a[p].el){m=a[p].el;m.dom=n}else{m=e.addToCache(new e(n))}return m}else{if(n instanceof e){if(n!=c){if(Ext.isIE&&(n.id==undefined||n.id=="")){n.dom=n.dom}else{n.dom=h.getElementById(n.id)||n.dom}}return n}else{if(n.isComposite){return n}else{if(Ext.isArray(n)){return e.select(n)}else{if(n==h){if(!c){var o=function(){};o.prototype=e.prototype;c=new o();c.dom=h}return c}}}}}}return null};e.addToCache=function(m,n){n=n||m.id;a[n]={el:m,data:{},events:{}};return m};e.data=function(n,m,o){n=e.get(n);if(!n){return null}var p=a[n.id].data;if(arguments.length==2){return p[m]}else{return(p[m]=o)}};function k(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var m,p,r,q;for(m in a){q=a[m];if(q.skipGC){continue}p=q.el;r=p.dom;if(!r||!r.parentNode||(!r.offsetParent&&!h.getElementById(m))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(r)}delete a[m]}}if(Ext.isIE){var n={};for(m in a){n[m]=a[m]}a=Ext.elCache=n}}}e.collectorThreadId=setInterval(k,30000);var b=function(){};b.prototype=e.prototype;e.Flyweight=function(m){this.dom=m};e.Flyweight.prototype=new b();e.Flyweight.prototype.isFlyweight=true;e._flyweights={};e.fly=function(o,m){var n=null;m=m||"_global";if(o=Ext.getDom(o)){(e._flyweights[m]=e._flyweights[m]||new e.Flyweight()).dom=o;n=e._flyweights[m]}return n};Ext.get=e.get;Ext.fly=e.fly;var g=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){g.button=1}})();Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(n,m,h){var k=this.dom,g=document.body,l=0,i;if(Ext.isGecko&&Object.prototype.toString.call(k)=="[object XULElement]"){return null}m=m||50;if(isNaN(m)){i=Ext.getDom(m);m=Number.MAX_VALUE}while(k&&k.nodeType==1&&l "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,l,g,i){var k=this.dom[l];while(k){if(k.nodeType==1&&(!g||e.is(k,g))){return !i?a(k):k}k=k[h]}return null}}}());Ext.Element.addMethods(function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{appendChild:function(d){return a(d).appendTo(this)},appendTo:function(d){c(d).appendChild(this.dom);return this},insertBefore:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d);return this},insertAfter:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d.nextSibling);return this},insertFirst:function(e,d){e=e||{};if(e.nodeType||e.dom||typeof e=="string"){e=c(e);this.dom.insertBefore(e,this.dom.firstChild);return !d?a(e):e}else{return this.createChild(e,this.dom.firstChild,d)}},replace:function(d){d=a(d);this.insertBefore(d);d.remove();return this},replaceWith:function(d){var e=this;if(d.nodeType||d.dom||typeof d=="string"){d=c(d);e.dom.parentNode.insertBefore(d,e.dom)}else{d=b.insertBefore(e.dom,d)}delete Ext.elCache[e.id];Ext.removeNode(e.dom);e.id=Ext.id(e.dom=d);Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e);return e},createChild:function(e,d,g){e=e||{tag:"div"};return d?b.insertBefore(d,e,g!==true):b[!this.dom.firstChild?"overwrite":"append"](this.dom,e,g!==true)},wrap:function(d,e){var g=b.insertBefore(this.dom,d||{tag:"div"},!e);g.dom?g.dom.appendChild(this.dom):g.appendChild(this.dom);return g},insertHtml:function(e,g,d){var h=b.insertHtml(e,this.dom,g);return d?Ext.get(h):h}}}());Ext.Element.addMethods(function(){var B=Ext.supports,h={},y=/(-[a-z])/gi,t=document.defaultView,E=/alpha\(opacity=(.*)\)/i,m=/^\s+|\s+$/g,C=Ext.Element,v=/\s+/,b=/\w/g,d="padding",c="margin",z="border",u="-left",r="-right",x="-top",p="-bottom",k="-width",s=Math,A="hidden",e="isClipped",l="overflow",o="overflow-x",n="overflow-y",D="originalClip",i={l:z+u+k,r:z+r+k,t:z+x+k,b:z+p+k},g={l:d+u,r:d+r,t:d+x,b:d+p},a={l:c+u,r:c+r,t:c+x,b:c+p},F=Ext.Element.data;function q(G,H){return H.charAt(1).toUpperCase()}function w(G){return h[G]||(h[G]=G=="float"?(B.cssFloat?"cssFloat":"styleFloat"):G.replace(y,q))}return{adjustWidth:function(G){var H=this;var I=(typeof G=="number");if(I&&H.autoBoxAdjust&&!H.isBorderBox()){G-=(H.getBorderWidth("lr")+H.getPadding("lr"))}return(I&&G<0)?0:G},adjustHeight:function(G){var H=this;var I=(typeof G=="number");if(I&&H.autoBoxAdjust&&!H.isBorderBox()){G-=(H.getBorderWidth("tb")+H.getPadding("tb"))}return(I&&G<0)?0:G},addClass:function(K){var L=this,J,G,I,H=[];if(!Ext.isArray(K)){if(typeof K=="string"&&!this.hasClass(K)){L.dom.className+=" "+K}}else{for(J=0,G=K.length;J5?I.toLowerCase():H)},setStyle:function(J,I){var G,H;if(typeof J!="object"){G={};G[J]=I;J=G}for(H in J){I=J[H];H=="opacity"?this.setOpacity(I):this.dom.style[w(H)]=I}return this},setOpacity:function(H,G){var K=this,I=K.dom.style;if(!G||!K.anim){if(Ext.isIE){var J=H<1?"alpha(opacity="+H*100+")":"",L=I.filter.replace(E,"").replace(m,"");I.zoom=1;I.filter=L+(L.length>0?" ":"")+J}else{I.opacity=H}}else{K.anim({opacity:{to:H}},K.preanim(arguments,1),null,0.35,"easeIn")}return K},clearOpacity:function(){var G=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(G.filter)){G.filter=G.filter.replace(E,"").replace(m,"")}}else{G.opacity=G["-moz-opacity"]=G["-khtml-opacity"]=""}return this},getHeight:function(I){var H=this,K=H.dom,J=Ext.isIE&&H.isStyle("display","none"),G=s.max(K.offsetHeight,J?0:K.clientHeight)||0;G=!I?G:G-H.getBorderWidth("tb")-H.getPadding("tb");return G<0?0:G},getWidth:function(H){var I=this,K=I.dom,J=Ext.isIE&&I.isStyle("display","none"),G=s.max(K.offsetWidth,J?0:K.clientWidth)||0;G=!H?G:G-I.getBorderWidth("lr")-I.getPadding("lr");return G<0?0:G},setWidth:function(H,G){var I=this;H=I.adjustWidth(H);!G||!I.anim?I.dom.style.width=I.addUnits(H):I.anim({width:{to:H}},I.preanim(arguments,1));return I},setHeight:function(G,H){var I=this;G=I.adjustHeight(G);!H||!I.anim?I.dom.style.height=I.addUnits(G):I.anim({height:{to:G}},I.preanim(arguments,1));return I},getBorderWidth:function(G){return this.addStyles(G,i)},getPadding:function(G){return this.addStyles(G,g)},clip:function(){var G=this,H=G.dom;if(!F(H,e)){F(H,e,true);F(H,D,{o:G.getStyle(l),x:G.getStyle(o),y:G.getStyle(n)});G.setStyle(l,A);G.setStyle(o,A);G.setStyle(n,A)}return G},unclip:function(){var G=this,I=G.dom;if(F(I,e)){F(I,e,false);var H=F(I,D);if(H.o){G.setStyle(l,H.o)}if(H.x){G.setStyle(o,H.x)}if(H.y){G.setStyle(n,H.y)}}return G},addStyles:function(N,M){var K=0,L=N.match(b),J,I,H,G=L.length;for(H=0;Ha.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.OFFSETS=3;Ext.Element.ASCLASS=4;Ext.Element.visibilityCls="x-hide-nosize";Ext.Element.addMethods(function(){var e=Ext.Element,q="opacity",k="visibility",g="display",d="hidden",o="offsets",l="asclass",n="none",a="nosize",b="originalDisplay",c="visibilityMode",h="isVisible",i=e.data,m=function(s){var r=i(s,b);if(r===undefined){i(s,b,r="")}return r},p=function(s){var r=i(s,c);if(r===undefined){i(s,c,r=1)}return r};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(r){i(this.dom,c,r);return this},animate:function(s,u,t,v,r){this.anim(s,{duration:u,callback:t,easing:v},r);return this},anim:function(u,v,s,x,t,r){s=s||"run";v=v||{};var w=this,y=Ext.lib.Anim[s](w.dom,u,(v.duration||x)||0.35,(v.easing||t)||"easeOut",function(){if(r){r.call(w)}if(v.callback){v.callback.call(v.scope||w,w,v)}},w);v.anim=y;return y},preanim:function(r,s){return !r[s]?false:(typeof r[s]=="object"?r[s]:{duration:r[s+1],callback:r[s+2],easing:r[s+3]})},isVisible:function(){var r=this,t=r.dom,s=i(t,h);if(typeof s=="boolean"){return s}s=!r.isStyle(k,d)&&!r.isStyle(g,n)&&!((p(t)==e.ASCLASS)&&r.hasClass(r.visibilityCls||e.visibilityCls));i(t,h,s);return s},setVisible:function(u,r){var x=this,s,z,y,w,v=x.dom,t=p(v);if(typeof r=="string"){switch(r){case g:t=e.DISPLAY;break;case k:t=e.VISIBILITY;break;case o:t=e.OFFSETS;break;case a:case l:t=e.ASCLASS;break}x.setVisibilityMode(t);r=false}if(!r||!x.anim){if(t==e.ASCLASS){x[u?"removeClass":"addClass"](x.visibilityCls||e.visibilityCls)}else{if(t==e.DISPLAY){return x.setDisplayed(u)}else{if(t==e.OFFSETS){if(!u){x.hideModeStyles={position:x.getStyle("position"),top:x.getStyle("top"),left:x.getStyle("left")};x.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{x.applyStyles(x.hideModeStyles||{position:"",top:"",left:""});delete x.hideModeStyles}}else{x.fixDisplay();v.style.visibility=u?"visible":d}}}}else{if(u){x.setOpacity(0.01);x.setVisible(true)}x.anim({opacity:{to:(u?1:0)}},x.preanim(arguments,1),null,0.35,"easeIn",function(){u||x.setVisible(false).setOpacity(1)})}i(v,h,u);return x},hasMetrics:function(){var r=this.dom;return this.isVisible()||(p(r)==e.VISIBILITY)},toggle:function(r){var s=this;s.setVisible(!s.isVisible(),s.preanim(arguments,0));return s},setDisplayed:function(r){if(typeof r=="boolean"){r=r?m(this.dom):n}this.setStyle(g,r);return this},fixDisplay:function(){var r=this;if(r.isStyle(g,n)){r.setStyle(k,d);r.setStyle(g,m(this.dom));if(r.isStyle(g,n)){r.setStyle(g,"block")}}},hide:function(r){if(typeof r=="string"){this.setVisible(false,r);return this}this.setVisible(false,this.preanim(arguments,0));return this},show:function(r){if(typeof r=="string"){this.setVisible(true,r);return this}this.setVisible(true,this.preanim(arguments,0));return this}}}());(function(){var z=null,B=undefined,l=true,u=false,k="setX",h="setY",a="setXY",o="left",m="bottom",t="top",n="right",r="height",g="width",i="points",x="hidden",A="absolute",v="visible",e="motion",p="position",s="easeOut",d=new Ext.Element.Flyweight(),w={},y=function(C){return C||{}},q=function(C){d.dom=C;d.id=Ext.id(C);return d},c=function(C){if(!w[C]){w[C]=[]}return w[C]},b=function(D,C){w[D]=C};Ext.enableFx=l;Ext.Fx={switchStatements:function(D,E,C){return E.apply(this,C[D])},slideIn:function(I,F){F=y(F);var K=this,H=K.dom,N=H.style,P,C,M,E,D,N,J,O,L,G;I=I||"t";K.queueFx(F,function(){P=q(H).getXY();q(H).fixDisplay();C=q(H).getFxRestore();M={x:P[0],y:P[1],0:P[0],1:P[1],width:H.offsetWidth,height:H.offsetHeight};M.right=M.x+M.width;M.bottom=M.y+M.height;q(H).setWidth(M.width).setHeight(M.height);E=q(H).fxWrap(C.pos,F,x);N.visibility=v;N.position=A;function Q(){q(H).fxUnwrap(E,C.pos,F);N.width=C.width;N.height=C.height;q(H).afterFx(F)}O={to:[M.x,M.y]};L={to:M.width};G={to:M.height};function R(V,S,W,T,Y,aa,ad,ac,ab,X,U){var Z={};q(V).setWidth(W).setHeight(T);if(q(V)[Y]){q(V)[Y](aa)}S[ad]=S[ac]="0";if(ab){Z.width=ab}if(X){Z.height=X}if(U){Z.points=U}return Z}J=q(H).switchStatements(I.toLowerCase(),R,{t:[E,N,M.width,0,z,z,o,m,z,G,z],l:[E,N,0,M.height,z,z,n,t,L,z,z],r:[E,N,M.width,M.height,k,M.right,o,t,z,z,O],b:[E,N,M.width,M.height,h,M.bottom,o,t,z,G,O],tl:[E,N,0,0,z,z,n,m,L,G,O],bl:[E,N,0,0,h,M.y+M.height,n,t,L,G,O],br:[E,N,0,0,a,[M.right,M.bottom],o,t,L,G,O],tr:[E,N,0,0,k,M.x+M.width,o,m,L,G,O]});N.visibility=v;q(E).show();arguments.callee.anim=q(E).fxanim(J,F,e,0.5,s,Q)});return K},slideOut:function(G,E){E=y(E);var I=this,F=I.dom,L=F.style,M=I.getXY(),D,C,J,K,H={to:0};G=G||"t";I.queueFx(E,function(){C=q(F).getFxRestore();J={x:M[0],y:M[1],0:M[0],1:M[1],width:F.offsetWidth,height:F.offsetHeight};J.right=J.x+J.width;J.bottom=J.y+J.height;q(F).setWidth(J.width).setHeight(J.height);D=q(F).fxWrap(C.pos,E,v);L.visibility=v;L.position=A;q(D).setWidth(J.width).setHeight(J.height);function N(){E.useDisplay?q(F).setDisplayed(u):q(F).hide();q(F).fxUnwrap(D,C.pos,E);L.width=C.width;L.height=C.height;q(F).afterFx(E)}function O(P,X,V,Y,T,W,S,U,R){var Q={};P[X]=P[V]="0";Q[Y]=T;if(W){Q[W]=S}if(U){Q[U]=R}return Q}K=q(F).switchStatements(G.toLowerCase(),O,{t:[L,o,m,r,H],l:[L,n,t,g,H],r:[L,o,t,g,H,i,{to:[J.right,J.y]}],b:[L,o,t,r,H,i,{to:[J.x,J.bottom]}],tl:[L,n,m,g,H,r,H],bl:[L,n,t,g,H,r,H,i,{to:[J.x,J.bottom]}],br:[L,o,t,g,H,r,H,i,{to:[J.x+J.width,J.bottom]}],tr:[L,o,m,g,H,r,H,i,{to:[J.right,J.y]}]});arguments.callee.anim=q(D).fxanim(K,E,e,0.5,s,N)});return I},puff:function(I){I=y(I);var G=this,H=G.dom,D=H.style,E,C,F;G.queueFx(I,function(){E=q(H).getWidth();C=q(H).getHeight();q(H).clearOpacity();q(H).show();F=q(H).getFxRestore();function J(){I.useDisplay?q(H).setDisplayed(u):q(H).hide();q(H).clearOpacity();q(H).setPositioning(F.pos);D.width=F.width;D.height=F.height;D.fontSize="";q(H).afterFx(I)}arguments.callee.anim=q(H).fxanim({width:{to:q(H).adjustWidth(E*2)},height:{to:q(H).adjustHeight(C*2)},points:{by:[-E*0.5,-C*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},I,e,0.5,s,J)});return G},switchOff:function(G){G=y(G);var E=this,F=E.dom,C=F.style,D;E.queueFx(G,function(){q(F).clearOpacity();q(F).clip();D=q(F).getFxRestore();function H(){G.useDisplay?q(F).setDisplayed(u):q(F).hide();q(F).clearOpacity();q(F).setPositioning(D.pos);C.width=D.width;C.height=D.height;q(F).afterFx(G)}q(F).fxanim({opacity:{to:0.3}},z,z,0.1,z,function(){q(F).clearOpacity();(function(){q(F).fxanim({height:{to:1},points:{by:[0,q(F).getHeight()*0.5]}},G,e,0.3,"easeIn",H)}).defer(100)})});return E},highlight:function(E,I){I=y(I);var G=this,H=G.dom,C=I.attr||"backgroundColor",D={},F;G.queueFx(I,function(){q(H).clearOpacity();q(H).show();function J(){H.style[C]=F;q(H).afterFx(I)}F=H.style[C];D[C]={from:E||"ffff9c",to:I.endColor||q(H).getColor(C)||"ffffff"};arguments.callee.anim=q(H).fxanim(D,I,"color",1,"easeIn",J)});return G},frame:function(C,F,I){I=y(I);var E=this,H=E.dom,D,G;E.queueFx(I,function(){C=C||"#C3DAF9";if(C.length==6){C="#"+C}F=F||1;q(H).show();var M=q(H).getXY(),K={x:M[0],y:M[1],0:M[0],1:M[1],width:H.offsetWidth,height:H.offsetHeight},J=function(){D=q(document.body||document.documentElement).createChild({style:{position:A,"z-index":35000,border:"0px solid "+C}});return D.queueFx({},L)};arguments.callee.anim={isAnimated:true,stop:function(){F=0;D.stopFx()}};function L(){var N=Ext.isBorderBox?2:1;G=D.anim({top:{from:K.y,to:K.y-20},left:{from:K.x,to:K.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:K.height,to:K.height+20*N},width:{from:K.width,to:K.width+20*N}},{duration:I.duration||1,callback:function(){D.remove();--F>0?J():q(H).afterFx(I)}});arguments.callee.anim={isAnimated:true,stop:function(){G.stop()}}}J()});return E},pause:function(E){var D=this.dom,C;this.queueFx({},function(){C=setTimeout(function(){q(D).afterFx({})},E*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(C);q(D).afterFx({})}}});return this},fadeIn:function(E){E=y(E);var C=this,D=C.dom,F=E.endOpacity||1;C.queueFx(E,function(){q(D).setOpacity(0);q(D).fixDisplay();D.style.visibility=v;arguments.callee.anim=q(D).fxanim({opacity:{to:F}},E,z,0.5,s,function(){if(F==1){q(D).clearOpacity()}q(D).afterFx(E)})});return C},fadeOut:function(F){F=y(F);var D=this,E=D.dom,C=E.style,G=F.endOpacity||0;D.queueFx(F,function(){arguments.callee.anim=q(E).fxanim({opacity:{to:G}},F,z,0.5,s,function(){if(G==0){Ext.Element.data(E,"visibilityMode")==Ext.Element.DISPLAY||F.useDisplay?C.display="none":C.visibility=x;q(E).clearOpacity()}q(E).afterFx(F)})});return D},scale:function(C,D,E){this.shift(Ext.apply({},E,{width:C,height:D}));return this},shift:function(E){E=y(E);var D=this.dom,C={};this.queueFx(E,function(){for(var F in E){if(E[F]!=B){C[F]={to:E[F]}}}C.width?C.width.to=q(D).adjustWidth(E.width):C;C.height?C.height.to=q(D).adjustWidth(E.height):C;if(C.x||C.y||C.xy){C.points=C.xy||{to:[C.x?C.x.to:q(D).getX(),C.y?C.y.to:q(D).getY()]}}arguments.callee.anim=q(D).fxanim(C,E,e,0.35,s,function(){q(D).afterFx(E)})});return this},ghost:function(F,D){D=y(D);var H=this,E=H.dom,K=E.style,I={opacity:{to:0},points:{}},L=I.points,C,J,G;F=F||"b";H.queueFx(D,function(){C=q(E).getFxRestore();J=q(E).getWidth();G=q(E).getHeight();function M(){D.useDisplay?q(E).setDisplayed(u):q(E).hide();q(E).clearOpacity();q(E).setPositioning(C.pos);K.width=C.width;K.height=C.height;q(E).afterFx(D)}L.by=q(E).switchStatements(F.toLowerCase(),function(O,N){return[O,N]},{t:[0,-G],l:[-J,0],r:[J,0],b:[0,G],tl:[-J,-G],bl:[-J,G],br:[J,G],tr:[J,-G]});arguments.callee.anim=q(E).fxanim(I,D,e,0.5,s,M)});return H},syncFx:function(){var C=this;C.fxDefaults=Ext.apply(C.fxDefaults||{},{block:u,concurrent:l,stopFx:u});return C},sequenceFx:function(){var C=this;C.fxDefaults=Ext.apply(C.fxDefaults||{},{block:u,concurrent:u,stopFx:u});return C},nextFx:function(){var C=c(this.dom.id)[0];if(C){C.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(C){var D=this,F=D.dom.id;if(D.hasActiveFx()){var E=c(F)[0];if(E&&E.anim){if(E.anim.isAnimated){b(F,[E]);E.anim.stop(C!==undefined?C:l)}else{b(F,[])}}}return D},beforeFx:function(C){if(this.hasActiveFx()&&!C.concurrent){if(C.stopFx){this.stopFx();return l}return u}return l},hasFxBlock:function(){var C=c(this.dom.id);return C&&C[0]&&C[0].block},queueFx:function(F,C){var D=q(this.dom);if(!D.hasFxBlock()){Ext.applyIf(F,D.fxDefaults);if(!F.concurrent){var E=D.beforeFx(F);C.block=F.block;c(D.dom.id).push(C);if(E){D.nextFx()}}else{C.call(D)}}return D},fxWrap:function(I,G,E){var F=this.dom,D,C;if(!G.wrap||!(D=Ext.getDom(G.wrap))){if(G.fixPosition){C=q(F).getXY()}var H=document.createElement("div");H.style.visibility=E;D=F.parentNode.insertBefore(H,F);q(D).setPositioning(I);if(q(D).isStyle(p,"static")){q(D).position("relative")}q(F).clearPositioning("auto");q(D).clip();D.appendChild(F);if(C){q(D).setXY(C)}}return D},fxUnwrap:function(D,G,F){var E=this.dom;q(E).clearPositioning();q(E).setPositioning(G);if(!F.wrap){var C=q(D).dom.parentNode;C.insertBefore(E,D);q(D).remove()}},getFxRestore:function(){var C=this.dom.style;return{pos:this.getPositioning(),width:C.width,height:C.height}},afterFx:function(D){var C=this.dom,E=C.id;if(D.afterStyle){q(C).setStyle(D.afterStyle)}if(D.afterCls){q(C).addClass(D.afterCls)}if(D.remove==l){q(C).remove()}if(D.callback){D.callback.call(D.scope,q(C))}if(!D.concurrent){c(E).shift();q(C).nextFx()}},fxanim:function(F,G,D,H,E,C){D=D||"run";G=G||{};var I=Ext.lib.Anim[D](this.dom,F,(G.duration||H)||0.35,(G.easing||E)||s,C,this);G.anim=I;return I}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(typeof d=="string"){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;Ext.CompositeElementLite.importElementMethods=function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(typeof b[c]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}};Ext.CompositeElementLite.importElementMethods();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var b="beforerequest",e="requestcomplete",d="requestexception",h=undefined,c="load",i="POST",a="GET",g=window;Ext.data.Connection=function(k){Ext.apply(this,k);this.addEvents(b,e,d);Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(q){var t=this;if(t.fireEvent(b,t,q)){if(q.el){if(!Ext.isEmpty(q.indicatorText)){t.indicatorText='
'+q.indicatorText+"
"}if(t.indicatorText){Ext.getDom(q.el).innerHTML=t.indicatorText}q.success=(Ext.isFunction(q.success)?q.success:function(){}).createInterceptor(function(o){Ext.getDom(q.el).innerHTML=o.responseText})}var m=q.params,l=q.url||t.url,k,r={success:t.handleResponse,failure:t.handleFailure,scope:t,argument:{options:q},timeout:Ext.num(q.timeout,t.timeout)},n,u;if(Ext.isFunction(m)){m=m.call(q.scope||g,q)}m=Ext.urlEncode(t.extraParams,Ext.isObject(m)?Ext.urlEncode(m):m);if(Ext.isFunction(l)){l=l.call(q.scope||g,q)}if((n=Ext.getDom(q.form))){l=l||n.action;if(q.isUpload||(/multipart\/form-data/i.test(n.getAttribute("enctype")))){return t.doFormUpload.call(t,q,m,l)}u=Ext.lib.Ajax.serializeForm(n);m=m?(m+"&"+u):u}k=q.method||t.method||((m||q.xmlData||q.jsonData)?i:a);if(k===a&&(t.disableCaching&&q.disableCaching!==false)||q.disableCaching===true){var s=q.disableCachingParam||t.disableCachingParam;l=Ext.urlAppend(l,s+"="+(new Date().getTime()))}q.headers=Ext.apply(q.headers||{},t.defaultHeaders||{});if(q.autoAbort===true||t.autoAbort){t.abort()}if((k==a||q.xmlData||q.jsonData)&&m){l=Ext.urlAppend(l,m);m=""}return(t.transId=Ext.lib.Ajax.request(k,l,r,m,q))}else{return q.callback?q.callback.apply(q.scope,[q,h,h]):null}},isLoading:function(k){return k?Ext.lib.Ajax.isCallInProgress(k):!!this.transId},abort:function(k){if(k||this.isLoading()){Ext.lib.Ajax.abort(k||this.transId)}},handleResponse:function(k){this.transId=false;var l=k.argument.options;k.argument=l?l.argument:null;this.fireEvent(e,this,k,l);if(l.success){l.success.call(l.scope,k,l)}if(l.callback){l.callback.call(l.scope,l,true,k)}},handleFailure:function(k,m){this.transId=false;var l=k.argument.options;k.argument=l?l.argument:null;this.fireEvent(d,this,k,l,m);if(l.failure){l.failure.call(l.scope,k,l)}if(l.callback){l.callback.call(l.scope,l,false,k)}},doFormUpload:function(r,k,l){var m=Ext.id(),w=document,s=w.createElement("iframe"),n=Ext.getDom(r.form),v=[],u,q="multipart/form-data",p={target:n.target,method:n.method,encoding:n.encoding,enctype:n.enctype,action:n.action};Ext.fly(s).set({id:m,name:m,cls:"x-hidden",src:Ext.SSL_SECURE_URL});w.body.appendChild(s);if(Ext.isIE){document.frames[m].name=m}Ext.fly(n).set({target:m,method:i,enctype:q,encoding:q,action:l||p.action});Ext.iterate(Ext.urlDecode(k,false),function(x,o){u=w.createElement("input");Ext.fly(u).set({type:"hidden",value:o,name:x});n.appendChild(u);v.push(u)});function t(){var y=this,x={responseText:"",responseXML:null,argument:r.argument},B,A;try{B=s.contentWindow.document||s.contentDocument||g.frames[m].document;if(B){if(B.body){if(/textarea/i.test((A=B.body.firstChild||{}).tagName)){x.responseText=A.value}else{x.responseText=B.body.innerHTML}}x.responseXML=B.XMLDocument||B}}catch(z){}Ext.EventManager.removeListener(s,c,t,y);y.fireEvent(e,y,x,r);function o(E,D,C){if(Ext.isFunction(E)){E.apply(D,C)}}o(r.success,r.scope,[x,r]);o(r.callback,r.scope,[r,true,x]);if(!y.debugUploads){setTimeout(function(){Ext.removeNode(s)},100)}}Ext.EventManager.on(s,c,t,this);n.submit();Ext.fly(n).set(p);Ext.each(v,function(o){Ext.removeNode(o)})}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.util.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!o.getElementsByTagName){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(doEncode(i),":",v===null?"null":doEncode(v));b=true}}}}a.push("}");return a.join("")}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'},encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i
';e.body.appendChild(g);d=g.lastChild;if((c=e.defaultView)){if(c.getComputedStyle(g.firstChild.firstChild,null).marginRight!="0px"){b.correctRightMargin=false}if(c.getComputedStyle(d,null).backgroundColor!="transparent"){b.correctTransparentColor=false}}b.cssFloat=!!d.style.cssFloat;e.body.removeChild(g)};if(Ext.isReady){a()}else{Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,c=/(dbl)?click/,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},d=Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2};Ext.EventObjectImpl=function(g){if(g){this.setEvent(g.browserEvent||g)}};Ext.EventObjectImpl.prototype={setEvent:function(h){var g=this;if(h==g||(h&&h.browserEvent)){return h}g.browserEvent=h;if(h){g.button=h.button?d[h.button]:(h.which?h.which-1:-1);if(c.test(h.type)&&g.button==-1){g.button=0}g.type=h.type;g.shiftKey=h.shiftKey;g.ctrlKey=h.ctrlKey||h.metaKey||false;g.altKey=h.altKey;g.keyCode=h.keyCode;g.charCode=h.charCode;g.target=b.getTarget(h);g.xy=b.getXY(h)}else{g.button=-1;g.shiftKey=false;g.ctrlKey=false;g.altKey=false;g.keyCode=0;g.charCode=0;g.target=null;g.xy=[0,0]}return g},stopEvent:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopEvent(e.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopPropagation(e.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(e){return Ext.isSafari?(a[e]||e):e},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(g,h,e){return g?Ext.fly(this.target).findParent(g,h,e):(e?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var g=this.browserEvent;var h=0;if(g.wheelDelta){h=g.wheelDelta/120}else{if(g.detail){h=-g.detail/3}}return h},within:function(h,i,e){if(h){var g=this[i?"getRelatedTarget":"getTarget"]();return g&&((e?(g==Ext.getDom(h)):false)||Ext.fly(h).contains(g))}return false}};return new Ext.EventObjectImpl()}();Ext.Loader=Ext.apply({},{load:function(k,i,l,c){var l=l||this,g=document.getElementsByTagName("head")[0],b=document.createDocumentFragment(),a=k.length,h=0,e=this;var m=function(n){g.appendChild(e.buildScriptTag(k[n],d))};var d=function(){h++;if(a==h&&typeof i=="function"){i.call(l)}else{if(c===true){m(h)}}};if(c===true){m.call(this,0)}else{Ext.each(k,function(o,n){b.appendChild(this.buildScriptTag(o,d))},this);g.appendChild(b)}},buildScriptTag:function(b,c){var a=document.createElement("script");a.type="text/javascript";a.src=b;if(a.readyState){a.onreadystatechange=function(){if(a.readyState=="loaded"||a.readyState=="complete"){a.onreadystatechange=null;c()}}}else{a.onload=c}return a}});Ext.ns("Ext.grid","Ext.list","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout","Ext.app","Ext.ux","Ext.chart","Ext.direct");Ext.apply(Ext,function(){var c=Ext,a=0,b=null;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7||Ext.isAir?"http://www.extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(d,e){return Ext.extend(d,e(d.prototype))},getDoc:function(){return Ext.get(document)},num:function(e,d){e=Number(Ext.isEmpty(e)||Ext.isArray(e)||typeof e=="boolean"||(typeof e=="string"&&e.trim().length==0)?NaN:e);return isNaN(e)?d:e},value:function(g,d,e){return Ext.isEmpty(g,e)?d:g},escapeRe:function(d){return d.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(h,d,g,e){h[d]=h[d].createSequence(g,e)},addBehaviors:function(i){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(i)})}else{var e={},h,d,g;for(d in i){if((h=d.split("@"))[1]){g=h[0];if(!e[g]){e[g]=Ext.select(g)}e[g].on(h[1],i[d])}}e=null}},getScrollBarWidth:function(g){if(!Ext.isReady){return 0}if(g===true||b===null){var i=Ext.getBody().createChild('
'),h=i.child("div",true);var e=h.offsetWidth;i.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var d=h.offsetWidth;i.remove();b=e-d+2}return b},combine:function(){var g=arguments,e=g.length,k=[];for(var h=0;hh?1:-1};Ext.each(d,function(h){g=e(g,h)==1?g:h});return g},mean:function(d){return d.length>0?Ext.sum(d)/d.length:undefined},sum:function(d){var e=0;Ext.each(d,function(g){e+=g});return e},partition:function(d,e){var g=[[],[]];Ext.each(d,function(k,l,h){g[(e&&e(k,l,h))||(!e&&k)?0:1].push(k)});return g},invoke:function(d,e){var h=[],g=Array.prototype.slice.call(arguments,2);Ext.each(d,function(k,l){if(k&&typeof k[e]=="function"){h.push(k[e].apply(k,g))}else{h.push(undefined)}});return h},pluck:function(d,g){var e=[];Ext.each(d,function(h){e.push(h[g])});return e},zip:function(){var n=Ext.partition(arguments,function(i){return typeof i!="function"}),k=n[0],m=n[1][0],d=Ext.max(Ext.pluck(k,"length")),h=[];for(var l=0;l=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},getArea:function(){var a=this;return((a.bottom-a.top)*(a.right-a.left))},intersect:function(h){var g=this,d=Math.max(g.top,h.top),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.left,h.left);if(a>=d&&e>=c){return new Ext.lib.Region(d,e,a,c)}},union:function(h){var g=this,d=Math.min(g.top,h.top),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.left,h.left);return new Ext.lib.Region(d,e,a,c)},constrainTo:function(b){var a=this;a.top=a.top.constrain(b.top,b.bottom);a.bottom=a.bottom.constrain(b.top,b.bottom);a.left=a.left.constrain(b.left,b.right);a.right=a.right.constrain(b.left,b.right);return a},adjust:function(d,c,a,g){var e=this;e.top+=d;e.left+=c;e.right+=g;e.bottom+=a;return e}};Ext.lib.Region.getRegion=function(e){var h=Ext.lib.Dom.getXY(e),d=h[1],g=h[0]+e.offsetWidth,a=h[1]+e.offsetHeight,c=h[0];return new Ext.lib.Region(d,g,a,c)};Ext.lib.Point=function(a,c){if(Ext.isArray(a)){c=a[1];a=a[0]}var b=this;b.x=b.right=b.left=b[0]=a;b.y=b.top=b.bottom=b[1]=c};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.apply(Ext.DomHelper,function(){var e,a="afterbegin",h="afterend",i="beforebegin",d="beforeend",b=/tag|children|cn|html$/i;function g(n,q,p,r,m,k){n=Ext.getDom(n);var l;if(e.useDom){l=c(q,null);if(k){n.appendChild(l)}else{(m=="firstChild"?n:n.parentNode).insertBefore(l,n[m]||n)}}else{l=Ext.DomHelper.insertHtml(r,n,Ext.DomHelper.createHtml(q))}return p?Ext.get(l,true):l}function c(k,s){var m,v=document,q,t,n,u;if(Ext.isArray(k)){m=v.createDocumentFragment();for(var r=0,p=k.length;r0){return setTimeout(d,c)}d();return 0},createSequence:function(c,b,a){if(!Ext.isFunction(b)){return c}else{return function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}}};Ext.defer=Ext.util.Functions.defer;Ext.createInterceptor=Ext.util.Functions.createInterceptor;Ext.createSequence=Ext.util.Functions.createSequence;Ext.createDelegate=Ext.util.Functions.createDelegate;Ext.apply(Ext.util.Observable.prototype,function(){function a(k){var i=(this.methodEvents=this.methodEvents||{})[k],d,c,g,h=this;if(!i){this.methodEvents[k]=i={};i.originalFn=this[k];i.methodName=k;i.before=[];i.after=[];var b=function(m,l,e){if((c=m.apply(l||h,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[k]=function(){var m=Array.prototype.slice.call(arguments,0),l;d=c=undefined;g=false;for(var n=0,e=i.before.length;n=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{doResizeEvent:function(){var m=a.getViewHeight(),l=a.getViewWidth();if(g!=m||h!=l){c.fire(h=l,g=m)}},onWindowResize:function(n,m,l){if(!c){c=new Ext.util.Event();k=new Ext.util.DelayedTask(this.doResizeEvent);Ext.EventManager.on(window,"resize",this.fireWindowResize,this)}c.addListener(n,m,l)},fireWindowResize:function(){if(c){k.delay(100)}},onTextResize:function(o,n,l){if(!e){e=new Ext.util.Event();var m=new Ext.Element(document.createElement("div"));m.dom.className="x-text-resize";m.dom.innerHTML="X";m.appendTo(document.body);b=m.dom.offsetHeight;setInterval(function(){if(m.dom.offsetHeight!=b){e.fire(b,b=m.dom.offsetHeight)}},this.textResizeInterval)}e.addListener(o,n,l)},removeResizeListener:function(m,l){if(c){c.removeListener(m,l)}},fireResize:function(){if(c){c.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,getKeyEvent:function(){return d?"keydown":"keypress"},useKeydown:d}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(g){g.stopPropagation();if(b){g.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(g){d.on(g,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,g=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(g){var a=g.nextSibling;if(g.nodeType==3&&!(/\S/.test(g.nodeValue))){e.removeChild(g)}else{g.nodeIndex=++c}g=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){if(!this.dom){return this}html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=Ext.id(),dom=this.dom;html+='';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(a,e,d){a=(typeof a=="object")?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.addMethods({getAnchorXY:function(e,m,t){e=(e||"tl").toLowerCase();t=t||{};var l=this,b=l.dom==document.body||l.dom==document,p=t.width||b?Ext.lib.Dom.getViewWidth():l.getWidth(),i=t.height||b?Ext.lib.Dom.getViewHeight():l.getHeight(),q,a=Math.round,c=l.getXY(),n=l.getScroll(),k=b?n.left:!m?c[0]:0,g=b?n.top:!m?c[1]:0,d={c:[a(p*0.5),a(i*0.5)],t:[a(p*0.5),0],l:[0,a(i*0.5)],r:[p,a(i*0.5)],b:[a(p*0.5),i],tl:[0,0],bl:[0,i],br:[p,i],tr:[p,0]};q=d[e];return[q[0]+k,q[1]+g]},anchorTo:function(b,h,c,a,l,m){var i=this,e=i.dom,k=!Ext.isEmpty(l),d=function(){Ext.fly(e).alignTo(b,h,c,a);Ext.callback(m,Ext.fly(e))},g=this.getAnchor();this.removeAnchor();Ext.apply(g,{fn:d,scroll:k});Ext.EventManager.onWindowResize(d,null);if(k){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(l)?l:50})}d.call(i);return i},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignToXY:function(g,B,C){g=Ext.get(g);if(!g||!g.dom){throw"Element.alignToXY with an element that doesn't exist"}C=C||[0,0];B=(!B||B=="?"?"tl-bl?":(!(/-/).test(B)&&B!==""?"tl-"+B:B||"tl-bl")).toLowerCase();var L=this,I=L.dom,N,M,q,n,t,G,z,u=Ext.lib.Dom.getViewWidth()-10,H=Ext.lib.Dom.getViewHeight()-10,b,i,k,l,v,A,O=document,K=O.documentElement,s=O.body,F=(K.scrollLeft||s.scrollLeft||0)+5,E=(K.scrollTop||s.scrollTop||0)+5,J=false,e="",a="",D=B.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!D){throw"Element.alignTo with an invalid alignment "+B}e=D[1];a=D[2];J=!!D[3];N=L.getAnchorXY(e,true);M=g.getAnchorXY(a,false);q=M[0]-N[0]+C[0];n=M[1]-N[1]+C[1];if(J){t=L.getWidth();G=L.getHeight();z=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);k=a.charAt(0);l=a.charAt(a.length-1);v=((b=="t"&&k=="b")||(b=="b"&&k=="t"));A=((i=="r"&&l=="l")||(i=="l"&&l=="r"));if(q+t>u+F){q=A?z.left-t:u+F-t}if(qH+E){n=v?z.top-G:H+E-G}if(nC){q=C-r;n=true}if((p+D)>g){p=g-D;n=true}if(q"+String.format(Ext.Element.boxMarkup,c)+"
"));Ext.DomQuery.selectNode("."+c+"-mc",d.dom).appendChild(this.dom);return d},setSize:function(e,c,d){var g=this;if(typeof e=="object"){c=e.height;e=e.width}e=g.adjustWidth(e);c=g.adjustHeight(c);if(!d||!g.anim){g.dom.style.width=g.addUnits(e);g.dom.style.height=g.addUnits(c)}else{g.anim({width:{to:e},height:{to:c}},g.preanim(arguments,2))}return g},getComputedHeight:function(){var d=this,c=Math.max(d.dom.offsetHeight,d.dom.clientHeight);if(!c){c=parseFloat(d.getStyle("height"))||0;if(!d.isBorderBox()){c+=d.getFrameWidth("tb")}}return c},getComputedWidth:function(){var c=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!c){c=parseFloat(this.getStyle("width"))||0;if(!this.isBorderBox()){c+=this.getFrameWidth("lr")}}return c},getFrameWidth:function(d,c){return c&&this.isBorderBox()?0:(this.getPadding(d)+this.getBorderWidth(d))},addClassOnOver:function(c){this.hover(function(){Ext.fly(this,a).addClass(c)},function(){Ext.fly(this,a).removeClass(c)});return this},addClassOnFocus:function(c){this.on("focus",function(){Ext.fly(this,a).addClass(c)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(c)},this.dom);return this},addClassOnClick:function(c){var d=this.dom;this.on("mousedown",function(){Ext.fly(d,a).addClass(c);var g=Ext.getDoc(),e=function(){Ext.fly(d,a).removeClass(c);g.removeListener("mouseup",e)};g.on("mouseup",e)});return this},getViewSize:function(){var g=document,h=this.dom,c=(h==g||h==g.body);if(c){var e=Ext.lib.Dom;return{width:e.getViewWidth(),height:e.getViewHeight()}}else{return{width:h.clientWidth,height:h.clientHeight}}},getStyleSize:function(){var k=this,c,i,m=document,n=this.dom,e=(n==m||n==m.body),g=n.style;if(e){var l=Ext.lib.Dom;return{width:l.getViewWidth(),height:l.getViewHeight()}}if(g.width&&g.width!="auto"){c=parseFloat(g.width);if(k.isBorderBox()){c-=k.getFrameWidth("lr")}}if(g.height&&g.height!="auto"){i=parseFloat(g.height);if(k.isBorderBox()){i-=k.getFrameWidth("tb")}}return{width:c||k.getWidth(true),height:i||k.getHeight(true)}},getSize:function(c){return{width:this.getWidth(c),height:this.getHeight(c)}},repaint:function(){var c=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(c).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(d){var e=this,c,g={t:"top",l:"left",r:"right",b:"bottom"},h={};if(!d){for(c in e.margins){h[g[c]]=parseFloat(e.getStyle(e.margins[c]))||0}return h}else{return e.addStyles.call(e,d,e.margins)}}}}());Ext.Element.addMethods({setBox:function(e,g,b){var d=this,a=e.width,c=e.height;if((g&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(k,q){var n=this,x,e,p,d=n.getBorderWidth,s=n.getPadding,g,a,v,o;if(!q){x=n.getXY()}else{e=parseInt(n.getStyle("left"),10)||0;p=parseInt(n.getStyle("top"),10)||0;x=[e,p]}var c=n.dom,u=c.offsetWidth,i=c.offsetHeight,m;if(!k){m={x:x[0],y:x[1],0:x[0],1:x[1],width:u,height:i}}else{g=d.call(n,"l")+s.call(n,"l");a=d.call(n,"r")+s.call(n,"r");v=d.call(n,"t")+s.call(n,"t");o=d.call(n,"b")+s.call(n,"b");m={x:x[0]+g,y:x[1]+v,0:x[0]+g,1:x[1]+v,width:u-(g+a),height:i-(v+o)}}m.right=m.x+m.width;m.bottom=m.y+m.height;return m},move:function(k,b,c){var g=this,n=g.getXY(),l=n[0],i=n[1],d=[l-b,i],m=[l+b,i],h=[l,i-b],a=[l,i+b],e={l:d,left:d,r:m,right:m,t:h,top:h,up:h,b:a,bottom:a,down:a};k=k.toLowerCase();g.moveTo(e[k][0],e[k][1],g.animTest.call(g,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,g,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,g)}else{e.anim({points:{to:[b,g]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({scrollTo:function(b,d,a){var e=/top/i.test(b),c=this,g=c.dom,h;if(!a||!c.anim){h="scroll"+(e?"Top":"Left");g[h]=d}else{h="scroll"+(e?"Left":"Top");c.anim({scroll:{to:e?[g[h],d]:[d,g[h]]}},c.preanim(arguments,2),"scroll")}return c},scrollIntoView:function(e,i){var q=Ext.getDom(e)||Ext.getBody().dom,h=this.dom,g=this.getOffsetsTo(q),m=g[0]+q.scrollLeft,v=g[1]+q.scrollTop,s=v+h.offsetHeight,d=m+h.offsetWidth,a=q.clientHeight,n=parseInt(q.scrollTop,10),u=parseInt(q.scrollLeft,10),k=n+a,p=u+q.clientWidth;if(h.offsetHeight>a||vk){q.scrollTop=s-a}}q.scrollTop=q.scrollTop;if(i!==false){if(h.offsetWidth>q.clientWidth||mp){q.scrollLeft=d-q.clientWidth}}q.scrollLeft=q.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(n,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,q=e.scrollTop,o=e.scrollWidth,m=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,p,k={l:Math.min(g+b,o-i),r:p=Math.max(g-b,0),t:Math.max(q-b,0),b:Math.min(q+b,m-a)};k.d=k.b;k.u=k.t;n=n.substr(0,1);if((p=k[n])>-1){c=true;this.scrollTo(n=="l"||n=="r"?"left":"top",p,this.preanim(arguments,2))}return c}});Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c="x-masked",g="x-masked-relative",e=Ext.Element.data;return{isVisible:function(i){var k=!this.isStyle(d,a)&&!this.isStyle(b,h),l=this.dom.parentNode;if(i!==true||!k){return k}while(l&&!(/^body/i.test(l.tagName))){if(!Ext.fly(l,"_isVisible").isVisible()){return false}l=l.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(k,o){var q=this,m=q.dom,p=Ext.DomHelper,n="ext-el-mask-msg",i,r;if(!(/^body/i.test(m.tagName)&&q.getStyle("position")=="static")){q.addClass(g)}if(i=e(m,"maskMsg")){i.remove()}if(i=e(m,"mask")){i.remove()}r=p.append(m,{cls:"ext-el-mask"},true);e(m,"mask",r);q.addClass(c);r.setDisplayed(true);if(typeof k=="string"){var l=p.append(m,{cls:n,cn:{tag:"div"}},true);e(m,"maskMsg",l);l.dom.className=o?n+" "+o:n;l.dom.firstChild.innerHTML=k;l.setDisplayed(true);l.center(q)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&q.getStyle("height")=="auto"){r.setSize(undefined,q.getHeight())}return r},unmask:function(){var l=this,m=l.dom,i=e(m,"mask"),k=e(m,"maskMsg");if(i){if(k){k.remove();e(m,"maskMsg",undefined)}i.remove();e(m,"mask",undefined);l.removeClass([c,g])}},isMasked:function(){var i=e(this.dom,"mask");return i&&i.isVisible()},createShim:function(){var i=document.createElement("iframe"),k;i.frameBorder="0";i.className="ext-shim";i.src=Ext.SSL_SECURE_URL;k=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));k.autoBoxAdjust=false;return k}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(typeof b!="object"||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});Ext.CompositeElementLite.importElementMethods();Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(g,1)}});return this}});Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(b,a){this.elements=[];this.add(b,a)},getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(h){var i=this;i.transaction=null;if(h.argument.form&&h.argument.reset){try{h.argument.form.reset()}catch(k){}}if(i.loadScripts){i.renderer.render(i.el,h,i,g.createDelegate(i,[h]))}else{i.renderer.render(i.el,h,i);g.call(i,h)}}function g(h,i,k){this.fireEvent(i||d,this.el,h);if(Ext.isFunction(h.argument.callback)){h.argument.callback.call(h.argument.scope,this.el,Ext.isEmpty(k)?true:false,h,h.argument.options)}}function e(h){g.call(this,h,c,!!(this.transaction=null))}return{constructor:function(i,h){var k=this;i=Ext.get(i);if(!h&&i.updateManager){return i.updateManager}k.el=i;k.defaultUrl=null;k.addEvents(b,d,c);Ext.apply(k,Ext.Updater.defaults);k.transaction=null;k.refreshDelegate=k.refresh.createDelegate(k);k.updateDelegate=k.update.createDelegate(k);k.formUpdateDelegate=(k.formUpdate||function(){}).createDelegate(k);k.renderer=k.renderer||k.getDefaultRenderer();Ext.Updater.superclass.constructor.call(k)},setRenderer:function(h){this.renderer=h},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(h){this.defaultUrl=h},getEl:function(){return this.el},update:function(i,p,q,m){var l=this,h,k;if(l.fireEvent(b,l.el,i,p)!==false){if(Ext.isObject(i)){h=i;i=h.url;p=p||h.params;q=q||h.callback;m=m||h.discardUrl;k=h.scope;if(!Ext.isEmpty(h.nocache)){l.disableCaching=h.nocache}if(!Ext.isEmpty(h.text)){l.indicatorText='
'+h.text+"
"}if(!Ext.isEmpty(h.scripts)){l.loadScripts=h.scripts}if(!Ext.isEmpty(h.timeout)){l.timeout=h.timeout}}l.showLoading();if(!m){l.defaultUrl=i}if(Ext.isFunction(i)){i=i.call(l)}var n=Ext.apply({},{url:i,params:(Ext.isFunction(p)&&k)?p.createDelegate(k):p,success:a,failure:e,scope:l,callback:undefined,timeout:(l.timeout*1000),disableCaching:l.disableCaching,argument:{options:h,url:i,form:null,callback:q,scope:k||window,params:p}},h);l.transaction=Ext.Ajax.request(n)}},formUpdate:function(l,h,k,m){var i=this;if(i.fireEvent(b,i.el,l,h)!==false){if(Ext.isFunction(h)){h=h.call(i)}l=Ext.getDom(l);i.transaction=Ext.Ajax.request({form:l,url:h,success:a,failure:e,scope:i,timeout:(i.timeout*1000),argument:{url:h,form:l,callback:m,reset:k}});i.showLoading.defer(1,i)}},startAutoRefresh:function(i,k,m,n,h){var l=this;if(h){l.update(k||l.defaultUrl,m,n,true)}if(l.autoRefreshProcId){clearInterval(l.autoRefreshProcId)}l.autoRefreshProcId=setInterval(l.update.createDelegate(l,[k||l.defaultUrl,m,n,true]),i*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(h){if(this.defaultUrl){this.update(this.defaultUrl,null,h,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'
Loading...
',loadScripts:false,sslBlankUrl:Ext.SSL_SECURE_URL};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var m="Y-m-dTH:i:sP",h=[],g=0,d=m.length;g= 0 && y >= 0){","v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(n){var e=Date.parseRegexes.length,p=1,g=[],m=[],l=false,d="",k=0,h,o;for(;k Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:function(){return a("A")},A:{calcLast:true,g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var b=0,e=this.clone(),a=this.getMonth(),c;for(c=0,e.setDate(1),e.setMonth(0);c28){a=Math.min(a,this.getFirstDateOfMonth().add("mo",c).getLastDateOfMonth().getDate())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},between:function(c,a){var b=this.getTime();return c.getTime()<=b&&b<=a.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.MixedCollection=function(b,a){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=b===true;if(a){this.getKey=a}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(b,c){if(arguments.length==1){c=arguments[0];b=this.getKey(c)}if(typeof b!="undefined"&&b!==null){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d=this.length){return this.add(b,c)}this.length++;this.items.splice(a,0,c);if(typeof b!="undefined"&&b!==null){this.map[b]=c}this.keys.splice(a,0,b);this.fireEvent("add",a,c,b);return c},remove:function(a){return this.removeAt(this.indexOf(a))},removeAt:function(a){if(a=0){this.length--;var c=this.items[a];this.items.splice(a,1);var b=this.keys[a];if(typeof b!="undefined"){delete this.map[b]}this.keys.splice(a,1);this.fireEvent("remove",c,b);return c}return false},removeKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return this.items.indexOf(a)},indexOfKey:function(a){return this.keys.indexOf(a)},item:function(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return typeof c!="function"||this.allowFunctions?c:null},itemAt:function(a){return this.items[a]},key:function(a){return this.map[a]},contains:function(a){return this.indexOf(a)!=-1},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(l,a,k){var d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],m=this.keys,g=this.items;k=k||function(i,c){return i-c};for(d=0,e=g.length;de?1:(g=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(g,e){var h=new Ext.util.MixedCollection();h.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c]+>/gi,stripScriptsRe=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,nl2brRe=/\r?\n/g;return{ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2),index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{return value.substr(0,len-3)+"..."}}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split("."),whole=ps[0],sub=ps[1]?"."+ps[1]:".00",r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTags:function(v){return !v?v:String(v).replace(stripTagsRE,"")},stripScripts:function(v){return !v?v:String(v).replace(stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var z=this,k=z.html,r=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^]*?for="(.*?)"/,w=/^]*?if="(.*?)"/,y=/^]*?exec="(.*?)"/,t,q=0,l=[],p="values",x="parent",n="xindex",o="xcount",e="return ",c="with(values){ ";k=["",k,""].join("");while((t=k.match(r))){var b=t[0].match(d),a=t[0].match(w),B=t[0].match(y),g=null,h=null,u=null,A=b&&b[1]?b[1]:"";if(a){g=a&&a[1]?a[1]:null;if(g){h=new Function(p,x,n,o,c+e+(Ext.util.Format.htmlDecode(g))+"; }")}}if(B){g=B&&B[1]?B[1]:null;if(g){u=new Function(p,x,n,o,c+(Ext.util.Format.htmlDecode(g))+"; }")}}if(A){switch(A){case".":A=new Function(p,x,c+e+p+"; }");break;case"..":A=new Function(p,x,c+e+x+"; }");break;default:A=new Function(p,x,c+e+A+"; }")}}l.push({id:q,target:A,exec:u,test:h,body:t[1]||""});k=k.replace(t[0],"{xtpl"+q+"}");++q}for(var v=l.length-1;v>=0;--v){z.compileTpl(l[v])}z.master=l[l.length-1];z.tpls=l};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,l,k,d,c){var h=this,g,n=h.tpls[a],m,b=[];if((n.test&&!n.test.call(h,l,k,d,c))||(n.exec&&n.exec.call(h,l,k,d,c))){return""}m=n.target?n.target.call(h,l,k):l;g=m.length;k=n.target?l:k;if(n.target&&Ext.isArray(m)){for(var e=0,g=m.length;e=0;--g){d[k[g].selectorText.toLowerCase()]=k[g]}}catch(i){}},getRules:function(h){if(d===null||h){d={};var l=c.styleSheets;for(var k=0,g=l.length;k=37&&a<=40){b.stopEvent()}},destroy:function(){this.disable()},enable:function(){if(this.disabled){if(Ext.isSafari2){this.el.on("keyup",this.stopKeyUp,this)}this.el.on(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=false}},disable:function(){if(!this.disabled){if(Ext.isSafari2){this.el.un("keyup",this.stopKeyUp,this)}this.el.un(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};Ext.KeyMap=function(c,b,a){this.el=Ext.get(c);this.eventName=a||"keydown";this.bindings=[];if(b){this.addBinding(b)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(b){if(Ext.isArray(b)){Ext.each(b,function(m){this.addBinding(m)},this);return}var k=b.key,g=b.fn||b.handler,l=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof k=="string"){var h=[];var e=k.toUpperCase();for(var c=0,d=e.length;c2)?a[2]:null;var h=(i>3)?a[3]:"/";var d=(i>4)?a[4]:null;var g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;var c=0;while(e0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=Ext.extend(Object,{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;ck+p.left){l=k-m-c;g=true}if((i+e)>d+p.top){i=d-e-c;g=true}if(l=n){i=n-e-5}}o=[l,i];this.storeXY(o);a.setXY.call(this,o);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){a.setXY.call(this,this.lastXY)}else{if(this.lastLT){a.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(i,h,l,m,k){if(i){this.showAction()}if(h&&i){var g=function(){this.sync(true);if(m){m()}}.createDelegate(this);a.setVisible.call(this,true,true,l,g,k)}else{if(!i){this.hideUnders(true)}var g=m;if(h){g=function(){this.hideAction();if(m){m()}}.createDelegate(this)}a.setVisible.call(this,i,h,l,g,k);if(i){this.sync(true)}else{if(!h){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(k,h,l,m,i){this.fixDisplay();this.beforeAction();this.storeXY(k);var g=this.createCB(m);a.setXY.call(this,k,h,l,g,i);if(!h){g()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(g,h,k,l,i){this.setXY([g,this.getY()],h,k,l,i);return this},setY:function(l,g,i,k,h){this.setXY([this.getX(),l],g,i,k,h);return this},setSize:function(k,l,i,n,o,m){this.beforeAction();var g=this.createCB(o);a.setSize.call(this,k,l,i,n,g,m);if(!i){g()}return this},setWidth:function(i,h,l,m,k){this.beforeAction();var g=this.createCB(m);a.setWidth.call(this,i,h,l,g,k);if(!h){g()}return this},setHeight:function(k,i,m,n,l){this.beforeAction();var g=this.createCB(n);a.setHeight.call(this,k,i,m,g,l);if(!i){g()}return this},setBounds:function(p,n,q,i,o,l,m,k){this.beforeAction();var g=this.createCB(m);if(!o){this.storeXY([p,n]);a.setXY.call(this,[p,n]);a.setSize.call(this,q,i,o,l,g,k);g()}else{a.setBounds.call(this,p,n,q,i,o,l,g,k)}return this},setZIndex:function(c){this.zindex=c;this.setStyle("z-index",c+2);if(this.shadow){this.shadow.setZIndex(c+1)}if(this.shim){this.shim.setStyle("z-index",c)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=this.offset,c={h:0},b=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":c.w=0;c.l=c.t=e;c.t-=1;if(Ext.isIE){c.l-=this.offset+b;c.t-=this.offset+b;c.w-=b;c.h-=b;c.t+=1}break;case"sides":c.w=(e*2);c.l=-e;c.t=e-1;if(Ext.isIE){c.l-=(this.offset-b);c.t-=this.offset+b;c.l+=1;c.w-=(this.offset-b)*2;c.w-=b+1;c.h-=1}break;case"frame":c.w=c.h=(e*2);c.l=c.t=-e;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(this.offset-b);c.t-=(this.offset-b);c.l+=1;c.w-=(this.offset+b+1);c.h-=(this.offset+b);c.h+=1}break}this.adjusts=c};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(a){a=Ext.get(a);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=a.dom){this.el.insertBefore(a)}}this.el.setStyle("z-index",this.zIndex||parseInt(a.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(a.getLeft(true),a.getTop(true),a.getWidth(),a.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,u,r,g){if(!this.el){return}var o=this.adjusts,m=this.el.dom,v=m.style,i=0,q=(r+o.w),e=(g+o.h),k=q+"px",p=e+"px",n,c;v.left=(b+o.l)+"px";v.top=(u+o.t)+"px";if(v.width!=k||v.height!=p){v.width=k;v.height=p;if(!Ext.isIE){n=m.childNodes;c=Math.max(0,(q-12))+"px";n[0].childNodes[1].style.width=c;n[1].childNodes[1].style.width=c;n[2].childNodes[1].style.width=c;n[1].style.height=Math.max(0,(e-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}}};Ext.Shadow.Pool=function(){var b=[],a=Ext.isIE?'
':'
';return{pull:function(){var c=b.shift();if(!c){c=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,a));c.autoBoxAdjust=false}return c},push:function(c){b.push(c)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(b,d){if(typeof b=="object"){d=b.height;b=b.width}if(Ext.isDefined(b)&&Ext.isDefined(this.boxMinWidth)&&(bthis.boxMaxWidth)){b=this.boxMaxWidth}if(Ext.isDefined(d)&&Ext.isDefined(this.boxMaxHeight)&&(d>this.boxMaxHeight)){d=this.boxMaxHeight}if(!this.boxReady){this.width=b;this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d),g=c.width,a=c.height,e;if(g!==undefined||a!==undefined){e=this.getResizeEl();if(!this.deferHeight&&g!==undefined&&a!==undefined){e.setSize(g,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(g!==undefined){e.setWidth(g)}}}this.onResize(g,a,b,d);this.fireEvent("resize",this,g,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getResizeEl:function(){return this.resizeEl||this.el},setAutoScroll:function(a){if(this.rendered){this.getContentTarget().setOverflow(a?"auto":"")}this.autoScroll=a;return this},setPosition:function(a,g){if(a&&typeof a[1]=="number"){g=a[1];a=a[0]}this.x=a;this.y=g;if(!this.boxReady){return this}var b=this.adjustPosition(a,g);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().translatePoints(a,c);this.setPosition(b.left,b.top);return this},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}this.boxReady=true;Ext.isDefined(this.autoScroll)&&this.setAutoScroll(this.autoScroll);this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);delete this.overlay}var a;if(this.orientation==Ext.SplitBar.HORIZONTAL){a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?b[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-b[0])}else{a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?b[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-b[1])}a=Math.min(Math.max(a,this.activeMinSize),this.activeMaxSize);if(a!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,a)!==false){this.adapter.setElementSize(this,a);this.fireEvent("moved",this,a);this.fireEvent("resize",this,a)}}},getAdapter:function(){return this.adapter},setAdapter:function(a){this.adapter=a;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(a){this.minSize=a},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(a){this.maxSize=a},setCurrentSize:function(b){var a=this.animate;this.animate=false;this.adapter.setElementSize(this,b);this.animate=a},destroy:function(a){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});Ext.SplitBar.createProxy=function(b){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.unselectable();var a="x-splitbar-proxy";c.addClass(a+" "+(b==Ext.SplitBar.HORIZONTAL?a+"-h":a+"-v"));return c.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(a){},getElementSize:function(a){if(a.orientation==Ext.SplitBar.HORIZONTAL){return a.resizingEl.getWidth()}else{return a.resizingEl.getHeight()}},setElementSize:function(b,a,c){if(b.orientation==Ext.SplitBar.HORIZONTAL){if(!b.animate){b.resizingEl.setWidth(a);if(c){c(b,a)}}else{b.resizingEl.setWidth(a,true,0.1,c,"easeOut")}}else{if(!b.animate){b.resizingEl.setHeight(a);if(c){c(b,a)}}else{b.resizingEl.setHeight(a,true,0.1,c,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(a){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(a)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(a){this.basic.init(a)},getElementSize:function(a){return this.basic.getElementSize(a)},setElementSize:function(b,a,c){this.basic.setElementSize(b,a,this.moveSplitter.createDelegate(this,[b]))},moveSplitter:function(a){var b=Ext.SplitBar;switch(a.placement){case b.LEFT:a.el.setX(a.resizingEl.getRight());break;case b.RIGHT:a.el.setStyle("right",(this.container.getWidth()-a.resizingEl.getLeft())+"px");break;case b.TOP:a.el.setY(a.resizingEl.getBottom());break;case b.BOTTOM:a.el.setY(a.resizingEl.getTop()-a.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;Ext.Container=Ext.extend(Ext.BoxComponent,{bufferResize:50,autoDestroy:true,forceLayout:false,defaultType:"panel",resizeEvent:"resize",bubbleEvents:["add","remove"],initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var a=this.items;if(a){delete this.items;this.add(a)}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(a){if(this.layout&&this.layout!=a){this.layout.setContainer(null)}this.layout=a;this.initItems();a.setContainer(this)},afterRender:function(){Ext.Container.superclass.afterRender.call(this);if(!this.layout){this.layout="auto"}if(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}if(Ext.isString(this.layout)){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined&&this.layout.setActiveItem){var a=this.activeItem;delete this.activeItem;this.layout.setActiveItem(a)}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(b){this.initItems();var e=arguments.length>1;if(e||Ext.isArray(b)){var a=[];Ext.each(e?arguments:b,function(h){a.push(this.add(h))},this);return a}var g=this.lookupComponent(this.applyDefaults(b));var d=this.items.length;if(this.fireEvent("beforeadd",this,g,d)!==false&&this.onBeforeAdd(g)!==false){this.items.add(g);g.onAdded(this,d);this.onAdd(g);this.fireEvent("add",this,g,d)}return g},onAdd:function(a){},onAdded:function(a,b){this.ownerCt=a;this.initRef();this.cascade(function(d){d.initRef()});this.fireEvent("added",this,a,b)},insert:function(e,b){var d=arguments,h=d.length,a=[],g,k;this.initItems();if(h>2){for(g=h-1;g>=1;--g){a.push(this.insert(e,d[g]))}return a}k=this.lookupComponent(this.applyDefaults(b));e=Math.min(e,this.items.length);if(this.fireEvent("beforeadd",this,k,e)!==false&&this.onBeforeAdd(k)!==false){if(k.ownerCt==this){this.items.remove(k)}this.items.insert(e,k);k.onAdded(this,e);this.onAdd(k);this.fireEvent("add",this,k,e)}return k},applyDefaults:function(b){var a=this.defaults;if(a){if(Ext.isFunction(a)){a=a.call(this,b)}if(Ext.isString(b)){b=Ext.ComponentMgr.get(b);Ext.apply(b,a)}else{if(!b.events){Ext.applyIf(b.isAction?b.initialConfig:b,a)}else{Ext.apply(b,a)}}}return b},onBeforeAdd:function(a){if(a.ownerCt){a.ownerCt.remove(a,false)}if(this.hideBorders===true){a.border=(a.border===true)}},remove:function(a,b){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.doRemove(d,b);this.fireEvent("remove",this,d)}return d},onRemove:function(a){},doRemove:function(e,d){var b=this.layout,a=b&&this.rendered;if(a){b.onRemove(e)}this.items.remove(e);e.onRemoved();this.onRemove(e);if(d===true||(d!==false&&this.autoDestroy)){e.destroy()}if(a){b.afterRemove(e)}},removeAll:function(c){this.initItems();var e,g=[],b=[];this.items.each(function(h){g.push(h)});for(var d=0,a=g.length;d','','
','
',"");a.disableFormats=true;return a.compile()})(),destroy:function(){if(this.resizeTask&&this.resizeTask.cancel){this.resizeTask.cancel()}if(this.container){this.container.un(this.container.resizeEvent,this.onResize,this)}if(!Ext.isEmpty(this.targetCls)){var a=this.container.getLayoutTarget();if(a){a.removeClass(this.targetCls)}}}});Ext.layout.AutoLayout=Ext.extend(Ext.layout.ContainerLayout,{type:"auto",monitorResize:true,onLayout:function(d,g){Ext.layout.AutoLayout.superclass.onLayout.call(this,d,g);var e=this.getRenderedItems(d),a=e.length,b,h;for(b=0;b0){b.setSize(a)}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,layoutOnCardChange:false,renderHidden:true,type:"card",setActiveItem:function(d){var a=this.activeItem,b=this.container;d=b.getComponent(d);if(d&&a!=d){if(a){a.hide();if(a.hidden!==true){return false}a.fireEvent("deactivate",a)}var c=d.doLayout&&(this.layoutOnCardChange||!d.rendered);this.activeItem=d;delete d.deferLayout;d.show();this.layout();if(c){d.doLayout()}d.fireEvent("activate",d)}},renderAll:function(a,b){if(this.deferredRender){this.renderItem(this.activeItem,undefined,b)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,a,b)}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,getLayoutTargetSize:function(){var b=this.container.getLayoutTarget(),a={};if(b){a=b.getViewSize();if(Ext.isIE&&Ext.isStrict&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},onLayout:function(n,x){Ext.layout.AnchorLayout.superclass.onLayout.call(this,n,x);var q=this.getLayoutTargetSize(),l=q.width,p=q.height,r=x.getStyle("overflow"),o=this.getRenderedItems(n),u=o.length,g=[],k,a,w,m,h,c,e,d,v=0,t,b;if(l<20&&p<20){return}if(n.anchorSize){if(typeof n.anchorSize=="number"){a=n.anchorSize}else{a=n.anchorSize.width;w=n.anchorSize.height}}else{a=n.initialConfig.width;w=n.initialConfig.height}for(t=0;t ');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){var a=this.expandToolEl=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);a.addClassOnOver("x-tool-expand-"+this.position+"-over");a.on("click",this.onExpandClick,this,{stopEvent:true})}if(this.floatable!==false||this.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this)}}}return this.collapsedEl},onExpandClick:function(a){if(this.isSlid){this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(a){this.panel.collapse()},beforeCollapse:function(c,a){this.lastAnim=a;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();var b=this.panel.getEl();this.originalZIndex=b.getStyle("z-index");b.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(a){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(a){if(this.isSlid){this.afterSlideIn()}var b=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,b.getHeight())}else{this.panel.setSize(b.getWidth(),undefined)}b.hide();b.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",this.floatingZIndex)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",this.originalZIndex);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(a){if(this.isSlid){a.stopPropagation();this.slideIn()}else{a.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(a){this.panel=a},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(a){var b=this.getCollapsedEl();b.setLeftTop(a.x,a.y);b.setSize(a.width,a.height)},applyLayout:function(a){if(this.isCollapsed){this.applyLayoutCollapsed(a)}else{this.panel.setPosition(a.x,a.y);this.panel.setSize(a.width,a.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){this.autoHideSlideTask=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(a){if(!a.within(this.el,true)){this.autoHideSlideTask.delay(500)}},mouseover:function(a){this.autoHideSlideTask.cancel()},scope:this}}this.el.on(this.autoHideHd);this.collapsedEl.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover);this.collapsedEl.un("mouseout",this.autoHideHd.mouseout);this.collapsedEl.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return}this.isSlid=true;var b=this.panel.tools,c,a;if(b&&b.toggle){b.toggle.hide()}this.el.show();a=this.panel.collapsed;this.panel.collapsed=false;if(this.position=="east"||this.position=="west"){c=this.panel.deferHeight;this.panel.deferHeight=false;this.panel.setSize(undefined,this.collapsedEl.getHeight());this.panel.deferHeight=c}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.panel.collapsed=a;this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}},destroy:function(){if(this.autoHideSlideTask&&this.autoHideSlideTask.cancel){this.autoHideSlideTask.cancel()}Ext.destroyMembers(this,"miniCollapsedEl","collapsedEl","expandToolEl")}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:" ",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;this.split.placement=b.placement;this.split.getMaximumSize=this[b.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[b.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[b.maxProp];if(c.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var a=this.panel.getSize();if(this.position=="north"||this.position=="south"){a.height+=this.splitEl.dom.offsetHeight}else{a.width+=this.splitEl.dom.offsetWidth}return a},getHMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getWidth()+a.el.getWidth())-a.getMinWidth())},getVMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getHeight()+a.el.getHeight())-a.getMinHeight())},onSplitMove:function(b,a){var c=this.panel.getSize();this.lastSplitSize=a;if(this.position=="north"||this.position=="south"){this.panel.setSize(c.width,a);this.state.height=a}else{this.panel.setSize(a,c.height);this.state.width=a}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",trackLabels:true,type:"form",onRemove:function(d){Ext.layout.FormLayout.superclass.onRemove.call(this,d);if(this.trackLabels){d.un("show",this.onFieldShow,this);d.un("hide",this.onFieldHide,this)}var b=d.getPositionEl(),a=d.getItemCt&&d.getItemCt();if(d.rendered&&a){if(b&&b.dom){b.insertAfter(a)}Ext.destroy(a);Ext.destroyMembers(d,"label","itemCt");if(d.customItemCt){Ext.destroyMembers(d,"getItemCt","customItemCt")}}},setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){Ext.apply(this,{labelStyle:"display:none",elementStyle:"padding-left:0;",labelAdjust:0})}else{this.labelSeparator=Ext.isDefined(a.labelSeparator)?a.labelSeparator:this.labelSeparator;a.labelWidth=a.labelWidth||100;if(Ext.isNumber(a.labelWidth)){var b=Ext.isNumber(a.labelPad)?a.labelPad:5;Ext.apply(this,{labelAdjust:a.labelWidth+b,labelStyle:"width:"+a.labelWidth+"px;",elementStyle:"padding-left:"+(a.labelWidth+b)+"px"})}if(a.labelAlign=="top"){Ext.apply(this,{labelStyle:"width:auto;",labelAdjust:0,elementStyle:"padding-left:0;"})}}},isHide:function(a){return a.hideLabel||this.container.hideLabels},onFieldShow:function(a){a.getItemCt().removeClass("x-hide-"+a.hideMode);if(a.isComposite){a.doLayout()}},onFieldHide:function(a){a.getItemCt().addClass("x-hide-"+a.hideMode)},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d=b)||(this.cells[c]&&this.cells[c][a])){if(b&&a>=b){c++;a=0}else{a++}}return[a,c]},renderItem:function(e,a,d){if(!this.table){this.table=d.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}if(e&&!e.rendered){e.render(this.getNextCell(e));this.configureItem(e)}else{if(e&&!this.isValidParent(e,d)){var b=this.getNextCell(e);b.insertBefore(e.getPositionEl().dom,null);e.container=Ext.get(b);this.configureItem(e)}}},isValidParent:function(b,a){return b.getPositionEl().up("table",5).dom.parentNode===(a.dom||a)},destroy:function(){delete this.table;Ext.layout.TableLayout.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",type:"absolute",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,type:"box",scrollOffset:0,extraCls:"x-box-item",targetCls:"x-box-layout-ct",innerCls:"x-box-inner",constructor:function(a){Ext.layout.BoxLayout.superclass.constructor.call(this,a);if(Ext.isString(this.defaultMargins)){this.defaultMargins=this.parseMargins(this.defaultMargins)}var d=this.overflowHandler;if(typeof d=="string"){d={type:d}}var c="none";if(d&&d.type!=undefined){c=d.type}var b=Ext.layout.boxOverflow[c];if(b[this.type]){b=b[this.type]}this.overflowHandler=new b(this,d)},onLayout:function(b,h){Ext.layout.BoxLayout.superclass.onLayout.call(this,b,h);var d=this.getLayoutTargetSize(),i=this.getVisibleItems(b),c=this.calculateChildBoxes(i,d),g=c.boxes,k=c.meta;if(d.width>0){var l=this.overflowHandler,a=k.tooNarrow?"handleOverflow":"clearOverflow";var e=l[a](c,d);if(e){if(e.targetSize){d=e.targetSize}if(e.recalculate){i=this.getVisibleItems(b);c=this.calculateChildBoxes(i,d);g=c.boxes}}}this.layoutTargetLastSize=d;this.childBoxCache=c;this.updateInnerCtSize(d,c);this.updateChildBoxes(g);this.handleTargetOverflow(d,b,h)},updateChildBoxes:function(c){for(var b=0,e=c.length;b(None)',constructor:function(a){Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this,arguments);this.menuItems=[]},createInnerElements:function(){if(!this.afterCt){this.afterCt=this.layout.innerCt.insertSibling({cls:this.afterCls},"before")}},clearOverflow:function(a,g){var e=g.width+(this.afterCt?this.afterCt.getWidth():0),b=this.menuItems;this.hideTrigger();for(var c=0,d=b.length;ci.width;return m}},handleOverflow:function(d,h){this.showTrigger();var l=h.width-this.afterCt.getWidth(),m=d.boxes,e=0,s=false;for(var p=0,c=m.length;p=0;k--){var r=m[k].component,q=m[k].left+m[k].width;if(q>=l){this.menuItems.unshift({component:r,width:m[k].width});r.hide()}else{break}}}if(this.menuItems.length==0){this.hideTrigger()}return{targetSize:{height:h.height,width:l},recalculate:s}}});Ext.layout.boxOverflow.menu.hbox=Ext.layout.boxOverflow.HorizontalMenu;Ext.layout.boxOverflow.Scroller=Ext.extend(Ext.layout.boxOverflow.None,{animateScroll:true,scrollIncrement:100,wheelIncrement:3,scrollRepeatInterval:400,scrollDuration:0.4,beforeCls:"x-strip-left",afterCls:"x-strip-right",scrollerCls:"x-strip-scroller",beforeScrollerCls:"x-strip-scroller-left",afterScrollerCls:"x-strip-scroller-right",createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},handleOverflow:function(a,b){this.createInnerElements();this.showScrollers()},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons()},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide()}},createScrollers:function(){if(!this.beforeScroller&&!this.afterScroller){var a=this.beforeCt.createChild({cls:String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)});a.addClassOnOver(this.beforeScrollerCls+"-hover");b.addClassOnOver(this.afterScrollerCls+"-hover");a.setVisibilityMode(Ext.Element.DISPLAY);b.setVisibilityMode(Ext.Element.DISPLAY);this.beforeRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeScroller,this.afterScroller,this.beforeRepeater,this.afterRepeater,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getItem:function(a){if(Ext.isString(a)){a=Ext.getCmp(a)}else{if(Ext.isNumber(a)){a=this.items[a]}}return a},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?"addClass":"removeClass",c=this.atExtremeAfter()?"addClass":"removeClass",a=this.beforeScrollerCls+"-disabled",b=this.afterScrollerCls+"-disabled";this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(a){this.scrollBy(-this.scrollIncrement,a)},scrollRight:function(a){this.scrollBy(this.scrollIncrement,a)},scrollToItem:function(d,b){d=this.getItem(d);if(d!=undefined){var a=this.getItemVisibility(d);if(!a.fullyVisible){var c=d.getBox(true,true),e=c.x;if(a.hiddenRight){e-=(this.layout.innerCt.getWidth()-c.width)}this.scrollTo(e,b)}}},getItemVisibility:function(e){var d=this.getItem(e).getBox(true,true),a=d.x,c=d.x+d.width,g=this.getScrollPosition(),b=this.layout.innerCt.getWidth()+g;return{hiddenLeft:ab,fullyVisible:a>g&&c=this.getMaxScrollBottom()}});Ext.layout.boxOverflow.scroller.vbox=Ext.layout.boxOverflow.VerticalScroller;Ext.layout.boxOverflow.HorizontalScroller=Ext.extend(Ext.layout.boxOverflow.Scroller,{handleOverflow:function(a,b){Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this,arguments);return{targetSize:{height:b.height,width:b.width-(this.beforeCt.getWidth()+this.afterCt.getWidth())}}},createInnerElements:function(){var a=this.layout.innerCt;if(!this.beforeCt){this.afterCt=a.insertSibling({cls:this.afterCls},"before");this.beforeCt=a.insertSibling({cls:this.beforeCls},"before");this.createWheelListener()}},scrollTo:function(a,b){var d=this.getScrollPosition(),c=a.constrain(0,this.getMaxScrollRight());if(c!=d&&!this.scrolling){if(b==undefined){b=this.animateScroll}this.layout.innerCt.scrollTo("left",c,b?this.getScrollAnim():false);if(b){this.scrolling=true}else{this.scrolling=false;this.updateScrollButtons()}}},getScrollPosition:function(){return parseInt(this.layout.innerCt.dom.scrollLeft,10)||0},getMaxScrollRight:function(){return this.layout.innerCt.dom.scrollWidth-this.layout.innerCt.getWidth()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollRight()}});Ext.layout.boxOverflow.scroller.hbox=Ext.layout.boxOverflow.HorizontalScroller;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",type:"hbox",calculateChildBoxes:function(s,b){var G=s.length,S=this.padding,E=S.top,V=S.left,z=E+S.bottom,P=V+S.right,a=b.width-this.scrollOffset,e=b.height,p=Math.max(0,e-z),Q=this.pack=="start",X=this.pack=="center",B=this.pack=="end",M=0,R=0,U=0,m=0,Y=0,I=[],l,K,N,W,x,k,T,J,c,y,r,O;for(T=0;Ta;var o=Math.max(0,a-M-P);if(q){for(T=0;T0){var D=[];for(var F=0,w=G;Fi.available?1:-1});for(var T=0,w=D.length;T0){J.top=E+r+(A/2)}}V+=J.width+x.right}return{boxes:I,meta:{maxHeight:R,nonFlexWidth:M,desiredWidth:m,minimumWidth:Y,shortfall:m-a,tooNarrow:q}}}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",type:"vbox",calculateChildBoxes:function(q,b){var G=q.length,T=this.padding,E=T.top,W=T.left,z=E+T.bottom,Q=W+T.right,a=b.width-this.scrollOffset,d=b.height,M=Math.max(0,a-Q),R=this.pack=="start",Y=this.pack=="center",B=this.pack=="end",m=0,w=0,V=0,N=0,o=0,I=[],k,K,P,X,v,h,U,J,c,y,p,e;for(U=0;Ud;var s=Math.max(0,(d-m-z));if(n){for(U=0,t=G;U0){var L=[];for(var F=0,t=G;Fi.available?1:-1});for(var U=0,t=L.length;U0){J.left=W+y+(A/2)}}E+=J.height+v.bottom}return{boxes:I,meta:{maxWidth:w,nonFlexHeight:m,desiredHeight:N,minimumHeight:o,shortfall:N-d,tooNarrow:n}}}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"toolbar",triggerWidth:18,noItemsMenuText:'
(None)
',lastOverflow:false,tableHTML:['',"","",'",'","","","
','',"",'',"","
","
','',"","","","","","","
",'',"",'',"","
","
",'',"",'',"","
","
","
"].join(""),onLayout:function(e,k){if(!this.leftTr){var h=e.buttonAlign=="center"?"center":"left";k.addClass("x-toolbar-layout-ct");k.insertHtml("beforeEnd",String.format(this.tableHTML,h));this.leftTr=k.child("tr.x-toolbar-left-row",true);this.rightTr=k.child("tr.x-toolbar-right-row",true);this.extrasTr=k.child("tr.x-toolbar-extras-row",true);if(this.hiddenItem==undefined){this.hiddenItems=[]}}var l=e.buttonAlign=="right"?this.rightTr:this.leftTr,m=e.items.items,d=0;for(var b=0,g=m.length,n;b=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,b,a){var d=document.createElement("td");d.className="x-toolbar-cell";b.insertBefore(d,b.childNodes[a]||null);return d},hideItem:function(a){this.hiddenItems.push(a);a.xtbHidden=true;a.xtbWidth=a.getPositionEl().dom.parentNode.offsetWidth;a.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddenItems.remove(a)},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getPositionEl().dom.parentNode.offsetWidth},fitToSize:function(l){if(this.container.enableOverflow===false){return}var b=l.dom.clientWidth,k=l.dom.firstChild.offsetWidth,n=b-this.triggerWidth,a=this.lastWidth||0,c=this.hiddenItems,e=c.length!=0,o=b>=a;this.lastWidth=b;if(k>b||(e&&o)){var m=this.container.items.items,h=m.length,d=0,p;for(var g=0;gn){if(!(p.hidden||p.xtbHidden)){this.hideItem(p)}}else{if(p.xtbHidden){this.unhideItem(p)}}}}}e=c.length!=0;if(e){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(b,a){if(a instanceof Ext.Toolbar.Separator){b.add("-")}else{if(Ext.isFunction(a.isXType)){if(a.isXType("splitbutton")){b.add(this.createMenuConfig(a,true))}else{if(a.isXType("button")){b.add(this.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(c){this.addComponentToMenu(b,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){delete b.menu})}},beforeMoreShow:function(h){var b=this.container.items.items,a=b.length,g,e;var c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.Toolbar.Separator)};this.clearMenu();h.removeAll();for(var d=0;d','','{altText}',"","")}if(g&&!g.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(g);g.render(g.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));g.positionEl.menuItemId=g.getItemId();if(!d.isMenuItem&&d.needsIcon){g.positionEl.addClass("x-menu-list-item-indent")}this.configureItem(g)}else{if(g&&!this.isValidParent(g,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(g.getActionEl().dom,b||null)}}},getItemArgs:function(d){var a=d instanceof Ext.menu.Item,b=!(a||d instanceof Ext.menu.Separator);return{isMenuItem:a,needsIcon:b&&(d.icon||d.iconCls),icon:d.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(d.iconCls||""),itemId:"x-menu-el-"+d.id,itemCls:"x-menu-list-item ",altText:d.altText||""}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){Ext.layout.MenuLayout.superclass.onLayout.call(this,a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(a,b){this.fireEvent("resize",this,a,b,a,b)}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",preventBodyReset:false,padding:undefined,resizeEvent:"bodyresize",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}this.toolbars=[];if(this.tbar){this.elements+=",tbar";this.topToolbar=this.createToolbar(this.tbar);this.tbar=null}if(this.bbar){this.elements+=",bbar";this.bottomToolbar=this.createToolbar(this.bbar);this.bbar=null}if(this.header===true){this.elements+=",header";this.header=null}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";this.footer=null}if(this.buttons){this.fbar=this.buttons;this.buttons=null}if(this.fbar){this.createFbar(this.fbar)}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createFbar:function(b){var a=this.minButtonWidth;this.elements+=",footer";this.fbar=this.createToolbar(b,{buttonAlign:this.buttonAlign,toolbarCls:"x-panel-fbar",enableOverflow:false,defaults:function(d){return{minWidth:d.minWidth||a}}});this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this);this.buttons=this.fbar.items.items},createToolbar:function(b,c){var a;if(Ext.isArray(b)){b={items:b}}a=b.events?Ext.apply(b,c):this.createComponent(Ext.apply({},b,c),"toolbar");this.toolbars.push(a);return a},createElement:function(a,c){if(this[a]){c.appendChild(this[a].dom);return}if(a==="bwrap"||this.elements.indexOf(a)!=-1){if(this[a+"Cfg"]){this[a]=Ext.fly(c).createChild(this[a+"Cfg"])}else{var b=document.createElement("div");b.className=this[a+"Cls"];this[a]=Ext.get(c.appendChild(b))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(g,e){Ext.Panel.superclass.onRender.call(this,g,e);this.createClasses();var a=this.el,h=a.dom,l,i;if(this.collapsible&&!this.hideCollapseTool){this.tools=this.tools?this.tools.slice(0):[];this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.tools){i=this.tools;this.elements+=(this.header!==false)?",header":""}this.tools={};a.addClass(this.baseCls);if(h.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var k=this.bwrap?this.bwrap:a;this.tbar=k.down("."+this.tbarCls);this.body=k.down("."+this.bodyCls);this.bbar=k.down("."+this.bbarCls);this.footer=k.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){a.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",h.firstChild.firstChild.firstChild);this.createElement("bwrap",h);l=this.bwrap.dom;var c=h.childNodes[1],b=h.childNodes[2];l.appendChild(c);l.appendChild(b);var m=l.firstChild.firstChild.firstChild;this.createElement("tbar",m);this.createElement("body",m);this.createElement("bbar",m);this.createElement("footer",l.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}this.ft=Ext.get(this.bwrap.dom.lastChild);this.mc=Ext.get(m)}else{this.createElement("header",h);this.createElement("bwrap",h);l=this.bwrap.dom;this.createElement("tbar",l);this.createElement("body",l);this.createElement("bbar",l);this.createElement("footer",l);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(Ext.isDefined(this.padding)){this.body.setStyle("padding",this.body.addUnits(this.padding))}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML=''+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible&&this.titleCollapse&&this.header){this.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}if(i){this.addTool.apply(this,i)}if(this.fbar){this.footer.addClass("x-panel-btns");this.fbar.ownerCt=this;this.fbar.render(this.footer);this.footer.createChild({cls:"x-clear"})}if(this.tbar&&this.topToolbar){this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar)}},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var e=this.header,c=e.child("img.x-panel-inline-icon");if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{var d=e.child("span."+this.headerTextCls);if(d){Ext.DomHelper.insertBefore(d.dom,{tag:"img",alt:"",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.apply({},a,{shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined}),this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},getFooterToolbar:function(){return this.fbar},addButton:function(a,c,b){if(!this.fbar){this.createFbar([])}if(c){if(Ext.isString(a)){a={text:a}}a=Ext.apply({handler:c,scope:b},a)}return this.fbar.add(a)},addTool:function(){if(!this.rendered){if(!this.tools){this.tools=[]}Ext.each(arguments,function(a){this.tools.push(a)},this);return}if(!this[this.toolTarget]){return}if(!this.toolTemplate){var h=new Ext.Template('
 
');h.disableFormats=true;h.compile();Ext.Panel.prototype.toolTemplate=h}for(var g=0,d=arguments,c=d.length;g0){Ext.each(this.toolbars,function(c){c.doLayout(undefined,a)});this.syncHeight()}},syncHeight:function(){var b=this.toolbarHeight,c=this.body,a=this.lastSize.height,d;if(this.autoHeight||!Ext.isDefined(a)||a=="auto"){return}if(b!=this.getToolbarHeight()){b=Math.max(0,a-this.getFrameHeight());c.setHeight(b);d=c.getSize();this.toolbarHeight=this.getToolbarHeight();this.onBodyResize(d.width,d.height)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(g){c.removeClass(d);if(a.stopEvent!==false){g.stopEvent()}if(a.handler){a.handler.call(a.scope||c,g,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}Ext.Panel.superclass.afterRender.call(this);if(this.collapsed){this.collapsed=false;this.collapse(false)}this.initEvents()},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}if(this.toolbars.length>0){Ext.each(this.toolbars,function(a){a.doLayout();a.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this);this.syncHeight()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},beforeEffect:function(a){if(this.floating){this.el.beforeAction()}if(a!==false){this.el.addClass("x-panel-animated")}},afterEffect:function(a){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(c,b,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,c)},collapse:function(b){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.beforeEffect(a);this.onCollapse(a,b);return this},onCollapse:function(a,b){if(a){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide(this.hideMode);this.afterCollapse(false)}},afterCollapse:function(a){this.collapsed=true;this.el.addClass(this.collapsedCls);if(a!==false){this[this.collapseEl].hide(this.hideMode)}this.afterEffect(a);this.cascade(function(b){if(b.lastSize){b.lastSize={width:undefined,height:undefined}}});this.fireEvent("collapse",this)},expand:function(b){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect(a);this.onExpand(a,b);return this},onExpand:function(a,b){if(a){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show(this.hideMode);this.afterExpand(false)}},afterExpand:function(a){this.collapsed=false;if(a!==false){this[this.collapseEl].show(this.hideMode)}this.afterEffect(a);if(this.deferLayout){delete this.deferLayout;this.doLayout(true)}this.fireEvent("expand",this)},toggleCollapse:function(a){this[this.collapsed?"expand":"collapse"](a);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(g,d,c,e){var a=g,b=d;if(Ext.isDefined(a)||Ext.isDefined(b)){if(!this.collapsed){if(Ext.isNumber(a)){this.body.setWidth(a=this.adjustBodyWidth(a-this.getFrameWidth()))}else{if(a=="auto"){a=this.body.setWidth("auto").dom.offsetWidth}else{a=this.body.dom.offsetWidth}}if(this.tbar){this.tbar.setWidth(a);if(this.topToolbar){this.topToolbar.setSize(a)}}if(this.bbar){this.bbar.setWidth(a);if(this.bottomToolbar){this.bottomToolbar.setSize(a);if(Ext.isIE){this.bbar.setStyle("position","static");this.bbar.setStyle("position","")}}}if(this.footer){this.footer.setWidth(a);if(this.fbar){this.fbar.setSize(Ext.isIE?(a-this.footer.getFrameWidth("lr")):"auto")}}if(Ext.isNumber(b)){b=Math.max(0,b-this.getFrameHeight());this.body.setHeight(b)}else{if(b=="auto"){this.body.setHeight(b)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:a,height:b};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height)},this,{single:true})}}this.onBodyResize(a,b)}this.syncShadow();Ext.Panel.superclass.onResize.call(this,g,d,c,e)},onBodyResize:function(a,b){this.fireEvent("bodyresize",this,a,b)},getToolbarHeight:function(){var a=0;if(this.rendered){Ext.each(this.toolbars,function(b){a+=b.getHeight()},this)}return a},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");if(this.frame){var a=this.bwrap.dom.firstChild;b+=(Ext.fly(a).getFrameWidth("l")+Ext.fly(a.firstChild).getFrameWidth("r"));b+=this.mc.getFrameWidth("lr")}return b},getFrameHeight:function(){var a=this.el.getFrameWidth("tb")+this.bwrap.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){a+=this.el.dom.firstChild.offsetHeight+this.ft.dom.offsetHeight+this.mc.getFrameWidth("tb")}else{a+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.body.getHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},getContentTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){Ext.Panel.superclass.beforeDestroy.call(this);if(this.header){this.header.removeAllListeners()}if(this.tools){for(var a in this.tools){Ext.destroy(this.tools[a])}}if(this.toolbars.length>0){Ext.each(this.toolbars,function(b){b.un("afterlayout",this.syncHeight,this);b.un("remove",this.syncHeight,this)},this)}if(Ext.isArray(this.buttons)){while(this.buttons.length){Ext.destroy(this.buttons[0])}}if(this.rendered){Ext.destroy(this.ft,this.header,this.footer,this.tbar,this.bbar,this.body,this.mc,this.bwrap,this.dd);if(this.fbar){Ext.destroy(this.fbar,this.fbar.el)}}Ext.destroy(this.toolbars)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{this.field=b}Ext.Editor.superclass.constructor.call(this,a)};Ext.extend(Ext.Editor,Ext.Component,{allowBlur:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(b,a){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:b,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.inEditor=true;this.mon(this.field,{scope:this,blur:this.onBlur,specialkey:this.onSpecialKey});if(this.field.grow){this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1})}this.field.render(this.el).show();this.field.getEl().dom.name="";if(this.swallowKeys){this.field.el.swallowEvent(["keypress","keydown"])}},onSpecialKey:function(g,d){var b=d.getKey(),a=this.completeOnEnter&&b==d.ENTER,c=this.cancelOnEsc&&b==d.ESC;if(a||c){d.stopEvent();if(a){this.completeEdit()}else{this.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}}this.fireEvent("specialkey",g,d)},startEdit:function(b,c){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(b);var a=c!==undefined?c:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,a)!==false){this.startValue=a;this.field.reset();this.field.setValue(a);this.realign(true);this.editing=true;this.show()}},doAutoSize:function(){if(this.autoSize){var b=this.boundEl.getSize(),a=this.field.getSize();switch(this.autoSize){case"width":this.setSize(b.width,a.height);break;case"height":this.setSize(a.width,b.height);break;case"none":this.setSize(a.width,a.height);break;default:this.setSize(b.width,b.height)}}},setSize:function(a,b){delete this.field.lastSize;this.field.setSize(a,b);if(this.el){if(Ext.isGecko2||Ext.isOpera||(Ext.isIE7&&Ext.isStrict)){this.el.setSize(a,b)}this.el.sync()}},realign:function(a){if(a===true){this.doAutoSize()}this.el.alignTo(this.boundEl,this.alignment,this.offsets)},completeEdit:function(a){if(!this.editing){return}if(this.field.assertValue){this.field.assertValue()}var b=this.getValue();if(!this.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);this.fireEvent("complete",this,b,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show().focus(false,true);this.fireEvent("startedit",this.boundEl,this.startValue)},cancelEdit:function(a){if(this.editing){var b=this.getValue();this.setValue(this.startValue);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){if(this.allowBlur===true&&this.editing&&this.selectSameEditor!==true){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return}this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){Ext.destroyMembers(this,"field");delete this.parentEl;delete this.boundEl}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=Ext.extend(Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],initComponent:function(){Ext.ColorPalette.superclass.initComponent.call(this);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}},onRender:function(b,a){this.autoEl={tag:"div",cls:this.itemCls};Ext.ColorPalette.superclass.onRender.call(this,b,a);var c=this.tpl||new Ext.XTemplate(' ');c.overwrite(this.el,this.colors);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var a=this.value;this.value=null;this.select(a,true)}},handleClick:function(b,a){b.preventDefault();if(!this.disabled){var d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.toUpperCase())}},select:function(b,a){b=b.replace("#","");if(b!=this.value||this.allowReselect){var c=this.el;if(this.value){c.child("a.color-"+this.value).removeClass("x-color-palette-sel")}c.child("a.color-"+b).addClass("x-color-palette-sel");this.value=b;if(a!==true){this.fireEvent("select",this,b)}}}});Ext.reg("colorpalette",Ext.ColorPalette);Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,focusOnSelect:true,initHour:12,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime(true):new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){if(Ext.isArray(a)){this.disabledDates=a;this.disabledDatesRE=null}else{this.disabledDatesRE=a}this.initDisabledDays();this.update(this.value,true)},setDisabledDays:function(a){this.disabledDays=a;this.update(this.value,true)},setMinDate:function(a){this.minDate=a;this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;this.update(this.value,true)},setValue:function(a){this.value=a.clearTime(true);this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['','','",this.showToday?'':"",'
  
'],c=this.dayNames,h;for(h=0;h<7;h++){var l=this.startDay+h;if(l>6){l=l-7}a.push("")}a[a.length]="";for(h=0;h<42;h++){if(h%7===0&&h!==0){a[a.length]=""}a[a.length]=''}a.push("
",c[l].substr(0,1),"
');var k=document.createElement("div");k.className="x-date-picker";k.innerHTML=a.join("");e.dom.insertBefore(k,b);this.el=Ext.get(k);this.eventEl=Ext.get(k.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var g=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,g),tooltip:String.format(this.todayTip,g),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var a=[''];for(var b=0;b<6;b++){a.push('",'",b===0?'':'')}a.push('","
',Date.getShortMonthName(b),"',Date.getShortMonthName(b+6),"
");this.monthPicker.update(a.join(""));this.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(g,b){g.stopEvent();var c=new Ext.Element(b),a;if(c.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(c.is("button.x-date-mp-ok")){var h=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(h.getMonth()!=this.mpSelMonth){h=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(h);this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelMonth=a.dom.xmonth}else{if((a=c.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelYear=a.dom.xyear}else{if(c.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(c.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasClass("x-date-disabled")){this.cancelFocus=this.focusOnSelect===false;this.setValue(new Date(a.dateValue));delete this.cancelFocus;this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)}},update:function(H,B){if(this.rendered){var a=this.activeDate,q=this.isVisible();this.activeDate=H;if(!B&&a&&this.el){var p=H.getTime();if(a.getMonth()==H.getMonth()&&a.getFullYear()==H.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==p){d.addClass("x-date-selected");if(q&&!this.cancelFocus){Ext.fly(d.dom.firstChild).focus(50)}return false}},this);return}}var l=H.getDaysInMonth(),r=H.getFirstDateOfMonth(),g=r.getDay()-this.startDay;if(g<0){g+=7}l+=g;var C=H.add("mo",-1),h=C.getDaysInMonth()-g,e=this.cells.elements,s=this.textNodes,E=(new Date(C.getFullYear(),C.getMonth(),h,this.initHour)),D=new Date().clearTime().getTime(),x=H.clearTime(true).getTime(),v=this.minDate?this.minDate.clearTime(true):Number.NEGATIVE_INFINITY,z=this.maxDate?this.maxDate.clearTime(true):Number.POSITIVE_INFINITY,G=this.disabledDatesRE,u=this.disabledDatesText,J=this.disabledDays?this.disabledDays.join(""):false,F=this.disabledDaysText,A=this.format;if(this.showToday){var n=new Date().clearTime(),c=(nz||(G&&A&&G.test(n.dateFormat(A)))||(J&&J.indexOf(n.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var m=function(K,d){d.title="";var i=E.clearTime(true).getTime();d.firstChild.dateValue=i;if(i==D){d.className+=" x-date-today";d.title=K.todayText}if(i==x){d.className+=" x-date-selected";if(q){Ext.fly(d.firstChild).focus(50)}}if(iz){d.className=" x-date-disabled";d.title=K.maxText;return}if(J){if(J.indexOf(E.getDay())!=-1){d.title=F;d.className=" x-date-disabled"}}if(G&&A){var w=E.dateFormat(A);if(G.test(w)){d.title=u.replace("%0",w);d.className=" x-date-disabled"}}};var y=0;for(;y=a.value){d=a.value}}c.setValue(b,d,false);c.fireEvent("drag",c,g,this)},getNewValue:function(){var a=this.slider,b=a.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(a.reverseValue(b.left),a.decimalPrecision)},onDragEnd:function(c){var a=this.slider,b=this.value;this.el.removeClass("x-slider-thumb-drag");this.dragging=false;a.fireEvent("dragend",a,c);if(this.dragStartValue!=b){a.fireEvent("changecomplete",a,b,this)}},destroy:function(){Ext.destroyMembers(this,"tracker","el")}});Ext.slider.MultiSlider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,constrainThumbs:true,topThumbZIndex:10000,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue}this.thumbs=[];Ext.slider.MultiSlider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.values==undefined||Ext.isEmpty(this.values)){this.values=[0]}var a=this.values;for(var b=0;bthis.clickRange[0]&&c.top=c){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.slider.MultiSlider.superclass.afterRender.apply(this,arguments);for(var c=0;ce?e:c.value}this.syncThumb()},setValue:function(d,c,b,g){var a=this.thumbs[d],e=a.el;c=this.normalizeValue(c);if(c!==a.value&&this.fireEvent("beforechange",this,c,a.value,a)!==false){a.value=c;if(this.rendered){this.moveThumb(d,this.translateValue(c),b!==false);this.fireEvent("change",this,c,a);if(g){this.fireEvent("changecomplete",this,c,a)}}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},moveThumb:function(d,c,b){var a=this.thumbs[d].el;if(!b||this.animate===false){a.setLeft(c)}else{a.shift({left:c,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onResize:function(c,e){var b=this.thumbs,a=b.length,d=0;for(;dthis.clickRange[0]&&c.left','
','
','
',"
 
","
","
",'
',"
 
","
","
","");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered&&!this.isDestroyed){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;c-=1;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}this.clearTimer();if(a===true){this.hide()}return this},clearTimer:function(){if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}},onDestroy:function(){this.clearTimer();if(this.rendered){if(this.textEl.isComposite){this.textEl.clear()}Ext.destroyMembers(this,"textEl","progressBar","textTopEl")}Ext.ProgressBar.superclass.onDestroy.call(this)}});Ext.reg("progress",Ext.ProgressBar);(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(k,h,p){if(Ext.isNumber(h)){h={left:h,right:h,top:h,bottom:h}}h=h||this.defaultPadding;var m=Ext.get(this.getEl()).getBox(),d=Ext.get(k),o=d.getScroll(),l,e=d.dom;if(e==document.body){l={x:o.left,y:o.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var n=d.getXY();l={x:n[0],y:n[1],width:e.clientWidth,height:e.clientHeight}}var i=m.y-l.y,g=m.x-l.x;this.resetConstraints();this.setXConstraint(g-(h.left||0),l.width-g-m.width-(h.right||0),this.xTickSize);this.setYConstraint(i-(h.top||0),l.height-i-m.height-(h.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,g,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!g&&0!==g){this.padding=[e,c,e,c]}else{this.padding=[e,c,g,d]}}},setInitPosition:function(g,e){var h=this.getEl();if(!this.DDM.verifyEl(h)){return}var d=g||0;var c=e||0;var i=b.getXY(h);this.initPageX=i[0]-d;this.initPageY=i[1]-c;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(g,d){if(this.primaryButtonOnly&&g.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(g),Ext.lib.Event.getPageY(g));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(g)){this.setStartPosition();this.b4MouseDown(g);this.onMouseDown(g);this.DDM.handleMouseDown(g,this);this.DDM.stopEvent(g)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(g,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(l,g){if(!g){return l}else{if(g[0]>=l){return g[0]}else{for(var d=0,c=g.length;d=l){var k=l-g[d];var h=g[e]-l;return(h>k)?g[d]:g[e]}}return g[g.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var g=this.ids[e][b];if(!this.isTypeOfDD(g)){continue}g[d].apply(g,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&this.ids[b][c.id]){delete this.ids[b][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,b){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][b]=b},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(h,c){var g=[];for(var e in h.groups){for(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){g[g.length]=b}}}return g},isLegalTarget:function(g,e){var c=this.getRelated(g,true);for(var d=0,b=c.length;dthis.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(o,p){var r=this.dragCurrent;if(!r||r.isLocked()){return}var s=o.getPoint();var b=[];var g=[];var m=[];var k=[];var d=[];for(var h in this.dragOvers){var c=this.dragOvers[h];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(s,c,this.mode)){g.push(c)}b[h]=true;delete this.dragOvers[h]}for(var q in r.groups){if("string"!=typeof q){continue}for(h in this.ids[q]){var l=this.ids[q][h];if(!this.isTypeOfDD(l)){continue}if(l.isTarget&&!l.isLocked()&&((l!=r)||(r.ignoreSelf===false))){if(this.isOverTarget(s,l,this.mode)){if(p){k.push(l)}else{if(!b[l.id]){d.push(l)}else{m.push(l)}this.dragOvers[l.id]=l}}}}}if(this.mode){if(g.length){r.b4DragOut(o,g);r.onDragOut(o,g)}if(d.length){r.onDragEnter(o,d)}if(m.length){r.b4DragOver(o,m);r.onDragOver(o,m)}if(k.length){r.b4DragDrop(o,k);r.onDragDrop(o,k)}}else{var n=0;for(h=0,n=g.length;h2000){}else{setTimeout(b._addListeners,10);if(document&&document.body){b._timeoutCount+=1}}}},handleWasClicked:function(b,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,h,g){var e=this.getTargetCoord(h,g);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var i=[e.x,e.y];b.setXY(i);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(m,l,e,n){if(this.scroll){var o=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var q=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var k=e+l;var p=n+m;var i=(o+q-l-this.deltaY);var g=(b+d-m-this.deltaX);var c=40;var a=(document.all)?80:30;if(k>o&&i0&&l-qb&&g0&&m-dthis.maxX){a=this.maxX}}if(this.constrainY){if(dthis.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=Ext.extend(Ext.util.Observable,{active:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}Ext.dd.DragTracker.superclass.constructor.call(this,a)},initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this);delete this.el},onMouseDown:function(b,a){if(this.fireEvent("mousedown",this,b)!==false&&this.onBeforeStart(b)!==false){this.startXY=this.lastXY=b.getXY();this.dragTarget=this.delegate?a:this.el.dom;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this,[b])}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart(d)}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var i={};var h=function(m){b=null;a()};var k=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var m=Ext.dd.ScrollManager;var n=i.el.ddScrollConfig?i.el.ddScrollConfig.increment:m.increment;if(!m.animate){if(i.el.scroll(i.dir,n)){k()}}else{i.el.scroll(i.dir,n,true,m.animDuration,k)}}};var a=function(){if(i.id){clearInterval(i.id)}i.id=0;i.el=null;i.dir=""};var g=function(n,m){a();i.el=n;i.dir=m;var p=n.ddScrollConfig?n.ddScrollConfig.ddGroup:undefined,o=(n.ddScrollConfig&&n.ddScrollConfig.frequency)?n.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;if(p===undefined||c.dragCurrent.ddGroup==p){i.id=setInterval(d,o)}};var l=function(p,s){if(s||!c.dragCurrent){return}var t=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;t.refreshCache()}var u=Ext.lib.Event.getXY(p);var v=new Ext.lib.Point(u[0],u[1]);for(var n in e){var o=e[n],m=o._region;var q=o.ddScrollConfig?o.ddScrollConfig:t;if(m&&m.contains(v)&&o.isScrollable()){if(m.bottom-v.y<=q.vthresh){if(i.el!=o){g(o,"down")}return}else{if(m.right-v.x<=q.hthresh){if(i.el!=o){g(o,"left")}return}else{if(v.y-m.top<=q.vthresh){if(i.el!=o){g(o,"up")}return}else{if(v.x-m.left<=q.hthresh){if(i.el!=o){g(o,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(l,c);c.stopDrag=c.stopDrag.createSequence(h,c);return{register:function(o){if(Ext.isArray(o)){for(var n=0,m=o.length;n]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(g){return g.name});for(var b=0,a=e.length;b-1){a.join(null);this.data.removeAt(b)}if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}if(b>-1){this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(b){var a=[];this.each(function(c){a.push(c)});this.clearData();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}if(b!==true){this.fireEvent("clear",this,a)}},onClear:function(b,a){Ext.each(a,function(d,c){this.destroyRecord(this,d,c)},this)},insert:function(d,c){var e,a,b;c=[].concat(c);for(e=0,a=c.length;e=0;d--){if(b[d].phantom===true){var a=b.splice(d,1).shift();if(a.isValid()){g.push(a)}}else{if(!b[d].isValid()){b.splice(d,1)}}}if(g.length){h.push(["create",g])}if(b.length){h.push(["update",b])}}k=h.length;if(k){e=++this.batchCounter;for(d=0;d=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(b,m,h){var e,g;if(this.isDestroyed===true){return}if(!b||h===false){if(h!==false){this.fireEvent("load",this,[],m)}if(m.callback){m.callback.call(m.scope||this,[],m,false,b)}return}var a=b.records,k=b.totalRecords||a.length;if(!m||m.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(e=0,g=a.length;e-1){this.doUpdate(d)}else{l.push(d);++c}}this.totalLength=Math.max(k,this.data.length+c);this.add(l)}this.fireEvent("load",this,a,m);if(m.callback){m.callback.call(m.scope||this,a,m,true)}},loadData:function(c,a){var b=this.reader.readRecords(c);this.loadRecords(b,{add:a},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if((this.sortInfo||this.multiSortInfo)&&!this.remoteSort){this.sortData()}},sortData:function(){var a=this.hasMultiSort?this.multiSortInfo:this.sortInfo,k=a.direction||"ASC",h=a.sorters,c=[];if(!this.hasMultiSort){h=[{direction:k,field:a.field}]}for(var d=0,b=h.length;d1){for(var p=1,o=c.length;ph?1:(i=0;b--){if(Ext.isArray(c)){this.realize(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.realize(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){throw new Ext.data.DataReader.Error("realize",a)}a.phantom=false;a._phid=a.id;a.id=this.getId(c);a.data=c;a.commit()}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(this.isData(c)){a.data=Ext.apply(a.data,c)}a.commit()}},extractData:function(l,a){var k=(this instanceof Ext.data.JsonReader)?"json":"node";var c=[];if(this.isData(l)&&!(this instanceof Ext.data.XmlReader)){l=[l]}var h=this.recordType.prototype.fields,p=h.items,o=h.length,c=[];if(a===true){var m=this.recordType;for(var e=0;e=0){return new Function("obj","return obj"+(b>0?".":"")+c)}return function(d){return d[c]}}}(),extractValues:function(h,d,a){var g,c={};for(var e=0;e<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}',render:function(b,c,a){c=this.toArray(c);b.xmlData=this.tpl.applyTemplate({version:this.xmlVersion,encoding:this.xmlEncoding,documentRoot:(c.length>0||this.forceDocumentRoot===true)?this.documentRoot:false,record:this.meta.record,root:this.root,baseParams:c,records:(Ext.isArray(a[0]))?a:[a]})},createRecord:function(a){return this.toArray(this.toHash(a))},updateRecord:function(a){return this.toArray(this.toHash(a))},destroyRecord:function(b){var a={};a[this.meta.idProperty]=b.id;return this.toArray(a)}});Ext.data.XmlReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:a.idProperty||a.idPath||a.id,successProperty:a.successProperty||a.success});Ext.data.XmlReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b){throw {message:"XmlReader.read: XML Document not available"}}return this.readRecords(b)},readRecords:function(d){this.xmlData=d;var a=d.documentElement||d,c=Ext.DomQuery,g=0,e=true;if(this.meta.totalProperty){g=this.getTotal(a,0)}if(this.meta.successProperty){e=this.getSuccess(a)}var b=this.extractData(c.select(this.meta.record,a),true);return{success:e,records:b,totalRecords:g||b.length}},readResponse:function(g,b){var e=Ext.DomQuery,h=b.responseXML,a=h.documentElement||h;var c=new Ext.data.Response({action:g,success:this.getSuccess(a),message:this.getMessage(a),data:this.extractData(e.select(this.meta.record,a)||e.select(this.meta.root,a),false),raw:h});if(Ext.isEmpty(c.success)){throw new Ext.data.DataReader.Error("successProperty-response",this.meta.successProperty)}if(g===Ext.data.Api.actions.create){var d=Ext.isDefined(c.data);if(d&&Ext.isEmpty(c.data)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!d){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}return c},getSuccess:function(){return true},buildExtractors:function(){if(this.ef){return}var m=this.meta,h=this.recordType,e=h.prototype.fields,l=e.items,k=e.length;if(m.totalProperty){this.getTotal=this.createAccessor(m.totalProperty)}if(m.successProperty){this.getSuccess=this.createAccessor(m.successProperty)}if(m.messageProperty){this.getMessage=this.createAccessor(m.messageProperty)}this.getRoot=function(g){return(!Ext.isEmpty(g[this.meta.record]))?g[this.meta.record]:g[this.meta.root]};if(m.idPath||m.idProperty){var d=this.createAccessor(m.idPath||m.idProperty);this.getId=function(g){var i=d(g)||g.id;return(i===undefined||i==="")?null:i}}else{this.getId=function(){return null}}var c=[];for(var b=0;b0&&c[0].field==this.groupField){c.shift()}this.groupField=e;this.groupDir=d;this.applyGroupField();var b=function(){this.fireEvent("groupchange",this,this.getGroupState())};if(this.groupOnSort){this.sort(e,d);b.call(this);return}if(this.remoteGroup){this.on("load",b,this,{single:true});this.reload()}else{this.sort(c);b.call(this)}},sort:function(h,c){if(this.remoteSort){return Ext.data.GroupingStore.superclass.sort.call(this,h,c)}var g=[];if(Ext.isArray(arguments[0])){g=arguments[0]}else{if(h==undefined){g=this.sortInfo?[this.sortInfo]:[]}else{var e=this.fields.get(h);if(!e){return false}var b=e.name,a=this.sortInfo||null,d=this.sortToggle?this.sortToggle[b]:null;if(!c){if(a&&a.field==b){c=(this.sortToggle[b]||"ASC").toggle("ASC","DESC")}else{c=e.sortDir}}this.sortToggle[b]=c;this.sortInfo={field:b,direction:c};g=[this.sortInfo]}}if(this.groupField){g.unshift({direction:this.groupDir,field:this.groupField})}return this.multiSort.call(this,g,c)},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}Ext.apply(this.baseParams,{groupBy:this.groupField,groupDir:this.groupDir});var a=this.lastOptions;if(a&&a.params){a.params.groupDir=this.groupDir;delete a.params.groupBy}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);return true}else{if(a===true){this.fireEvent("datachanged",this)}return false}},getGroupState:function(){return this.groupOnSort&&this.groupField!==false?(this.sortInfo?this.sortInfo.field:undefined):this.groupField}});Ext.reg("groupingstore",Ext.data.GroupingStore);Ext.data.DirectProxy=function(a){Ext.apply(this,a);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}Ext.data.DirectProxy.superclass.constructor.call(this,a)};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(b,c,a,e,l,m,o){var k=[],h=this.api[b]||this.directFn;switch(b){case Ext.data.Api.actions.create:k.push(a.jsonData);break;case Ext.data.Api.actions.read:if(h.directCfg.method.len>0){if(this.paramOrder){for(var d=0,g=this.paramOrder.length;d1){for(var d=0,b=c.length;d0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(Ext.isNumber(this.enableBuffer)?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(i,a,b){var h=null,e=b[a.len],g=b[a.len+1];if(a.len!==0){h=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:i,method:a.name,data:h,cb:g&&Ext.isFunction(e)?e.createDelegate(g):e});if(this.fireEvent("beforecall",this,d,a)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d,a)}},doForm:function(k,b,g,i,e){var d=new Ext.Direct.Transaction({provider:this,action:k,method:b.name,args:[g,i,e],cb:e&&Ext.isFunction(i)?i.createDelegate(e):i,isForm:true});if(this.fireEvent("beforecall",this,d,b)!==false){Ext.Direct.addTransaction(d);var a=String(g.getAttribute("enctype")).toLowerCase()=="multipart/form-data",h={extTID:d.tid,extAction:k,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(g),isUpload:a,params:i&&Ext.isObject(i.params)?Ext.apply(h,i.params):h});this.fireEvent("call",this,d,b);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,g,c){this.doForm(d,a,e,g,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,g){var d=g.status?"success":"failure";if(c&&c.cb){var b=c.cb,a=Ext.isDefined(g.result)?g.result:g.data;if(Ext.isFunction(b)){b(a,g)}else{Ext.callback(b[d],b.scope,[a,g]);Ext.callback(b.callback,b.scope,[a,g])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider;Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var g=e.resizeChild.getSize();this.el.setSize(g.width,g.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var l=this.el.getStyle("position");if(l!="absolute"&&l!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var p=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var k=0,m=p.length;k0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}if(this.draggable&&this.constrainTo){this.dd.resetConstraints();this.dd.constrainTo(this.constrainTo)}return a},constrain:function(b,c,a,d){if(b-cd){c=b-d}}return c},onMouseMove:function(A){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(A.getPoint())){return}var u=this.curSize||this.startBox,m=this.startBox.x,l=this.startBox.y,c=m,b=l,n=u.width,v=u.height,d=n,p=v,o=this.minWidth,B=this.minHeight,t=this.maxWidth,E=this.maxHeight,i=this.widthIncrement,a=this.heightIncrement,C=A.getXY(),s=-(this.startPoint[0]-Math.max(this.minX,C[0])),q=-(this.startPoint[1]-Math.max(this.minY,C[1])),k=this.activeHandle.position,F,g;switch(k){case"east":n+=s;n=Math.min(Math.max(o,n),t);break;case"south":v+=q;v=Math.min(Math.max(B,v),E);break;case"southeast":n+=s;v+=q;n=Math.min(Math.max(o,n),t);v=Math.min(Math.max(B,v),E);break;case"north":q=this.constrain(v,q,B,E);l+=q;v-=q;break;case"west":s=this.constrain(n,s,o,t);m+=s;n-=s;break;case"northeast":n+=s;n=Math.min(Math.max(o,n),t);q=this.constrain(v,q,B,E);l+=q;v-=q;break;case"northwest":s=this.constrain(n,s,o,t);q=this.constrain(v,q,B,E);l+=q;v-=q;m+=s;n-=s;break;case"southwest":s=this.constrain(n,s,o,t);v+=q;v=Math.min(Math.max(B,v),E);m+=s;n-=s;break}var r=this.snap(n,i,o);var D=this.snap(v,a,B);if(r!=n||D!=v){switch(k){case"northeast":l-=D-v;break;case"north":l-=D-v;break;case"southwest":m-=r-n;break;case"west":m-=r-n;break;case"northwest":m-=r-n;l-=D-v;break}n=r;v=D}if(this.preserveRatio){switch(k){case"southeast":case"east":v=p*(n/d);v=Math.min(Math.max(B,v),E);n=d*(v/p);break;case"south":n=d*(v/p);n=Math.min(Math.max(o,n),t);v=p*(n/d);break;case"northeast":n=d*(v/p);n=Math.min(Math.max(o,n),t);v=p*(n/d);break;case"north":F=n;n=d*(v/p);n=Math.min(Math.max(o,n),t);v=p*(n/d);m+=(F-n)/2;break;case"southwest":v=p*(n/d);v=Math.min(Math.max(B,v),E);F=n;n=d*(v/p);m+=F-n;break;case"west":g=v;v=p*(n/d);v=Math.min(Math.max(B,v),E);l+=(g-v)/2;F=n;n=d*(v/p);m+=F-n;break;case"northwest":F=n;g=v;v=p*(n/d);v=Math.min(Math.max(B,v),E);n=d*(v/p);l+=g-v;m+=F-n;break}}this.proxy.setBounds(m,l,n,v);if(this.dynamic){this.resizeElement()}}catch(z){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=Ext.extend(Object,{constructor:function(d,g,c,e,a){if(!this.tpl){var b=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});b.compile();Ext.Resizable.Handle.prototype.tpl=b}this.position=g;this.rz=d;this.el=this.tpl.append(d.el.dom,[this.position],true);this.el.unselectable();if(e){this.el.setOpacity(0)}if(!Ext.isEmpty(a)){this.el.addClass(a)}this.el.on("mousedown",this.onMouseDown,this);if(!c){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}},afterResize:function(a){},onMouseDown:function(a){this.rz.onMouseDown(this,a)},onMouseOver:function(a){this.rz.handleOver(this,a)},onMouseOut:function(a){this.rz.handleOut(this,a)},destroy:function(){Ext.destroy(this.el);this.el=null}});Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,showAnimDuration:0.25,hideAnimDuration:0.25,collapsible:false,initHidden:undefined,hidden:true,elements:"header,body",frame:true,floating:true,initComponent:function(){this.initTools();Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(Ext.isDefined(this.initHidden)){this.hidden=this.initHidden}if(this.hidden===false){this.hidden=true;this.show()}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},onRender:function(b,a){Ext.Window.superclass.onRender.call(this,b,a);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:" "});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide();this.mon(this.mask,"click",this.focus,this)}if(this.maximizable){this.mon(this.header,"dblclick",this.toggleMaximize,this)}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction,handleCls:"x-window-handle"});this.resizer.window=this;this.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var a=this.getKeyMap();a.on(27,this.onEsc,this);a.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){if(this.rendered){this.hide();this.clearAnchor();Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask)}Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager){this.manager.unregister(this)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true})}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var a=this.proxy.getBox();this.proxy.hide();this.window.handleResize(a);return a},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(b){var a=this.resizeBox;if(a.x!=b.x||a.y!=b.y){this.updateBox(b)}else{this.setSize(b);if(Ext.isIE6&&Ext.isStrict){this.doLayout()}}this.focus();this.updateHandles();this.saveState()},focus:function(){var e=this.focusEl,a=this.defaultButton,c=typeof a,d,b;if(Ext.isDefined(a)){if(Ext.isNumber(a)&&this.fbar){e=this.fbar.items.get(a)}else{if(Ext.isString(a)){e=Ext.getCmp(a)}else{e=a}}d=e.getEl();b=Ext.getDom(this.container);if(d&&b){if(b!=document.body&&!Ext.lib.Region.getRegion(b).contains(Ext.lib.Region.getRegion(d.dom))){return}}}e=e||this.focusEl;e.focus.defer(10,e)},setAnimateTarget:function(a){a=Ext.get(a);this.animateTarget=a},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var a=this.el.getAlignToXY(this.container,"c-c");var b=this.el.translatePoints(a[0],a[1]);this.x=this.x===undefined?b.left:this.x;this.y=this.y===undefined?b.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(c,a,b){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return this}if(this.fireEvent("beforeshow",this)===false){return this}if(a){this.on("show",a,b,{single:true})}this.hidden=false;if(Ext.isDefined(c)){this.setAnimateTarget(c)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}return this},afterShow:function(b){if(this.isDestroyed){return false}this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}this.onShow();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var a=this.getBox();this.el.setStyle("display","none");this.proxy.shift(Ext.apply(a,{callback:this.afterShow.createDelegate(this,[true],false),scope:this,easing:"easeNone",duration:this.showAnimDuration,opacity:0.5}))},hide:function(c,a,b){if(this.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.keyMap){this.keyMap.disable()}this.onHide();this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var a=this.getBox(false);this.proxy.setBox(a);this.el.hide();this.proxy.shift(Ext.apply(this.animateTarget.getBox(),{callback:this.afterHide,scope:this,duration:this.hideAnimDuration,easing:"easeNone",opacity:0}))},onShow:Ext.emptyFn,onHide:Ext.emptyFn,onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var a=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var b;if(this.constrain){b={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var a=this.getSize();b={right:-(a.width-100),bottom:-(a.height-25)}}var c=this.el.getConstrainToXY(this.container,true,b);if(c){this.setPosition(c[0],c[1])}}},ghost:function(a){var c=this.createGhost(a);var b=this.getBox(true);c.setLeftTop(b.x,b.y);c.setWidth(b.width);this.el.hide();this.activeGhost=c;return c},unghost:function(b,a){if(!this.activeGhost){return}if(b!==false){this.el.show();this.focus.defer(10,this);if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}}if(a!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this);return this},close:function(){if(this.fireEvent("beforeclose",this)!==false){if(this.hidden){this.doClose()}else{this.hide(null,this.doClose,this)}}},doClose:function(){this.fireEvent("close",this);this.destroy()},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();this.tools.restore.show()}this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock()}if(this.collapsible){this.tools.toggle.hide()}this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}return this},restore:function(){if(this.maximized){var a=this.tools;this.el.removeClass("x-window-maximized");if(a.restore){a.restore.hide()}if(a.maximize){a.maximize.show()}this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock()}if(this.collapsible&&a.toggle){a.toggle.show()}this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize(false);this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){this.clearAnchor();this.anchorTarget={el:c,alignment:e,offsets:d};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}return this.doAnchor()},doAnchor:function(){var a=this.anchorTarget;this.alignTo(a.el,a.alignment,a.offsets);return this},clearAnchor:function(){if(this.anchorTarget){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this);delete this.anchorTarget}return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){this.focus()}}return this},setActive:function(a){if(a){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a[0],a[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=Ext.extend(Ext.dd.DD,{constructor:function(a){this.win=a;Ext.Window.DD.superclass.constructor.call(this,a.el.id,"WindowDD-"+a.id);this.setHandleElId(a.header.id);this.scroll=false},moveOnly:true,headerOffsets:[100,25],startDrag:function(){var a=this.win;this.proxy=a.ghost(a.initialConfig.cls);if(a.constrain!==false){var c=a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.constrainHeader!==false){var b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b.width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(a){this.alignElWithMouse(this.proxy,a.getPageX(),a.getPageY())},endDrag:function(a){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var g={};var d=[];var e=null;var c=function(k,i){return(!k._lastAccess||k._lastAccess0){m.sort(c);var l=m[0].manager.zseed;for(var n=0;n=0;--k){if(!d[k].hidden){b(d[k]);return}}b(null)};return{zseed:9000,register:function(i){if(i.manager){i.manager.unregister(i)}i.manager=this;g[i.id]=i;d.push(i);i.on("hide",a)},unregister:function(i){delete i.manager;delete g[i.id];i.un("hide",a);d.remove(i)},get:function(i){return typeof i=="object"?i:g[i]},bringToFront:function(i){i=this.get(i);if(i!=e){i._lastAccess=new Date().getTime();h();return true}return false},sendToBack:function(i){i=this.get(i);i._lastAccess=-(new Date().getTime());h();return i},hideAll:function(){for(var i in g){if(g[i]&&typeof g[i]!="function"&&g[i].isVisible()){g[i].hide()}}},getActive:function(){return e},getBy:function(m,l){var n=[];for(var k=d.length-1;k>=0;--k){var o=d[k];if(m.call(l||o,o)!==false){n.push(o)}}return n},each:function(k,i){for(var l in g){if(g[l]&&typeof g[l]!="function"){if(k.call(i||g[l],g[l])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var v,b,r,u,h,m,t,a,o,q,k,g,s,w,p,i="",d="",n=["ok","yes","no","cancel"];var c=function(y){s[y].blur();if(v.isVisible()){v.hide();x();Ext.callback(b.fn,b.scope||window,[y,w.dom.value,b],1)}};var x=function(){if(b&&b.cls){v.el.removeClass(b.cls)}o.reset()};var e=function(A,y,z){if(b&&b.closable!==false){v.hide();x()}if(z){z.stopEvent()}};var l=function(y){var A=0,z;if(!y){Ext.each(n,function(B){s[B].hide()});return A}v.footer.dom.style.display="";Ext.iterate(s,function(B,C){z=y[B];if(z){C.show();C.setText(Ext.isString(z)?z:Ext.MessageBox.buttonText[B]);A+=C.getEl().getWidth()+15}else{C.hide()}});return A};return{getDialog:function(y){if(!v){var A=[];s={};Ext.each(n,function(B){A.push(s[B]=new Ext.Button({text:this.buttonText[B],handler:c.createCallback(B),hideMode:"offsets"}))},this);v=new Ext.Window({autoCreate:true,title:y,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){c("no")}else{c("cancel")}},fbar:new Ext.Toolbar({items:A,enableOverflow:false})});v.render(document.body);v.getEl().addClass("x-window-dlg");r=v.mask;h=v.body.createChild({html:'

'});k=Ext.get(h.dom.firstChild);var z=h.dom.childNodes[1];m=Ext.get(z.firstChild);t=Ext.get(z.childNodes[2].firstChild);t.enableDisplayMode();t.addKeyListener([10,13],function(){if(v.isVisible()&&b&&b.buttons){if(b.buttons.ok){c("ok")}else{if(b.buttons.yes){c("yes")}}}});a=Ext.get(z.childNodes[2].childNodes[1]);a.enableDisplayMode();o=new Ext.ProgressBar({renderTo:h});h.createChild({cls:"x-clear"})}return v},updateText:function(B){if(!v.isVisible()&&!b.width){v.setSize(this.maxWidth,100)}m.update(B?B+" ":" ");var z=d!=""?(k.getWidth()+k.getMargins("lr")):0,D=m.getWidth()+m.getMargins("lr"),A=v.getFrameWidth("lr"),C=v.body.getFrameWidth("lr"),y;y=Math.max(Math.min(b.width||z+D+A+C,b.maxWidth||this.maxWidth),Math.max(b.minWidth||this.minWidth,p||0));if(b.prompt===true){w.setWidth(y-z-A-C)}if(b.progress===true||b.wait===true){o.setSize(y-z-A-C)}if(Ext.isIE&&y==p){y+=4}m.update(B||" ");v.setSize(y,"auto").center();return this},updateProgress:function(z,y,A){o.updateProgress(z,y);if(A){this.updateText(A)}return this},isVisible:function(){return v&&v.isVisible()},hide:function(){var y=v?v.activeGhost:null;if(this.isVisible()||y){v.hide();x();if(y){v.unghost(false,false)}}return this},show:function(B){if(this.isVisible()){this.hide()}b=B;var C=this.getDialog(b.title||" ");C.setTitle(b.title||" ");var y=(b.closable!==false&&b.progress!==true&&b.wait!==true);C.tools.close.setDisplayed(y);w=t;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){t.hide();a.show();a.setHeight(Ext.isNumber(b.multiline)?b.multiline:this.defaultTextHeight);w=a}else{t.show();a.hide()}}else{t.hide();a.hide()}w.dom.value=b.value||"";if(b.prompt){C.focusEl=w}else{var A=b.buttons;var z=null;if(A&&A.ok){z=s.ok}else{if(A&&A.yes){z=s.yes}}if(z){C.focusEl=z}}if(Ext.isDefined(b.iconCls)){C.setIconClass(b.iconCls)}this.setIcon(Ext.isDefined(b.icon)?b.icon:i);p=l(b.buttons);o.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.cls){C.el.addClass(b.cls)}C.proxyDrag=b.proxyDrag===true;C.modal=b.modal!==false;C.mask=b.modal!==false?r:false;if(!C.isVisible()){document.body.appendChild(v.el.dom);C.setAnimateTarget(b.animEl);C.on("show",function(){if(y===true){C.keyMap.enable()}else{C.keyMap.disable()}},this,{single:true});C.show(b.animEl)}if(b.wait===true){o.wait(b.waitConfig)}return this},setIcon:function(y){if(!v){i=y;return}i=undefined;if(y&&y!=""){k.removeClass("x-hidden");k.replaceClass(d,y);h.addClass("x-dlg-icon");d=y}else{k.replaceClass(d,"x-hidden");h.removeClass("x-dlg-icon");d=""}return this},progress:function(A,z,y){this.show({title:A,msg:z,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:y});return this},wait:function(A,z,y){this.show({title:z,msg:A,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:y});return this},alert:function(B,A,z,y){this.show({title:B,msg:A,buttons:this.OK,fn:z,scope:y,minWidth:this.minWidth});return this},confirm:function(B,A,z,y){this.show({title:B,msg:A,buttons:this.YESNO,fn:z,scope:y,icon:this.QUESTION,minWidth:this.minWidth});return this},prompt:function(D,C,A,z,y,B){this.show({title:D,msg:C,buttons:this.OKCANCEL,fn:A,minWidth:this.minPromptWidth,scope:z,prompt:true,multiline:y,value:B});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;Ext.dd.PanelProxy=Ext.extend(Object,{constructor:function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(this.panel.initialConfig.cls,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.Panel.DD=Ext.extend(Ext.dd.DragSource,{constructor:function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=new Ext.dd.PanelProxy(b,a);Ext.Panel.DD.superclass.constructor.call(this,b.el,a);var d=b.header,c=b.body;if(d){this.setHandleElId(d.id);c=b.header}c.setStyle("cursor","move");this.scroll=false},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.state.Provider=Ext.extend(Ext.util.Observable,{constructor:function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){delete this.state[a];this.fireEvent("statechange",this,a,null)},set:function(a,b){this.state[a]=b;this.fireEvent("statechange",this,a,b)},decodeValue:function(b){var e=/^(a|n|d|b|s|o|e)\:(.*)$/,h=e.exec(unescape(b)),d,c,a,g;if(!h||!h[1]){return}c=h[1];a=h[2];switch(c){case"e":return null;case"n":return parseFloat(a);case"d":return new Date(Date.parse(a));case"b":return(a=="1");case"a":d=[];if(a!=""){Ext.each(a.split("^"),function(i){d.push(this.decodeValue(i))},this)}return d;case"o":d={};if(a!=""){Ext.each(a.split("^"),function(i){g=i.split("=");d[g[0]]=this.decodeValue(g[1])},this)}return d;default:return a}},encodeValue:function(c){var b,g="",e=0,a,d;if(c==null){return"e:1"}else{if(typeof c=="number"){b="n:"+c}else{if(typeof c=="boolean"){b="b:"+(c?"1":"0")}else{if(Ext.isDate(c)){b="d:"+c.toGMTString()}else{if(Ext.isArray(c)){for(a=c.length;e-1){var e=this.isSelected(b),c=this.all.elements[b],d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)}},onAdd:function(g,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),h,b=this.all.elements;if(e0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,g,b){if(Ext.isArray(d)){if(!g){this.clearSelections(true)}for(var c=0,a=d.length;c=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('
'+this.loadingText+"
");this.all.clear()}},onDestroy:function(){this.all.clear();this.selected.clear();Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.list.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:undefined,columnResize:true,columnSort:true,maxColumnWidth:Ext.isIE?99:100,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.list.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.list.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('
','','
',"{header}","
","
",'
',"
",'
',"
")}if(!this.tpl){this.tpl=new Ext.XTemplate('',"
",'','
',' class="{cls}">',"{[values.tpl.apply(parent)]}","
","
",'
',"
","
")}var l=this.columns,h=0,k=0,m=l.length,b=[];for(var g=0;gthis.maxColumnWidth){n.width-=(h-this.maxColumnWidth)/100}k++}b.push(n)}l=this.columns=b;if(k10)){b.style.width=d;g.style.width=d}else{b.style.width=c+"px";g.style.width=c+"px";setTimeout(function(){if((a.offsetWidth-a.clientWidth)>10){b.style.width=d;g.style.width=d}},10)}}if(Ext.isNumber(e)){a.style.height=Math.max(0,e-g.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.list.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(g){g=g.dom||g;var a=g.parentNode,d=a.parentNode.childNodes,b=0,e;for(;e=d[b];b++){if(e==a){return b}}return -1},setHdWidths:function(){var d=this.innerHd.dom.getElementsByTagName("div"),c=0,b=this.columns,a=b.length;for(;c','','{text}',"");d.disableFormats=true;d.compile();Ext.TabPanel.prototype.itemTpl=d}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}if(this.activeTab!==undefined){var a=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.mon(this.strip,{scope:this,mousedown:this.onStripMouseDown,contextmenu:this.onStripContextMenu});if(this.enableTabScroll){this.mon(this.strip,"mousewheel",this.onWheel,this)}},findTargets:function(c){var b=null,a=c.getTarget("li:not(.x-tab-edge)",this.strip);if(a){b=this.getComponent(a.id.split(this.idDelimiter)[1]);if(b.disabled){return{close:null,item:null,el:null}}}return{close:c.getTarget(".x-tab-strip-close",this.strip),item:b,el:a}},onStripMouseDown:function(b){if(b.button!==0){return}b.preventDefault();var a=this.findTargets(b);if(a.close){if(a.item.fireEvent("beforeclose",a.item)!==false){a.item.fireEvent("close",a.item);this.remove(a.item)}return}if(a.item&&a.item!=this.activeTab){this.setActiveTab(a.item)}},onStripContextMenu:function(b){b.preventDefault();var a=this.findTargets(b);if(a.item){this.fireEvent("contextmenu",this,a.item,b)}},readTabs:function(d){if(d===true){this.items.each(function(h){this.remove(h)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b0){this.setActiveTab(0)}else{this.setActiveTab(null)}}}if(!this.destroying){this.delegateUpdates()}},onBeforeShowItem:function(a){if(a!=this.activeTab){this.setActiveTab(a);return false}},onItemDisabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).addClass("x-item-disabled")}this.stack.remove(b)},onItemEnabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).removeClass("x-item-disabled")}},onItemTitleChanged:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).child("span.x-tab-strip-text",true).innerHTML=b.title}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){b=Ext.get(b);b.child("span.x-tab-strip-text").replaceClass(c,a);b[Ext.isEmpty(a)?"removeClass":"addClass"]("x-tab-with-icon")}},getTabEl:function(a){var b=this.getComponent(a);return b?b.tabEl:null},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=true},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates()},hideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="none";this.delegateUpdates()}this.stack.remove(b)},unhideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="";this.delegateUpdates()}},delegateUpdates:function(){var a=this.rendered;if(this.suspendUpdates){return}if(this.resizeTabs&&a){this.autoSizeTabs()}if(this.enableTabScroll&&a){this.autoScrollTabs()}},autoSizeTabs:function(){var h=this.items.length,b=this.tabPosition!="bottom"?"header":"footer",c=this[b].dom.offsetWidth,a=this[b].dom.clientWidth;if(!this.resizeTabs||h<1||!a){return}var l=Math.max(Math.min(Math.floor((a-4)/h)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=l;var n=this.strip.query("li:not(.x-tab-edge)");for(var e=0,k=n.length;e20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(i>(a-c)){e.scrollLeft=a-c}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var c=this.stripWrap.dom.offsetHeight;var a=this.pos.insertFirst({cls:"x-tab-scroller-left"});a.setHeight(c);a.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=a;var b=this.pos.insertFirst({cls:"x-tab-scroller-right"});b.setHeight(c);b.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=b},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(e,a){if(!e){return}var c=this.getTabEl(e),h=this.getScrollPos(),d=this.getScrollArea(),g=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+h,b=g+c.offsetWidth;if(g(h+d)){this.scrollTo(b-d,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(g){var h=g.getWheelDelta()*this.wheelIncrement*-1;g.stopEvent();var i=this.getScrollPos(),c=i+h,a=this.getScrollWidth()-this.getScrollArea();var b=Math.max(0,Math.min(a,c));if(b!=i){this.scrollTo(b,false)}},onScrollRight:function(){var a=this.getScrollWidth()-this.getScrollArea(),c=this.getScrollPos(),b=Math.min(a,c+this.getScrollIncrement());if(b!=c){this.scrollTo(b,this.animScroll)}},onScrollLeft:function(){var b=this.getScrollPos(),a=Math.max(0,b-this.getScrollIncrement());if(a!=b){this.scrollTo(a,this.animScroll)}},updateScrollButtons:function(){var a=this.getScrollPos();this.scrollLeft[a===0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[a>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")},beforeDestroy:function(){Ext.destroy(this.leftRepeater,this.rightRepeater);this.deleteMembers("strip","edge","scrollLeft","scrollRight","stripWrap");this.activeTab=null;Ext.TabPanel.superclass.beforeDestroy.apply(this)}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var a=[];return{add:function(b){a.push(b);if(a.length>10){a.shift()}},remove:function(e){var d=[];for(var c=0,b=a.length;c','  ','  ','  ',"");Ext.Button.buttonTemplate.compile()}this.template=Ext.Button.buttonTemplate}var b,d=this.getTemplateArgs();if(a){b=this.template.insertBefore(a,d,true)}else{b=this.template.append(c,d,true)}this.btnEl=b.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});this.initButtonEl(b,this.btnEl);Ext.ButtonToggleMgr.register(this)},initButtonEl:function(b,c){this.el=b;this.setIcon(this.icon);this.setText(this.text);this.setIconClass(this.iconCls);if(Ext.isDefined(this.tabIndex)){c.dom.tabIndex=this.tabIndex}if(this.tooltip){this.setTooltip(this.tooltip,true)}if(this.handleMouseEvents){this.mon(b,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown})}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide})}if(this.repeat){var a=new Ext.util.ClickRepeater(b,Ext.isObject(this.repeat)?this.repeat:{});this.mon(a,"click",this.onRepeatClick,this)}else{this.mon(b,this.clickEvent,this.onClick,this)}},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.useSetClass=true;this.setButtonClass();this.doc=Ext.getDoc();this.doAutoWidth()},setIconClass:function(a){this.iconCls=a;if(this.el){this.btnEl.dom.className="";this.btnEl.addClass(["x-btn-text",a||""]);this.setButtonClass()}return this},setTooltip:function(b,a){if(this.rendered){if(!a){this.clearTip()}if(Ext.isObject(b)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},b));this.tooltip=b}else{this.btnEl.dom[this.tooltipType]=b}}else{this.tooltip=b}return this},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl)}},beforeDestroy:function(){if(this.rendered){this.clearTip()}if(this.menu&&this.destroyMenu!==false){Ext.destroy(this.btnEl,this.menu)}Ext.destroy(this.repeater)},onDestroy:function(){if(this.rendered){this.doc.un("mouseover",this.monitorMouseOver,this);this.doc.un("mouseup",this.onMouseUp,this);delete this.doc;delete this.btnEl;Ext.ButtonToggleMgr.unregister(this)}Ext.Button.superclass.onDestroy.call(this)},doAutoWidth:function(){if(this.autoWidth!==false&&this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var a=this.btnEl;if(a&&a.getWidth()>20){a.clip();a.setWidth(Ext.util.TextMetrics.measure(a,this.text).width+a.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()a}else{return c.getPageY()>this.btnEl.getRegion().bottom}},onClick:function(b,a){b.preventDefault();if(!this.disabled){if(this.isClickOnArrow(b)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("arrowclick",this,b);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,b)}}else{this.doToggle();this.fireEvent("click",this,b);if(this.handler){this.handler.call(this.scope||this,this,b)}}}},isMenuTriggerOver:function(a){return this.menu&&a.target.tagName==this.arrowSelector},isMenuTriggerOut:function(b,a){return this.menu&&b.target.tagName!=this.arrowSelector}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(a){if(a&&this.showText===true){var b="";if(this.prependText){b+=this.prependText}b+=a.text;return b}return undefined},setActiveItem:function(c,a){if(!Ext.isObject(c)){c=this.menu.getComponent(c)}if(c){if(!this.rendered){this.text=this.getItemText(c);this.iconCls=c.iconCls}else{var b=this.getItemText(c);if(b){this.setText(b)}this.setIconClass(c.iconCls)}this.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(this.forceIcon){this.setIconClass(this.forceIcon)}if(!a){this.fireEvent("change",this,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var a=0;Ext.each(this.items,function(c,b){Ext.apply(c,{group:c.group||this.id,itemIndex:b,checkHandler:this.checkHandler,scope:this,checked:c.checked||false});this.menu.items.push(c);if(c.checked){a=b}},this);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this);this.setActiveItem(a,true)},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var a=this.menu;a.render();if(!a.hasLayout){a.doLayout()}var d,b;for(var c=1;c"){b=new a.Fill()}else{b=new a.TextItem(b)}}}this.applyDefaults(b)}else{if(b.isFormField||b.render){b=this.createComponent(b)}else{if(b.tag){b=new a.Item({autoEl:b})}else{if(b.tagName){b=new a.Item({el:b})}else{if(Ext.isObject(b)){b=b.xtype?this.createComponent(b):this.constructButton(b)}}}}}return b},applyDefaults:function(e){if(!Ext.isString(e)){e=Ext.Toolbar.superclass.applyDefaults.call(this,e);var b=this.internalDefaults;if(e.events){Ext.applyIf(e.initialConfig,b);Ext.apply(e,b)}else{Ext.applyIf(e,b)}}return e},addSeparator:function(){return this.add(new a.Separator())},addSpacer:function(){return this.add(new a.Spacer())},addFill:function(){this.add(new a.Fill())},addElement:function(b){return this.addItem(new a.Item({el:b}))},addItem:function(b){return this.add.apply(this,arguments)},addButton:function(c){if(Ext.isArray(c)){var e=[];for(var d=0,b=c.length;d");this.items.push(this.displayItem=new a.TextItem({}))}Ext.PagingToolbar.superclass.initComponent.call(this);this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});this.cursor=0;this.bindStore(this.store,true)},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var c=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());this.displayItem.setText(c)}},onLoad:function(b,e,k){if(!this.rendered){this.dsLoaded=[b,e,k];return}var g=this.getParams();this.cursor=(k.params&&k.params[g.start])?k.params[g.start]:0;var i=this.getPageData(),c=i.activePage,h=i.pages;this.afterTextItem.setText(String.format(this.afterPageText,i.pages));this.inputItem.setValue(c);this.first.setDisabled(c==1);this.prev.setDisabled(c==1);this.next.setDisabled(c==h);this.last.setDisabled(c==h);this.refresh.enable();this.updateInfo();this.fireEvent("change",this,i)},getPageData:function(){var b=this.store.getTotalCount();return{total:b,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:b=1&g<=l.pages){i.setValue(g)}}}}}},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(d){var c={},b=this.getParams();c[b.start]=d;c[b.limit]=this.pageSize;if(this.fireEvent("beforechange",this,c)!==false){this.store.load({params:c})}},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var c=this.store.getTotalCount(),b=c%this.pageSize;this.doLoad(b?(c-b):c-this.pageSize)},doRefresh:function(){this.doLoad(this.cursor)},bindStore:function(c,d){var b;if(!d&&this.store){if(c!==this.store&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.beforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this)}if(!c){this.store=null}}if(c){c=Ext.StoreMgr.lookup(c);c.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});b=true}this.store=c;if(b){this.onLoad(c,null,{})}},unbind:function(b){this.bindStore(null)},bind:function(b){this.bindStore(b)},onDestroy:function(){this.bindStore(null);Ext.PagingToolbar.superclass.onDestroy.call(this)}})})();Ext.reg("paging",Ext.PagingToolbar);Ext.History=(function(){var e,c;var l=false;var d;function g(){var m=location.href,n=m.indexOf("#");return n>=0?m.substr(n+1):null}function a(){c.value=d}function h(m){d=m;Ext.History.fireEvent("change",m)}function i(n){var m=['
',Ext.util.Format.htmlEncode(n),"
"].join("");try{var p=e.contentWindow.document;p.open();p.write(m);p.close();return true}catch(o){return false}}function b(){if(!e.contentWindow||!e.contentWindow.document){setTimeout(b,10);return}var p=e.contentWindow.document;var n=p.getElementById("state");var m=n?n.innerText:null;var o=g();setInterval(function(){p=e.contentWindow.document;n=p.getElementById("state");var r=n?n.innerText:null;var q=g();if(r!==m){m=r;h(m);top.location.hash=m;o=m;a()}else{if(q!==o){o=q;i(q)}}},50);l=true;Ext.History.fireEvent("ready",Ext.History)}function k(){d=c.value?c.value:g();if(Ext.isIE){b()}else{var m=g();setInterval(function(){var n=g();if(n!==m){m=n;h(m);a()}},50);l=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(n,m){if(l){Ext.callback(n,m,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(n,m)});return}c=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){e=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(n){this.on("ready",n,m,{single:true})}k()},add:function(m,n){if(n!==false){if(this.getToken()==m){return true}}if(Ext.isIE){return i(m)}else{top.location.hash=m;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return l?d:g()}}})();Ext.apply(Ext.History,new Ext.util.Observable());Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,closeAction:"hide",initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header"}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this[this.closeAction],scope:this})}},showAt:function(a){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth()}if(this.constrainPosition){a=this.el.adjustForConstraints(a)}this.setPagePosition(a[0],a[1])},doAutoWidth:function(a){a=a||0;var b=this.body.getTextWidth();if(this.title){b=Math.max(b,this.header.child("span").getTextWidth(this.title))}b+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr")+a;this.setWidth(b.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}},showBy:function(a,b){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});Ext.reg("tip",Ext.Tip);Ext.Tip.DD=function(b,a){Ext.apply(this,a);this.tip=b;Ext.Tip.DD.superclass.constructor.call(this,b.el.id,"WindowDD-"+b.id);this.setHandleElId(b.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(a){this.tip.el.enableShadow(true)}});Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,constrainPosition:false,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget(this.target);this.origAnchor=this.anchor},onRender:function(b,a){Ext.ToolTip.superclass.onRender.call(this,b,a);this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this);this.anchorEl.setStyle("z-index",this.el.getZIndex()+1).setVisibilityMode(Ext.Element.DISPLAY)},initTarget:function(c){var a;if((a=Ext.get(c))){if(this.target){var b=Ext.get(this.target);this.mun(b,"mouseover",this.onTargetOver,this);this.mun(b,"mouseout",this.onTargetOut,this);this.mun(b,"mousemove",this.onMouseMove,this)}this.mon(a,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this});this.target=a}if(this.anchor){this.anchorTarget=this.target}},onMouseMove:function(b){var a=this.delegate?b.getTarget(this.delegate):this.triggerElement=true;if(a){this.targetXY=b.getXY();if(a===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(b)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},getTargetXY:function(){if(this.delegate){this.anchorTarget=this.triggerElement}if(this.anchor){this.targetCounter++;var c=this.getOffsets(),m=(this.anchorToTarget&&!this.trackMouse)?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY,a=Ext.lib.Dom.getViewWidth()-5,h=Ext.lib.Dom.getViewHeight()-5,i=document.documentElement,e=document.body,l=(i.scrollLeft||e.scrollLeft||0)+5,k=(i.scrollTop||e.scrollTop||0)+5,b=[m[0]+c[0],m[1]+c[1]],g=this.getSize();this.anchorEl.removeClass(this.anchorCls);if(this.targetCounter<2){if(b[0]a){if(this.anchorToTarget){this.defaultAlign="r-l";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="right";return this.getTargetXY()}if(b[1]h){if(this.anchorToTarget){this.defaultAlign="b-t";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="bottom";return this.getTargetXY()}}this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl.addClass(this.anchorCls);this.targetCounter=0;return b}else{var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]}},getMouseOffset:function(){var a=this.anchor?[0,0]:[15,18];if(this.mouseOffset){a[0]+=this.mouseOffset[0];a[1]+=this.mouseOffset[1]}return a},getAnchorPosition:function(){if(this.anchor){this.tipAnchor=this.anchor.charAt(0)}else{var a=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!a){throw"AnchorTip.defaultAlign is invalid"}this.tipAnchor=a[1].charAt(0)}switch(this.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var b,a=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-this.anchorOffset,30];break;case"b":b=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":b=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:b=[25,-13-this.anchorOffset];break}}var c=this.getMouseOffset();b[0]+=c[0];b[1]+=c[1];return b},onTargetOver:function(b){if(this.disabled||b.within(this.target.dom,true)){return}var a=b.getTarget(this.delegate);if(a){this.triggerElement=a;this.clearTimer("hide");this.targetXY=b.getXY();this.delayShow()}},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()=c){d=c-b-5}}return{x:a,y:d}},beforeDestroy:function(){this.clearTimers();Ext.destroy(this.anchorEl);delete this.anchorEl;delete this.target;delete this.anchorTarget;delete this.triggerElement;Ext.ToolTip.superclass.beforeDestroy.call(this)},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);Ext.ToolTip.superclass.onDestroy.call(this)}});Ext.reg("tooltip",Ext.ToolTip);Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(e){var h=Ext.isArray(e)?e:arguments;for(var g=0,a=h.length;g1){var d=function(i,h){if(i&&h){var k=h.findChild(a,b);if(k){k.select();if(g){g(true,k)}}else{if(g){g(false,k)}}}else{if(g){g(false,k)}}};this.expandPath(c.join(this.pathSeparator),a,d)}else{this.root.select();if(g){g(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(b,a){Ext.tree.TreePanel.superclass.onRender.call(this,b,a);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.renderRoot()},beforeDestroy:function(){if(this.rendered){Ext.dd.ScrollManager.unregister(this.body);Ext.destroy(this.dropZone,this.dragZone)}this.destroyRoot();Ext.destroy(this.loader);this.nodeHash=this.root=this.loader=null;Ext.tree.TreePanel.superclass.beforeDestroy.call(this)},destroyRoot:function(){if(this.root&&this.root.destroy){this.root.destroy(true)}}});Ext.tree.TreePanel.nodeTypes={};Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(a){this.tree=a;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var a=this.tree;if(a.trackMouseOver!==false){a.mon(a.innerCt,{scope:this,mouseover:this.delegateOver,mouseout:this.delegateOut})}a.mon(a.getTreeEl(),{scope:this,click:this.delegateClick,dblclick:this.delegateDblClick,contextmenu:this.delegateContextMenu})},getNode:function(b){var a;if(a=b.getTarget(".x-tree-node-el",10)){var c=Ext.fly(a,"_treeEvents").getAttribute("tree-node-id","ext");if(c){return this.tree.getNodeById(c)}}return null},getNodeTarget:function(b){var a=b.getTarget(".x-tree-node-icon",1);if(!a){a=b.getTarget(".x-tree-node-el",6)}return a},delegateOut:function(b,a){if(!this.beforeEvent(b)){return}if(b.getTarget(".x-tree-ec-icon",1)){var c=this.getNode(b);this.onIconOut(b,c);if(c==this.lastEcOver){delete this.lastEcOver}}if((a=this.getNodeTarget(b))&&!b.within(a,true)){this.onNodeOut(b,this.getNode(b))}},delegateOver:function(b,a){if(!this.beforeEvent(b)){return}if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on("mouseover",this.trackExit,this);this.trackingDoc=true}if(this.lastEcOver){this.onIconOut(b,this.lastEcOver);delete this.lastEcOver}if(b.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(b);this.onIconOver(b,this.lastEcOver)}if(a=this.getNodeTarget(b)){this.onNodeOver(b,this.getNode(b))}},trackExit:function(a){if(this.lastOverNode){if(this.lastOverNode.ui&&!a.within(this.lastOverNode.ui.getEl())){this.onNodeOut(a,this.lastOverNode)}delete this.lastOverNode;Ext.getBody().un("mouseover",this.trackExit,this);this.trackingDoc=false}},delegateClick:function(b,a){if(this.beforeEvent(b)){if(b.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(b,this.getNode(b))}else{if(b.getTarget(".x-tree-ec-icon",1)){this.onIconClick(b,this.getNode(b))}else{if(this.getNodeTarget(b)){this.onNodeClick(b,this.getNode(b))}}}}else{this.checkContainerEvent(b,"click")}},delegateDblClick:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeDblClick(b,this.getNode(b))}}else{this.checkContainerEvent(b,"dblclick")}},delegateContextMenu:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeContextMenu(b,this.getNode(b))}}else{this.checkContainerEvent(b,"contextmenu")}},checkContainerEvent:function(b,a){if(this.disabled){b.stopEvent();return false}this.onContainerEvent(b,a)},onContainerEvent:function(b,a){this.tree.fireEvent("container"+a,this.tree,b)},onNodeClick:function(b,a){a.ui.onClick(b)},onNodeOver:function(b,a){this.lastOverNode=a;a.ui.onOver(b)},onNodeOut:function(b,a){a.ui.onOut(b)},onIconOver:function(b,a){a.ui.addClass("x-tree-ec-over")},onIconOut:function(b,a){a.ui.removeClass("x-tree-ec-over")},onIconClick:function(b,a){a.ui.ecClick(b)},onCheckboxClick:function(b,a){a.ui.onCheckChange(b)},onNodeDblClick:function(b,a){a.ui.onDblClick(b)},onNodeContextMenu:function(b,a){a.ui.onContextMenu(b)},beforeEvent:function(b){var a=this.getNode(b);if(this.disabled||!a||!a.ui){b.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,a);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){this.select(a)},select:function(c,a){if(!Ext.fly(c.ui.wrap).isVisible()&&a){return a.call(this,c)}var b=this.selNode;if(c==b){c.ui.onSelectedChange(true)}else{if(this.fireEvent("beforeselect",this,c,b)!==false){if(b&&b.ui){b.ui.onSelectedChange(false)}this.selNode=c;c.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,c,b)}}return c},unselect:function(b,a){if(this.selNode==b){this.clearSelections(a)}},clearSelections:function(a){var b=this.selNode;if(b){b.ui.onSelectedChange(false);this.selNode=null;if(a!==true){this.fireEvent("selectionchange",this,null)}}return b},getSelectedNode:function(){return this.selNode},isSelected:function(a){return this.selNode==a},selectPrevious:function(a){if(!(a=a||this.selNode||this.lastSelNode)){return null}var c=a.previousSibling;if(c){if(!c.isExpanded()||c.childNodes.length<1){return this.select(c,this.selectPrevious)}else{var b=c.lastChild;while(b&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()&&b.childNodes.length>0){b=b.lastChild}return this.select(b,this.selectPrevious)}}else{if(a.parentNode&&(this.tree.rootVisible||!a.parentNode.isRoot)){return this.select(a.parentNode,this.selectPrevious)}}return null},selectNext:function(b){if(!(b=b||this.selNode||this.lastSelNode)){return null}if(b.firstChild&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()){return this.select(b.firstChild,this.selectNext)}else{if(b.nextSibling){return this.select(b.nextSibling,this.selectNext)}else{if(b.parentNode){var a=null;b.parentNode.bubble(function(){if(this.nextSibling){a=this.getOwnerTree().selModel.select(this.nextSibling,this.selectNext);return false}});return a}}}return null},onKeyDown:function(c){var b=this.selNode||this.lastSelNode;var d=this;if(!b){return}var a=c.getKey();switch(a){case c.DOWN:c.stopEvent();this.selectNext();break;case c.UP:c.stopEvent();this.selectPrevious();break;case c.RIGHT:c.preventDefault();if(b.hasChildNodes()){if(!b.isExpanded()){b.expand()}else{if(b.firstChild){this.select(b.firstChild,c)}}}break;case c.LEFT:c.preventDefault();if(b.hasChildNodes()&&b.isExpanded()){b.collapse()}else{if(b.parentNode&&(this.tree.rootVisible||b.parentNode!=this.tree.getRootNode())){this.select(b.parentNode,c)}}break}}});Ext.tree.MultiSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,a);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){if(b.ctrlKey&&this.isSelected(a)){this.unselect(a)}else{this.select(a,b,b.ctrlKey)}},select:function(a,c,b){if(b!==true){this.clearSelections(true)}if(this.isSelected(a)){this.lastSelNode=a;return a}this.selNodes.push(a);this.selMap[a.id]=a;this.lastSelNode=a;a.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return a},unselect:function(b){if(this.selMap[b.id]){b.ui.onSelectedChange(false);var c=this.selNodes;var a=c.indexOf(b);if(a!=-1){this.selNodes.splice(a,1)}delete this.selMap[b.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(b){var d=this.selNodes;if(d.length>0){for(var c=0,a=d.length;c0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(e){var g=false;if(Ext.isArray(e)){g=e}else{if(arguments.length>1){g=arguments}}if(g){for(var d=0,a=g.length;d0){var g=d?function(){e.apply(d,arguments)}:e;c.sort(g);for(var b=0;b
','',this.indentMarkup,"",'','',g?('':"/>")):"",'',e.text,"
",'',""].join("");if(m!==true&&e.nextSibling&&(b=e.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,d)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",k,d)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var i=this.elNode.childNodes;this.indentNode=i[0];this.ecNode=i[1];this.iconNode=i[2];var h=3;if(g){this.checkbox=i[3];this.checkbox.defaultChecked=this.checkbox.checked;h++}this.anchor=i[h];this.textNode=i[h].firstChild},getHref:function(a){return Ext.isEmpty(a)?(Ext.isGecko?"":"#"):a},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var g=this.node,d,c,a=g.isLast()?"x-tree-elbow-end":"x-tree-elbow",e=g.hasChildNodes();if(e||g.attributes.expandable){if(g.expanded){a+="-minus";d="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";d="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=d||this.c2!=c){Ext.fly(this.elNode).replaceClass(d,c);this.c1=d;this.c2=c}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-collapsed");delete this.c1;delete this.c2;this.wasLeaf=true}}var b="x-tree-ec-icon "+a;if(this.ecc!=b){this.ecNode.className=b;this.ecc=b}}},onIdChange:function(a){if(this.rendered){this.elNode.setAttribute("ext:tree-node-id",a)}},getChildIndent:function(){if(!this.childIndent){var a=[],b=this.node;while(b){if(!b.isRoot||(b.isRoot&&b.ownerTree.rootVisible)){if(!b.isLast()){a.unshift('')}else{a.unshift('')}}b=b.parentNode}this.childIndent=a.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var a="",b=this.node.parentNode;if(b){a=b.ui.getChildIndent()}if(this.indentMarkup!=a){this.indentNode.innerHTML=a;this.indentMarkup=a}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}Ext.each(["textnode","anchor","checkbox","indentNode","ecNode","iconNode","elNode","ctNode","wrap","holder"],function(a){if(this[a]){Ext.fly(this[a]).remove();delete this[a]}},this);delete this.node}});Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var a=this.node.ownerTree.innerCt.dom;this.node.expanded=true;a.innerHTML='
';this.wrap=this.ctNode=a.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeLoader=function(a){this.baseParams={};Ext.apply(this,a);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,paramOrder:undefined,paramsAsHash:false,nodeParameter:"node",directFn:undefined,load:function(b,c,a){if(this.clearOnLoad){while(b.firstChild){b.removeChild(b.firstChild)}}if(this.doPreload(b)){this.runCallback(c,a||b,[b])}else{if(this.directFn||this.dataUrl||this.url){this.requestData(b,c,a||b)}}},doPreload:function(d){if(d.attributes.children){if(d.childNodes.length<1){var c=d.attributes.children;d.beginUpdate();for(var b=0,a=c.length;b-1){c=[]}for(var d=0,a=b.length;dv2){return c?-1:1}}return 0}},doSort:function(a){a.sort(this.sortFn)},updateSort:function(a,b){if(b.childrenRendered){this.doSort.defer(1,this,[b])}},updateSortParent:function(a){var b=a.parentNode;if(b&&b.childrenRendered){this.doSort.defer(1,this,[b])}}});if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(a,b){this.allowParentInsert=b.allowParentInsert||false;this.allowContainerDrop=b.allowContainerDrop||false;this.appendOnly=b.appendOnly||false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.getTreeEl(),b);this.tree=a;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(a){if(a.hasChildNodes()&&!a.isExpanded()){a.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(a){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(a,l,i,d,c){if(!a||!c){return false}var g=a.node;var h=c.node;if(!(g&&g.isTarget&&l)){return false}if(l=="append"&&g.allowChildren===false){return false}if((l=="above"||l=="below")&&(g.parentNode&&g.parentNode.allowChildren===false)){return false}if(h&&(g==h||h.contains(g))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=g;b.data=c;b.point=l;b.source=i;b.rawEvent=d;b.dropNode=h;b.cancel=false;var k=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&k!==false},getDropPoint:function(h,g,m){var o=g.node;if(o.isRoot){return o.allowChildren!==false?"append":false}var c=g.ddel;var p=Ext.lib.Dom.getY(c),k=p+c.offsetHeight;var i=Ext.lib.Event.getPageY(h);var l=o.allowChildren===false||o.isLeaf();if(this.appendOnly||o.parentNode.allowChildren===false){return l?false:"append"}var d=false;if(!this.allowParentInsert){d=o.hasChildNodes()&&o.isExpanded()}var a=(k-p)/(l?2:3);if(i>=p&&i<(p+a)){return"above"}else{if(!d&&(l||i>=k-a&&i<=k)){return"below"}else{return"append"}}},onNodeEnter:function(d,a,c,b){this.cancelExpand()},onContainerOver:function(a,c,b){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,c,b)){return this.dropAllowed}return this.dropNotAllowed},onNodeOver:function(b,i,h,g){var l=this.getDropPoint(h,b,i);var c=b.node;if(!this.expandProcId&&l=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(l!="append"){this.cancelExpand()}}var d=this.dropNotAllowed;if(this.isValidDropPoint(b,l,i,h,g)){if(l){var a=b.ddel;var k;if(l=="above"){d=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";k="x-tree-drag-insert-above"}else{if(l=="below"){d=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";k="x-tree-drag-insert-below"}else{d="x-tree-drop-ok-append";k="x-tree-drag-append"}}if(this.lastInsertClass!=k){Ext.fly(a).replaceClass(this.lastInsertClass,k);this.lastInsertClass=k}}}return d},onNodeOut:function(d,a,c,b){this.cancelExpand();this.removeDropIndicators(d)},onNodeDrop:function(i,b,h,d){var a=this.getDropPoint(h,i,b);var g=i.node;g.ui.startDrop();if(!this.isValidDropPoint(i,a,b,h,d)){g.ui.endDrop();return false}var c=d.node||(b.getTreeNode?b.getTreeNode(d,g,a,h):null);return this.processDrop(g,d,a,b,h,c)},onContainerDrop:function(a,g,c){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,g,c)){var d=this.tree.getRootNode();d.ui.startDrop();var b=c.node||(a.getTreeNode?a.getTreeNode(c,d,"append",g):null);return this.processDrop(d,c,"append",a,g,b)}return false},processDrop:function(k,h,b,a,i,d){var g={tree:this.tree,target:k,data:h,point:b,source:a,rawEvent:i,dropNode:d,cancel:!d,dropStatus:false};var c=this.tree.fireEvent("beforenodedrop",g);if(c===false||g.cancel===true||!g.dropNode){k.ui.endDrop();return g.dropStatus}k=g.target;if(b=="append"&&!k.isExpanded()){k.expand(false,null,function(){this.completeDrop(g)}.createDelegate(this))}else{this.completeDrop(g)}return true},completeDrop:function(h){var d=h.dropNode,e=h.point,c=h.target;if(!Ext.isArray(d)){d=[d]}var g;for(var b=0,a=d.length;bd.offsetLeft){e.scrollLeft=d.offsetLeft}var a=Math.min(this.maxWidth,(e.clientWidth>20?e.clientWidth:e.offsetWidth)-Math.max(0,d.offsetLeft-e.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,c){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){Ext.fly(a.ui.getEl()).scrollIntoView(this.tree.body)}var b=a.text||"";if(!Ext.isGecko&&Ext.isEmpty(a.text)){a.setText(" ")}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,b]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(a,b){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(a)){b.stopEvent();return this.triggerEdit(a)}},onNodeDblClick:function(a,b){clearTimeout(this.autoEditTimer)},updateNode:function(a,b){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(b)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui)}},onSpecialKey:function(c,b){var a=b.getKey();if(a==b.ESC){b.stopEvent();this.cancelEdit()}else{if(a==b.ENTER&&!b.hasModifier()){b.stopEvent();this.completeEdit()}}},onDestroy:function(){clearTimeout(this.autoEditTimer);Ext.tree.TreeEditor.superclass.onDestroy.call(this);var a=this.tree;a.un("beforeclick",this.beforeNodeClick,this);a.un("dblclick",this.onNodeDblClick,this)}}); -/* SWFObject v2.2 - is released under the MIT License +/* SWFObject v2.2 + is released under the MIT License */ var swfobject=function(){var F="undefined",t="object",U="Shockwave Flash",Y="ShockwaveFlash.ShockwaveFlash",s="application/x-shockwave-flash",T="SWFObjectExprInst",z="onreadystatechange",Q=window,l=document,v=navigator,V=false,W=[i],q=[],P=[],K=[],n,S,G,D,L=false,a=false,p,I,o=true,O=function(){var ac=typeof l.getElementById!=F&&typeof l.getElementsByTagName!=F&&typeof l.createElement!=F,aj=v.userAgent.toLowerCase(),aa=v.platform.toLowerCase(),ag=aa?(/win/).test(aa):/win/.test(aj),ae=aa?(/mac/).test(aa):/mac/.test(aj),ah=/webkit/.test(aj)?parseFloat(aj.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,Z=!+"\v1",ai=[0,0,0],ad=null;if(typeof v.plugins!=F&&typeof v.plugins[U]==t){ad=v.plugins[U].description;if(ad&&!(typeof v.mimeTypes!=F&&v.mimeTypes[s]&&!v.mimeTypes[s].enabledPlugin)){V=true;Z=false;ad=ad.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ai[0]=parseInt(ad.replace(/^(.*)\..*$/,"$1"),10);ai[1]=parseInt(ad.replace(/^.*\.(.*)\s.*$/,"$1"),10);ai[2]=/[a-zA-Z]/.test(ad)?parseInt(ad.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof Q.ActiveXObject!=F){try{var af=new ActiveXObject(Y);if(af){ad=af.GetVariable("$version");if(ad){Z=true;ad=ad.split(" ")[1].split(",");ai=[parseInt(ad[0],10),parseInt(ad[1],10),parseInt(ad[2],10)]}}}catch(ab){}}}return{w3:ac,pv:ai,wk:ah,ie:Z,win:ag,mac:ae}}(),m=function(){if(!O.w3){return}if((typeof l.readyState!=F&&l.readyState=="complete")||(typeof l.readyState==F&&(l.getElementsByTagName("body")[0]||l.body))){g()}if(!L){if(typeof l.addEventListener!=F){l.addEventListener("DOMContentLoaded",g,false)}if(O.ie&&O.win){l.attachEvent(z,function(){if(l.readyState=="complete"){l.detachEvent(z,arguments.callee);g()}});if(Q==top){(function(){if(L){return}try{l.documentElement.doScroll("left")}catch(Z){setTimeout(arguments.callee,0);return}g()})()}}if(O.wk){(function(){if(L){return}if(!(/loaded|complete/).test(l.readyState)){setTimeout(arguments.callee,0);return}g()})()}u(g)}}();function g(){if(L){return}try{var ab=l.getElementsByTagName("body")[0].appendChild(E("span"));ab.parentNode.removeChild(ab)}catch(ac){return}L=true;var Z=W.length;for(var aa=0;aa0){for(var ah=0;ah0){var ag=c(aa);if(ag){if(H(q[ah].swfVersion)&&!(O.wk&&O.wk<312)){y(aa,true);if(ad){ac.success=true;ac.ref=B(aa);ad(ac)}}else{if(q[ah].expressInstall&&C()){var ak={};ak.data=q[ah].expressInstall;ak.width=ag.getAttribute("width")||"0";ak.height=ag.getAttribute("height")||"0";if(ag.getAttribute("class")){ak.styleclass=ag.getAttribute("class")}if(ag.getAttribute("align")){ak.align=ag.getAttribute("align")}var aj={};var Z=ag.getElementsByTagName("param");var ae=Z.length;for(var af=0;af'}}ac.outerHTML='"+ah+"";P[P.length]=ak.id;Z=c(ak.id)}else{var ab=E(t);ab.setAttribute("type",s);for(var ae in ak){if(ak[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="styleclass"){ab.setAttribute("class",ak[ae])}else{if(ae.toLowerCase()!="classid"){ab.setAttribute(ae,ak[ae])}}}}for(var ad in ai){if(ai[ad]!=Object.prototype[ad]&&ad.toLowerCase()!="movie"){e(ab,ad,ai[ad])}}ac.parentNode.replaceChild(ab,ac);Z=ab}}return Z}function e(ab,Z,aa){var ac=E("param");ac.setAttribute("name",Z);ac.setAttribute("value",aa);ab.appendChild(ac)}function A(aa){var Z=c(aa);if(Z&&Z.nodeName=="OBJECT"){if(O.ie&&O.win){Z.style.display="none";(function(){if(Z.readyState==4){b(aa)}else{setTimeout(arguments.callee,10)}})()}else{Z.parentNode.removeChild(Z)}}}function b(ab){var aa=c(ab);if(aa){for(var Z in aa){if(typeof aa[Z]=="function"){aa[Z]=null}}aa.parentNode.removeChild(aa)}}function c(ab){var Z=null;try{Z=l.getElementById(ab)}catch(aa){}return Z}function E(Z){return l.createElement(Z)}function k(ab,Z,aa){ab.attachEvent(Z,aa);K[K.length]=[ab,Z,aa]}function H(ab){var aa=O.pv,Z=ab.split(".");Z[0]=parseInt(Z[0],10);Z[1]=parseInt(Z[1],10)||0;Z[2]=parseInt(Z[2],10)||0;return(aa[0]>Z[0]||(aa[0]==Z[0]&&aa[1]>Z[1])||(aa[0]==Z[0]&&aa[1]==Z[1]&&aa[2]>=Z[2]))?true:false}function x(ae,aa,af,ad){if(O.ie&&O.mac){return}var ac=l.getElementsByTagName("head")[0];if(!ac){return}var Z=(af&&typeof af=="string")?af:"screen";if(ad){p=null;I=null}if(!p||I!=Z){var ab=E("style");ab.setAttribute("type","text/css");ab.setAttribute("media",Z);p=ac.appendChild(ab);if(O.ie&&O.win&&typeof l.styleSheets!=F&&l.styleSheets.length>0){p=l.styleSheets[l.styleSheets.length-1]}I=Z}if(O.ie&&O.win){if(p&&typeof p.addRule==t){p.addRule(ae,aa)}}else{if(p&&typeof l.createTextNode!=F){p.appendChild(l.createTextNode(ae+" {"+aa+"}"))}}}function y(ab,Z){if(!o){return}var aa=Z?"visible":"hidden";if(L&&c(ab)){c(ab).style.visibility=aa}else{x("#"+ab,"visibility:"+aa)}}function N(aa){var ab=/[\\\"<>\.;]/;var Z=ab.exec(aa)!=null;return Z&&typeof encodeURIComponent!=F?encodeURIComponent(aa):aa}var d=function(){if(O.ie&&O.win){window.attachEvent("onunload",function(){var ae=K.length;for(var ad=0;ad0){for(h=0;h-1&&e.position=="left"){e.position="bottom"}return e},onDestroy:function(){Ext.chart.CartesianChart.superclass.onDestroy.call(this);Ext.each(this.labelFn,function(a){this.removeFnProxy(a)},this)}});Ext.reg("cartesianchart",Ext.chart.CartesianChart);Ext.chart.LineChart=Ext.extend(Ext.chart.CartesianChart,{type:"line"});Ext.reg("linechart",Ext.chart.LineChart);Ext.chart.ColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"column"});Ext.reg("columnchart",Ext.chart.ColumnChart);Ext.chart.StackedColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackcolumn"});Ext.reg("stackedcolumnchart",Ext.chart.StackedColumnChart);Ext.chart.BarChart=Ext.extend(Ext.chart.CartesianChart,{type:"bar"});Ext.reg("barchart",Ext.chart.BarChart);Ext.chart.StackedBarChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackbar"});Ext.reg("stackedbarchart",Ext.chart.StackedBarChart);Ext.chart.Axis=function(a){Ext.apply(this,a)};Ext.chart.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true,labelSpacing:2};Ext.chart.NumericAxis=Ext.extend(Ext.chart.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear",roundMajorUnit:true,calculateByLabelSize:true,position:"left",adjustMaximumByMajorUnit:true,adjustMinimumByMajorUnit:true});Ext.chart.TimeAxis=Ext.extend(Ext.chart.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true,stackingEnabled:false,calculateByLabelSize:true});Ext.chart.CategoryAxis=Ext.extend(Ext.chart.Axis,{type:"category",categoryNames:null,calculateCategoryCount:false});Ext.chart.Series=function(a){Ext.apply(this,a)};Ext.chart.Series.prototype={type:null,displayName:null};Ext.chart.CartesianSeries=Ext.extend(Ext.chart.Series,{xField:null,yField:null,showInLegend:true,axis:"primary"});Ext.chart.ColumnSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"column"});Ext.chart.LineSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"line"});Ext.chart.BarSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"bar"});Ext.chart.PieSeries=Ext.extend(Ext.chart.Series,{type:"pie",dataField:null,categoryField:null});Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,enableScrolling:true,maxHeight:null,scrollIncrement:24,showSeparator:true,defaultOffsets:[0,0],plain:false,floating:true,zIndex:15000,hidden:true,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:true,defaultType:"menuitem",bufferResize:false,initComponent:function(){if(Ext.isArray(this.initialConfig)){Ext.apply(this,{items:this.initialConfig})}this.addEvents("click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);if(this.floating){Ext.EventManager.onWindowResize(this.hide,this)}else{if(this.initialConfig.hidden!==false){this.hidden=false}this.internalDefaults={hideOnClick:false}}Ext.menu.Menu.superclass.initComponent.call(this);if(this.autoLayout){var a=this.doLayout.createDelegate(this,[]);this.on({add:a,remove:a})}},getLayoutTarget:function(){return this.ul},onRender:function(b,a){if(!b){b=Ext.getBody()}var c={id:this.getId(),cls:"x-menu "+((this.floating)?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};if(this.floating){this.el=new Ext.Layer({shadow:this.shadow,dh:c,constrain:false,parentEl:b,zindex:this.zIndex})}else{this.el=b.createChild(c)}Ext.menu.Menu.superclass.onRender.call(this,b,a);if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}this.focusEl=this.el.child("a.x-menu-focus");this.ul=this.el.child("ul.x-menu-list");this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut});if(this.enableScrolling){this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})}},findTargetItem:function(b){var a=b.getTarget(".x-menu-list-item",this.ul,true);if(a&&a.menuItemId){return this.items.get(a.menuItemId)}},onClick:function(b){var a=this.findTargetItem(b);if(a){if(a.isFormField){this.setActiveItem(a)}else{if(a instanceof Ext.menu.BaseItem){if(a.menu&&this.ignoreParentClicks){a.expandMenu();b.preventDefault()}else{if(a.onClick){a.onClick(b);this.fireEvent("click",this,a,b)}}}}}},setActiveItem:function(a,b){if(a!=this.activeItem){this.deactivateActive();if((this.activeItem=a).isFormField){a.focus()}else{a.activate(b)}}else{if(b){a.expandMenu()}}},deactivateActive:function(){var b=this.activeItem;if(b){if(b.isFormField){if(b.collapse){b.collapse()}}else{b.deactivate()}delete this.activeItem}},tryActivate:function(g,e){var b=this.items;for(var c=g,a=b.length;c>=0&&c=a.scrollHeight){this.onScrollerOut(null,b)}},onScrollerIn:function(d,b){var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");if(c?a.scrollTop>0:a.scrollTop+this.activeMaxc){b=c;a=i-h}else{if(bb&&b>0){this.activeMax=b-this.scrollerHeight*2-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0);this.ul.setHeight(this.activeMax);this.createScrollers();this.el.select(".x-menu-scroller").setDisplayed("")}else{this.ul.setHeight(d);this.el.select(".x-menu-scroller").setDisplayed("none")}this.ul.dom.scrollTop=0;return a},createScrollers:function(){if(!this.scroller){this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:" "}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:" "})};this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],false)}});this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],false)}})}},onLayout:function(){if(this.isVisible()){if(this.enableScrolling){this.constrainScroll(this.el.getTop())}if(this.floating){this.el.sync()}}},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){if(!this.isDestroyed){this.deepHide=a;Ext.menu.Menu.superclass.hide.call(this);delete this.deepHide}},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this);this.deactivateActive();if(this.el&&this.floating){this.el.hide()}var a=this.parentMenu;if(this.deepHide===true&&a){if(a.floating){a.hide(true)}else{a.deactivateActive()}}},lookupComponent:function(a){if(Ext.isString(a)){a=(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.TextItem(a);this.applyDefaults(a)}else{if(Ext.isObject(a)){a=this.getMenuItem(a)}else{if(a.tagName||a.el){a=new Ext.BoxComponent({el:a})}}}return a},applyDefaults:function(b){if(!Ext.isString(b)){b=Ext.menu.Menu.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(a){if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}}return b},getMenuItem:function(a){if(!a.isXType){if(!a.xtype&&Ext.isBoolean(a.checked)){return new Ext.menu.CheckItem(a)}return Ext.create(a,this.defaultType)}return a},addSeparator:function(){return this.add(new Ext.menu.Separator())},addElement:function(a){return this.add(new Ext.menu.BaseItem({el:a}))},addItem:function(a){return this.add(a)},addMenuItem:function(a){return this.add(this.getMenuItem(a))},addText:function(a){return this.add(new Ext.menu.TextItem(a))},onDestroy:function(){Ext.EventManager.removeResizeListener(this.hide,this);var a=this.parentMenu;if(a&&a.activeChild==this){delete a.activeChild}delete this.parentMenu;Ext.menu.Menu.superclass.onDestroy.call(this);Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable()}var b=this.scroller;if(b){Ext.destroy(b.topRepeater,b.bottomRepeater,b.top,b.bottom)}Ext.destroy(this.el,this.focusEl,this.ul)}});Ext.reg("menu",Ext.menu.Menu);Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function a(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)-1,-1)){c.tryActivate(c.items.length-1,-1)}}function b(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)+1,1)){c.tryActivate(0,1)}}return{constructor:function(c){Ext.menu.MenuNav.superclass.constructor.call(this,c.el);this.scope=this.menu=c},doRelay:function(g,d){var c=g.getKey();if(this.menu.activeItem&&this.menu.activeItem.isFormField&&c!=g.TAB){return false}if(!this.menu.activeItem&&g.isNavKeyPress()&&c!=g.SPACE&&c!=g.RETURN){this.menu.tryActivate(0,1);return false}return d.call(this.scope||this,g,this.menu)},tab:function(d,c){d.stopEvent();if(d.shiftKey){a(d,c)}else{b(d,c)}},up:a,down:b,right:function(d,c){if(c.activeItem){c.activeItem.expandMenu(true)}},left:function(d,c){c.hide();if(c.parentMenu&&c.parentMenu.activeItem){c.parentMenu.activeItem.activate()}},enter:function(d,c){if(c.activeItem){d.stopPropagation();c.activeItem.onClick(d);c.fireEvent("click",this,c.activeItem);return true}}}}());Ext.menu.MenuMgr=function(){var g,d,c={},a=false,l=new Date();function n(){g={};d=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(d.length>0){i()}})}function i(){if(d&&d.length>0){var o=d.clone();o.each(function(p){p.hide()});return true}return false}function e(o){d.remove(o);if(d.length<1){Ext.getDoc().un("mousedown",m);a=false}}function k(o){var p=d.last();l=new Date();d.add(o);if(!a){Ext.getDoc().on("mousedown",m);a=true}if(o.parentMenu){o.getEl().setZIndex(parseInt(o.parentMenu.getEl().getStyle("z-index"),10)+3);o.parentMenu.activeChild=o}else{if(p&&!p.isDestroyed&&p.isVisible()){o.getEl().setZIndex(parseInt(p.getEl().getStyle("z-index"),10)+3)}}}function b(o){if(o.activeChild){o.activeChild.hide()}if(o.autoHideTimer){clearTimeout(o.autoHideTimer);delete o.autoHideTimer}}function h(o){var p=o.parentMenu;if(!p&&!o.allowOtherMenus){i()}else{if(p&&p.activeChild){p.activeChild.hide()}}}function m(o){if(l.getElapsed()>50&&d.length>0&&!o.getTarget(".x-menu")){i()}}return{hideAll:function(){return i()},register:function(o){if(!g){n()}g[o.id]=o;o.on({beforehide:b,hide:e,beforeshow:h,show:k})},get:function(o){if(typeof o=="string"){if(!g){return null}return g[o]}else{if(o.events){return o}else{if(typeof o.length=="number"){return new Ext.menu.Menu({items:o})}else{return Ext.create(o,"menu")}}}},unregister:function(o){delete g[o.id];o.un("beforehide",b);o.un("hide",e);o.un("beforeshow",h);o.un("show",k)},registerCheckable:function(o){var p=o.group;if(p){if(!c[p]){c[p]=[]}c[p].push(o)}},unregisterCheckable:function(o){var p=o.group;if(p){c[p].remove(o)}},onCheckChange:function(q,r){if(q.group&&r){var t=c[q.group],p=0,o=t.length,s;for(;p',' target="{hrefTarget}"',"",">",'{altText}','{text}',"")}var c=this.getTemplateArgs();this.el=b?this.itemTpl.insertBefore(b,c,true):this.itemTpl.append(d,c,true);this.iconEl=this.el.child("img.x-menu-item-icon");this.textEl=this.el.child(".x-menu-item-text");if(!this.href){this.mon(this.el,"click",Ext.emptyFn,null,{preventDefault:true})}Ext.menu.Item.superclass.onRender.call(this,d,b)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||" ",altText:this.altText||""}},setText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text);this.parentMenu.layout.doAutoSize()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.iconEl.replaceClass(b,this.iconCls)}},beforeDestroy:function(){if(this.menu){delete this.menu.ownerCt;this.menu.destroy()}Ext.menu.Item.superclass.beforeDestroy.call(this)},handleClick:function(a){if(!this.href){a.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(a){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(a){this.expandMenu()}}return true},shouldDeactivate:function(a){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,a)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(a.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(a){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[a])}else{if(this.menu.isVisible()&&a){this.menu.tryActivate(0,1)}}}},deferExpand:function(a){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(a){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;if(this.menu.over){this.parentMenu.setActiveItem(this,false)}else{this.menu.hide()}}});Ext.reg("menuitem",Ext.menu.Item);Ext.menu.CheckItem=Ext.extend(Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",initComponent:function(){Ext.menu.CheckItem.superclass.initComponent.call(this);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)},onRender:function(a){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(b,a){var c=a===true;if(this.checked!=b&&(c||this.fireEvent("beforecheckchange",this,b)!==false)){Ext.menu.MenuMgr.onCheckChange(this,b);if(this.container){this.container[b?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=b;if(!c){this.fireEvent("checkchange",this,b)}}},handleClick:function(a){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});Ext.reg("menucheckitem",Ext.menu.CheckItem);Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,pickerId:null,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this);if(this.strict=(Ext.isIE7&&Ext.isStrict)){this.on("show",this.onShow,this,{single:true,delay:20})}Ext.apply(this,{plain:true,showSeparator:false,items:this.picker=new Ext.DatePicker(Ext.applyIf({internalRender:this.strict||!Ext.isIE,ctCls:"x-menu-date-item",id:this.pickerId},this.initialConfig))});this.picker.purgeListeners();Ext.menu.DateMenu.superclass.initComponent.call(this);this.relayEvents(this.picker,["select"]);this.on("show",this.picker.focus,this.picker);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}},onBeforeShow:function(){if(this.picker){this.picker.hideMonthPicker(true)}},onShow:function(){var a=this.picker.getEl();a.setWidth(a.getWidth())}});Ext.reg("datemenu",Ext.menu.DateMenu);Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,cls:"x-color-menu",paletteId:null,initComponent:function(){Ext.apply(this,{plain:true,showSeparator:false,items:this.palette=new Ext.ColorPalette(Ext.applyIf({id:this.paletteId},this.initialConfig))});this.palette.purgeListeners();Ext.menu.ColorMenu.superclass.initComponent.call(this);this.relayEvents(this.palette,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}}});Ext.reg("colormenu",Ext.menu.ColorMenu);Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,submitValue:true,isFormField:true,msgDisplay:"",hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:this.name||this.id||""},onRender:function(c,a){if(!this.el){var b=this.getAutoCreate();if(!b.name){b.name=this.name||this.id}if(this.inputType){b.type=this.inputType}this.autoEl=b}Ext.form.Field.superclass.onRender.call(this,c,a);if(this.submitValue===false){this.el.dom.removeAttribute("name")}var d=this.el.dom.type;if(d){if(d=="password"){d="text"}this.el.addClass("x-form-"+d)}if(this.readOnly){this.setReadOnly(true)}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls])},getItemCt:function(){return this.itemCt},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled||!this.rendered){return false}return String(this.getValue())!==String(this.originalValue)},setReadOnly:function(a){if(this.rendered){this.el.dom.readOnly=a}this.readOnly=a},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,a)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.mon(this.el,Ext.EventManager.getKeyEvent(),this.fireKey,this);this.mon(this.el,"focus",this.onFocus,this);this.mon(this.el,"blur",this.onBlur,this,this.inEditor?{buffer:10}:null)},preFocus:Ext.emptyFn,onFocus:function(){this.preFocus();if(this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&(this.validateOnBlur||this.validationEvent=="blur")){this.validate()}var a=this.getValue();if(String(a)!==String(this.startValue)){this.fireEvent("change",this,a,this.startValue)}this.fireEvent("blur",this);this.postBlur()},postBlur:Ext.emptyFn,isValid:function(a){if(this.disabled){return true}var c=this.preventMark;this.preventMark=a===true;var b=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=c;return b},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(a){return a},validateValue:function(b){var a=this.getErrors(b)[0];if(a==undefined){return true}else{this.markInvalid(a);return false}},getErrors:function(){return[]},getActiveError:function(){return this.activeError||""},markInvalid:function(c){if(this.rendered&&!this.preventMark){c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}}this.setActiveError(c)},clearInvalid:function(){if(this.rendered&&!this.preventMark){this.el.removeClass(this.invalidClass);var a=this.getMessageHandler();if(a){a.clear(this)}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML="";b.style.display="none"}}}}this.unsetActiveError()},setActiveError:function(b,a){this.activeError=b;if(a!==true){this.fireEvent("invalid",this,b)}},unsetActiveError:function(a){delete this.activeError;if(a!==true){this.fireEvent("valid",this)}},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget]},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true)},alignErrorEl:function(){this.errorEl.setWidth(this.getErrorCt().getWidth(true)-20)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},getRawValue:function(){var a=this.rendered?this.el.getValue():Ext.value(this.value,"");if(a===this.emptyText){a=""}return a},getValue:function(){if(!this.rendered){return this.value}var a=this.el.getValue();if(a===this.emptyText||a===undefined){a=""}return a},setRawValue:function(a){return this.rendered?(this.el.dom.value=(Ext.isEmpty(a)?"":a)):""},setValue:function(a){this.value=a;if(this.rendered){this.el.dom.value=(Ext.isEmpty(a)?"":a);this.validate()}return this},append:function(a){this.setValue([this.getValue(),a].join(""))}});Ext.form.MessageTargets={qtip:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.qtip=b;a.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(a){a.el.removeClass(a.invalidClass);a.el.dom.qtip=""}},title:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.title=b},clear:function(a){a.el.dom.title=""}},under:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorEl){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorEl=a.createChild({cls:"x-form-invalid-msg"});b.on("resize",b.alignErrorEl,b);b.on("destroy",function(){Ext.destroy(this.errorEl)},b)}b.alignErrorEl();b.errorEl.update(c);Ext.form.Field.msgFx[b.msgFx].show(b.errorEl,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorEl){Ext.form.Field.msgFx[a.msgFx].hide(a.errorEl,a)}else{a.el.dom.title=""}}},side:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorIcon){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorIcon=a.createChild({cls:"x-form-invalid-icon"});if(b.ownerCt){b.ownerCt.on("afterlayout",b.alignErrorIcon,b);b.ownerCt.on("expand",b.alignErrorIcon,b)}b.on("resize",b.alignErrorIcon,b);b.on("destroy",function(){Ext.destroy(this.errorIcon)},b)}b.alignErrorIcon();b.errorIcon.dom.qtip=c;b.errorIcon.dom.qclass="x-form-invalid-tip";b.errorIcon.show()},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorIcon){a.errorIcon.dom.qtip="";a.errorIcon.hide()}else{a.el.dom.title=""}}}};Ext.form.Field.msgFx={normal:{show:function(a,b){a.setDisplayed("block")},hide:function(a,b){a.setDisplayed(false).update("")}},slide:{show:function(a,b){a.slideIn("t",{stopFx:true})},hide:function(a,b){a.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(a,b){a.fixDisplay();a.alignTo(b.el,"tl-tr");a.slideIn("l",{stopFx:true})},hide:function(a,b){a.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field);Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.mon(this.el,"keyup",this.filterValidation,this)}else{if(this.validationEvent!==false&&this.validationEvent!="blur"){this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.mon(this.el,"mousedown",this.onMouseDown,this);if(this.emptyText){this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.mon(this.el,"keypress",this.filterKeys,this)}if(this.grow){this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50});this.mon(this.el,"click",this.autoSize,this)}if(this.enableKeyEvents){this.mon(this.el,{scope:this,keyup:this.onKeyUp,keydown:this.onKeyDown,keypress:this.onKeyPress})}},onMouseDown:function(a){if(!this.hasFocus){this.mon(this.el,"mouseup",Ext.emptyFn,this,{single:true,preventDefault:true})}},processValue:function(a){if(this.stripCharsRe){var b=a.replace(this.stripCharsRe,"");if(b!==a){this.setRawValue(b);return b}}return a},filterValidation:function(a){if(!a.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on"}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable=""}},onKeyUpBuffered:function(a){if(this.doAutoSize(a)){this.autoSize()}},doAutoSize:function(a){return !a.isNavKeyPress()},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){var a=this.el,b;if(this.emptyText){if(a.dom.value==this.emptyText){this.setRawValue("");b=true}a.removeClass(this.emptyClass)}if(this.selectOnFocus||b){a.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(b){if(b.ctrlKey){return}var a=b.getKey();if(Ext.isGecko&&(b.isNavKeyPress()||a==b.BACKSPACE||(a==b.DELETE&&b.button==-1))){return}var c=String.fromCharCode(b.getCharCode());if(!Ext.isGecko&&b.isSpecialKey()&&!c){return}if(!this.maskRe.test(c)){b.stopEvent()}},setValue:function(a){if(this.emptyText&&this.el&&!Ext.isEmpty(a)){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize();return this},getErrors:function(a){var d=Ext.form.TextField.superclass.getErrors.apply(this,arguments);a=Ext.isDefined(a)?a:this.processValue(this.getRawValue());if(Ext.isFunction(this.validator)){var c=this.validator(a);if(c!==true){d.push(c)}}if(a.length<1||a===this.emptyText){if(this.allowBlank){return d}else{d.push(this.blankText)}}if(!this.allowBlank&&(a.length<1||a===this.emptyText)){d.push(this.blankText)}if(a.lengththis.maxLength){d.push(String.format(this.maxLengthText,this.maxLength))}if(this.vtype){var b=Ext.form.VTypes;if(!b[this.vtype](a,this)){d.push(this.vtypeText||b[this.vtype+"Text"])}}if(this.regex&&!this.regex.test(a)){d.push(this.regexText)}return d},selectText:function(h,a){var c=this.getRawValue();var e=false;if(c.length>0){h=h===undefined?0:h;a=a===undefined?c.length:a;var g=this.el.dom;if(g.setSelectionRange){g.setSelectionRange(h,a)}else{if(g.createTextRange){var b=g.createTextRange();b.moveStart("character",h);b.moveEnd("character",a-c.length);b.select()}}e=Ext.isGecko||Ext.isOpera}else{e=true}if(e){this.focus()}},autoSize:function(){if(!this.grow||!this.rendered){return}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var c=this.el;var b=c.dom.value;var e=document.createElement("div");e.appendChild(document.createTextNode(b));b=e.innerHTML;Ext.removeNode(e);e=null;b+=" ";var a=Math.min(this.growMax,Math.max(this.metrics.getWidth(b)+10,this.growMin));this.el.setWidth(a);this.fireEvent("autosize",this,a)},onDestroy:function(){if(this.validationTask){this.validationTask.cancel();this.validationTask=null}Ext.form.TextField.superclass.onDestroy.call(this)}});Ext.reg("textfield",Ext.form.TextField);Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,editable:true,readOnly:false,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,actionMode:"wrap",defaultTriggerWidth:17,onResize:function(a,c){Ext.form.TriggerField.superclass.onResize.call(this,a,c);var b=this.getTriggerWidth();if(Ext.isNumber(a)){this.el.setWidth(a-b)}this.wrap.setWidth(this.el.getWidth()+b)},getTriggerWidth:function(){var a=this.trigger.getWidth();if(!this.hideTrigger&&!this.readOnly&&a===0){a=this.defaultTriggerWidth}return a},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},onRender:function(b,a){this.doc=Ext.isIE?Ext.getBody():Ext.getDoc();Ext.form.TriggerField.superclass.onRender.call(this,b,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-field-trigger-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.triggerClass});this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}this.resizeEl=this.positionEl=this.wrap},getWidth:function(){return(this.el.getWidth()+this.trigger.getWidth())},updateEditState:function(){if(this.rendered){if(this.readOnly){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this);this.trigger.setDisplayed(false)}else{if(!this.editable){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mon(this.el,"click",this.onTriggerClick,this)}else{this.el.dom.readOnly=false;this.el.removeClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this)}this.trigger.setDisplayed(!this.hideTrigger)}this.onResize(this.width||this.wrap.getWidth())}},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateEditState()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateEditState()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateEditState()}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);this.updateEditState()},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){Ext.destroy(this.trigger,this.wrap);if(this.mimicing){this.doc.un("mousedown",this.mimicBlur,this)}delete this.doc;Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass(this.wrapFocusClass);this.mimicing=true;this.doc.on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.on("specialkey",this.checkTab,this)}}},checkTab:function(a,b){if(b.getKey()==b.TAB){this.triggerBlur()}},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.wrap.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;this.doc.un("mousedown",this.mimicBlur,this);if(this.monitorTab&&this.el){this.un("specialkey",this.checkTab,this)}Ext.form.TriggerField.superclass.onBlur.call(this);if(this.wrap){this.wrap.removeClass(this.wrapFocusClass)}},beforeBlur:Ext.emptyFn,validateBlur:function(a){return true},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(a){return this.triggers[a]},afterRender:function(){Ext.form.TwinTriggerField.superclass.afterRender.call(this);var c=this.triggers,b=0,a=c.length;for(;b")}}d.innerHTML=a;b=Math.min(this.growMax,Math.max(d.offsetHeight,this.growMin));if(b!=this.lastHeight){this.lastHeight=b;this.el.setHeight(b);this.fireEvent("autosize",this,b)}}});Ext.reg("textarea",Ext.form.TextArea);Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",autoStripChars:false,initEvents:function(){var a=this.baseChars+"";if(this.allowDecimals){a+=this.decimalSeparator}if(this.allowNegative){a+="-"}a=Ext.escapeRe(a);this.maskRe=new RegExp("["+a+"]");if(this.autoStripChars){this.stripCharsRe=new RegExp("[^"+a+"]","gi")}Ext.form.NumberField.superclass.initEvents.call(this)},getErrors:function(b){var c=Ext.form.NumberField.superclass.getErrors.apply(this,arguments);b=Ext.isDefined(b)?b:this.processValue(this.getRawValue());if(b.length<1){return c}b=String(b).replace(this.decimalSeparator,".");if(isNaN(b)){c.push(String.format(this.nanText,b))}var a=this.parseValue(b);if(athis.maxValue){c.push(String.format(this.maxText,this.maxValue))}return c},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(a){a=this.fixPrecision(a);a=Ext.isNumber(a)?a:parseFloat(String(a).replace(this.decimalSeparator,"."));a=isNaN(a)?"":String(a).replace(".",this.decimalSeparator);return Ext.form.NumberField.superclass.setValue.call(this,a)},setMinValue:function(a){this.minValue=Ext.num(a,Number.NEGATIVE_INFINITY)},setMaxValue:function(a){this.maxValue=Ext.num(a,Number.MAX_VALUE)},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?"":a},fixPrecision:function(b){var a=isNaN(b);if(!this.allowDecimals||this.decimalPrecision==-1||a||!b){return a?"":b}return parseFloat(parseFloat(b).toFixed(this.decimalPrecision))},beforeBlur:function(){var a=this.parseValue(this.getRawValue());if(!Ext.isEmpty(a)){this.setValue(a)}}});Ext.reg("numberfield",Ext.form.NumberField);Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",showToday:true,startDay:0,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initTime:"12",initTimeFormat:"H",safeParse:function(b,c){if(/[gGhH]/.test(c.replace(/(\\.)/g,""))){return Date.parseDate(b,c)}else{var a=Date.parseDate(b+" "+this.initTime,c+" "+this.initTimeFormat);if(a){return a.clearTime()}}},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);this.addEvents("select");if(Ext.isString(this.minValue)){this.minValue=this.parseDate(this.minValue)}if(Ext.isString(this.maxValue)){this.maxValue=this.parseDate(this.maxValue)}this.disabledDatesRE=null;this.initDisabledDays()},initEvents:function(){Ext.form.DateField.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{down:function(a){this.onTriggerClick()},scope:this,forceKeyDown:true})},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){this.disabledDates=a;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE)}},setDisabledDays:function(a){this.disabledDays=a;if(this.menu){this.menu.picker.setDisabledDays(a)}},setMinValue:function(a){this.minValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMinDate(this.minValue)}},setMaxValue:function(a){this.maxValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMaxDate(this.maxValue)}},getErrors:function(e){var h=Ext.form.DateField.superclass.getErrors.apply(this,arguments);e=this.formatDate(e||this.processValue(this.getRawValue()));if(e.length<1){return h}var c=e;e=this.parseDate(e);if(!e){h.push(String.format(this.invalidText,c,this.format));return h}var g=e.getTime();if(this.minValue&&gthis.maxValue.clearTime().getTime()){h.push(String.format(this.maxText,this.formatDate(this.maxValue)))}if(this.disabledDays){var a=e.getDay();for(var b=0;b
{'+this.displayField+"}
"}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+a+"-item",emptyText:this.listEmptyText,deferEmptyText:false});this.mon(this.view,{containerclick:this.onViewClick,click:this.onViewClick,scope:this});this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.mon(this.resizer,"resize",function(g,d,e){this.maxHeight=e-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=d;this.innerList.setWidth(d-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},getListParent:function(){return document.body},getStore:function(){return this.store},bindStore:function(a,b){if(this.store&&!b){if(this.store!==a&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.collapse,this)}if(!a){this.store=null;if(this.view){this.view.bindStore(null)}if(this.pageTb){this.pageTb.bindStore(null)}}}if(a){if(!b){this.lastQuery=null;if(this.pageTb){this.pageTb.bindStore(a)}}this.store=Ext.StoreMgr.lookup(a);this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse});if(this.view){this.view.bindStore(a)}}},reset:function(){if(this.clearFilterOnReset&&this.mode=="local"){this.store.clearFilter()}Ext.form.ComboBox.superclass.reset.call(this)},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{up:function(a){this.inKeyMode=true;this.selectPrev()},down:function(a){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},enter:function(a){this.onViewClick()},esc:function(a){this.collapse()},tab:function(a){if(this.forceSelection===true){this.collapse()}else{this.onViewClick(false)}return true},scope:this,doRelay:function(c,b,a){if(a=="down"||this.scope.isExpanded()){var d=Ext.KeyNav.prototype.doRelay.apply(this,arguments);if(!Ext.isIE&&Ext.EventManager.useKeydown){this.scope.fireKey(c)}return d}return true},forceKeyDown:true,defaultEventAction:"stopEvent"});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(!this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this)}},onDestroy:function(){if(this.dqTask){this.dqTask.cancel();this.dqTask=null}this.bindStore(null);Ext.destroy(this.resizer,this.view,this.pageTb,this.list);Ext.destroyMembers(this,"hiddenField");Ext.form.ComboBox.superclass.onDestroy.call(this)},fireKey:function(a){if(!this.isExpanded()){Ext.form.ComboBox.superclass.fireKey.call(this,a)}},onResize:function(a,b){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(!isNaN(a)&&this.isVisible()&&this.list){this.doResize(a)}else{this.bufferSize=a}},doResize:function(a){if(!Ext.isDefined(this.listWidth)){var b=Math.max(a,this.minListWidth);this.list.setWidth(b);this.innerList.setWidth(b-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},onBeforeLoad:function(){if(!this.hasFocus){return}this.innerList.update(this.loadingText?'
'+this.loadingText+"
":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return}if(this.store.getCount()>0||this.listEmptyText){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(this.autoSelect!==false&&!this.selectByValue(this.value,true)){this.select(0,true)}}else{if(this.autoSelect!==false){this.selectNext()}if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.collapse()}},onTypeAhead:function(){if(this.store.getCount()>0){var b=this.store.getAt(0);var c=b.data[this.displayField];var a=c.length;var d=this.getRawValue().length;if(d!=a){this.setRawValue(c);this.selectText(d,c.length)}}},assertValue:function(){var b=this.getRawValue(),a;if(this.valueField&&Ext.isDefined(this.value)){a=this.findRecord(this.valueField,this.value)}if(!a||a.get(this.displayField)!=b){a=this.findRecord(this.displayField,b)}if(!a&&this.forceSelection){if(b.length>0&&b!=this.emptyText){this.el.dom.value=Ext.value(this.lastSelectionText,"");this.applyEmptyText()}else{this.clearValue()}}else{if(a&&this.valueField){if(this.value==b){return}b=a.get(this.valueField||this.displayField)}this.setValue(b)}},onSelect:function(a,b){if(this.fireEvent("beforeselect",this,a,b)!==false){this.setValue(a.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,a,b)}},getName:function(){var a=this.hiddenField;return a&&a.name?a.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this)},getValue:function(){if(this.valueField){return Ext.isDefined(this.value)?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(a){var c=a;if(this.valueField){var b=this.findRecord(this.valueField,a);if(b){c=b.data[this.displayField]}else{if(Ext.isDefined(this.valueNotFoundText)){c=this.valueNotFoundText}}}this.lastSelectionText=c;if(this.hiddenField){this.hiddenField.value=Ext.value(a,"")}Ext.form.ComboBox.superclass.setValue.call(this,c);this.value=a;return this},findRecord:function(c,b){var a;if(this.store.getCount()>0){this.store.each(function(d){if(d.data[c]==b){a=d;return false}})}return a},onViewMove:function(b,a){this.inKeyMode=false},onViewOver:function(d,b){if(this.inKeyMode){return}var c=this.view.findItemFromChild(b);if(c){var a=this.view.indexOf(c);this.select(a,false)}},onViewClick:function(b){var a=this.view.getSelectedIndexes()[0],c=this.store,d=c.getAt(a);if(d){this.onSelect(d,a)}else{this.collapse()}if(b!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var b=this.innerList.dom,e=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight,c=Math.max(b.clientHeight,b.offsetHeight,b.scrollHeight),a=this.getPosition()[1]-Ext.getBody().getScroll().top,g=Ext.lib.Dom.getViewHeight()-a-this.getSize().height,d=Math.max(a,g,this.minHeight||0)-this.list.shadowOffset-e-5;c=Math.min(c,d,this.maxHeight);this.innerList.setHeight(c);this.list.beginUpdate();this.list.setHeight(c+e);this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.endUpdate()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(a,c){if(!Ext.isEmpty(a,true)){var b=this.findRecord(this.valueField||this.displayField,a);if(b){this.select(this.store.indexOf(b),c);return true}}return false},select:function(a,c){this.selectedIndex=a;this.view.select(a);if(c!==false){var b=this.view.getNode(a);if(b){this.innerList.scrollChildIntoView(b,false)}}},selectNext:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!==0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(b){var a=b.getKey();if(this.editable!==false&&this.readOnly!==true&&(a==b.BACKSPACE||!b.isSpecialKey())){this.lastKey=a;this.dqTask.delay(this.queryDelay)}Ext.form.ComboBox.superclass.onKeyUp.call(this,b)},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},beforeBlur:function(){this.assertValue()},postBlur:function(){Ext.form.ComboBox.superclass.postBlur.call(this);this.collapse();this.inKeyMode=false},doQuery:function(c,b){c=Ext.isEmpty(c)?"":c;var a={query:c,forceAll:b,combo:this,cancel:false};if(this.fireEvent("beforequery",a)===false||a.cancel){return false}c=a.query;b=a.forceAll;if(b===true||(c.length>=this.minChars)){if(this.lastQuery!==c){this.lastQuery=c;if(this.mode=="local"){this.selectedIndex=-1;if(b){this.store.clearFilter()}else{this.store.filter(this.displayField,c)}this.onLoad()}else{this.store.baseParams[this.queryParam]=c;this.store.load({params:this.getParams(c)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(a){var b={},c=this.store.paramNames;if(this.pageSize){b[c.start]=0;b[c.limit]=this.pageSize}return b},collapse:function(){if(!this.isExpanded()){return}this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(a){if(!this.isDestroyed&&!a.within(this.wrap)&&!a.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return}if(this.title||this.pageSize){this.assetHeight=0;if(this.title){this.assetHeight+=this.header.getHeight()}if(this.pageSize){this.assetHeight+=this.footer.getHeight()}}if(this.bufferSize){this.doResize(this.bufferSize);delete this.bufferSize}this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.setZIndex(this.getZIndex());this.list.show();if(Ext.isGecko2){this.innerList.setOverflow("auto")}this.mon(Ext.getDoc(),{scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf});this.fireEvent("expand",this)},onTriggerClick:function(){if(this.readOnly||this.disabled){return}if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox);Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,boxLabel:" ",defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.mon(this.el,{scope:this,click:this.onClick,change:this.onClick})},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(b,a){Ext.form.Checkbox.superclass.onRender.call(this,b,a);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}if(Ext.isIE&&!Ext.isStrict){this.wrap.repaint()}this.resizeEl=this.positionEl=this.wrap},onDestroy:function(){Ext.destroy(this.wrap);Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:function(){this.originalValue=this.getValue()},getValue:function(){if(this.rendered){return this.el.dom.checked}return this.checked},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(a){var c=this.checked,b=this.inputValue;this.checked=(a===true||a==="true"||a=="1"||(b?a==b:String(a).toLowerCase()=="on"));if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}if(c!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked)}}return this}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change");this.on("change",this.validate,this);Ext.form.CheckboxGroup.superclass.initComponent.call(this)},onRender:function(k,g){if(!this.el){var q={autoEl:{id:this.id},cls:this.groupCls,layout:"column",renderTo:k,bufferResize:false};var a={xtype:"container",defaultType:this.defaultType,layout:"form",defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(q,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var e=0,n=this.items.length;e0&&e%s==0){p++}if(this.items[e].fieldLabel){this.items[e].hideLabel=false}o[p].items.push(this.items[e])}}else{for(var e=0,n=this.items.length;e-1){b.setValue(true)}})},getBox:function(b){var a=null;this.eachItem(function(c){if(b==c||c.dataIndex==b||c.id==b||c.getName()==b){a=c;return false}});return a},getValue:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});return a},eachItem:function(b,a){if(this.items&&this.items.each){this.items.each(b,a||this)}},getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn});Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);Ext.form.CompositeField=Ext.extend(Ext.form.Field,{defaultMargins:"0 5 0 0",skipLastItemMargin:true,isComposite:true,combineErrors:true,labelConnector:", ",initComponent:function(){var g=[],b=this.items,e;for(var d=0,c=b.length;d")},sortErrors:function(){var a=this.items;this.fieldErrors.sort("ASC",function(g,d){var c=function(b){return function(i){return i.getName()==b}};var h=a.findIndexBy(c(g.field)),e=a.findIndexBy(c(d.field));return h1){var a=this.getBox(c);if(a){a.setValue(b);if(a.checked){this.eachItem(function(d){if(d!==a){d.setValue(false)}})}}}else{this.setValueForItem(c)}},setValueForItem:function(a){a=String(a).split(",")[0];this.eachItem(function(b){b.setValue(a==b.inputValue)})},fireChecked:function(){if(!this.checkTask){this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this)}this.checkTask.delay(10)},bufferChecked:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});this.fireEvent("change",this,a)},onDestroy:function(){if(this.checkTask){this.checkTask.cancel();this.checkTask=null}Ext.form.RadioGroup.superclass.onDestroy.call(this)}});Ext.reg("radiogroup",Ext.form.RadioGroup);Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",shouldLayout:false,onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=Ext.extend(Ext.util.Observable,{constructor:function(b,a){Ext.apply(this,a);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}this.items=new Ext.util.MixedCollection(false,function(c){return c.getItemId()});this.addEvents("beforeaction","actionfailed","actioncomplete");if(b){this.initEl(b)}Ext.form.BasicForm.superclass.constructor.call(this)},timeout:30,paramOrder:undefined,paramsAsHash:false,waitTitle:"Please Wait...",activeAction:null,trackResetOnLoad:false,initEl:function(a){this.el=Ext.get(a);this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this)}this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(a){a.stopEvent()},destroy:function(a){if(a!==true){this.items.each(function(b){Ext.destroy(b)});Ext.destroy(this.el)}this.items.clear();this.purgeListeners()},isValid:function(){var a=true;this.items.each(function(b){if(!b.validate()){a=false}});return a},isDirty:function(){var a=false;this.items.each(function(b){if(b.isDirty()){a=true;return false}});return a},doAction:function(b,a){if(Ext.isString(b)){b=new Ext.form.Action.ACTION_TYPES[b](this,a)}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);b.run.defer(100,b)}return this},submit:function(b){b=b||{};if(this.standardSubmit){var a=b.clientValidation===false||this.isValid();if(a){var c=this.el.dom;if(this.url&&Ext.isEmpty(c.action)){c.action=this.url}c.submit()}return a}var d=String.format("{0}submit",this.api?"direct":"");this.doAction(d,b);return this},load:function(a){var b=String.format("{0}load",this.api?"direct":"");this.doAction(b,a);return this},updateRecord:function(b){b.beginEdit();var a=b.fields,d,c;a.each(function(e){d=this.findField(e.name);if(d){c=d.getValue();if(typeof c!=undefined&&c.getGroupValue){c=c.getGroupValue()}else{if(d.eachItem){c=[];d.eachItem(function(g){c.push(g.getValue())})}}b.set(e.name,c)}},this);b.endEdit();return this},loadRecord:function(a){this.setValues(a.data);return this},beforeAction:function(a){this.items.each(function(c){if(c.isFormField&&c.syncValue){c.syncValue()}});var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.mask(b.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(b.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(b.waitMsg,b.waitTitle||this.waitTitle)}}}},afterAction:function(a,c){this.activeAction=null;var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(c){if(b.reset){this.reset()}Ext.callback(b.success,b.scope,[this,a]);this.fireEvent("actioncomplete",this,a)}else{Ext.callback(b.failure,b.scope,[this,a]);this.fireEvent("actionfailed",this,a)}},findField:function(c){var b=this.items.get(c);if(!Ext.isObject(b)){var a=function(d){if(d.isFormField){if(d.dataIndex==c||d.id==c||d.getName()==c){b=d;return false}else{if(d.isComposite){return d.items.each(a)}else{if(d instanceof Ext.form.CheckboxGroup&&d.rendered){return d.eachItem(a)}}}}};this.items.each(a)}return b||null},markInvalid:function(h){if(Ext.isArray(h)){for(var c=0,a=h.length;c':">"),c,"")}return d.join("")},createToolbar:function(e){var c=[];var a=Ext.QuickTips&&Ext.QuickTips.isEnabled();function d(k,h,i){return{itemId:k,cls:"x-btn-icon",iconCls:"x-edit-"+k,enableToggle:h!==false,scope:e,handler:i||e.relayBtnCmd,clickEvent:"mousedown",tooltip:a?e.buttonTips[k]||undefined:undefined,overflowText:e.buttonTips[k].title||undefined,tabIndex:-1}}if(this.enableFont&&!Ext.isSafari2){var g=new Ext.Toolbar.Item({autoEl:{tag:"select",cls:"x-font-select",html:this.createFontOptions()}});c.push(g,"-")}if(this.enableFormat){c.push(d("bold"),d("italic"),d("underline"))}if(this.enableFontSize){c.push("-",d("increasefontsize",false,this.adjustFont),d("decreasefontsize",false,this.adjustFont))}if(this.enableColors){c.push("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.forecolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,listeners:{scope:this,select:function(i,h){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.backcolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,listeners:{scope:this,select:function(i,h){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",h);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}}},clickEvent:"mousedown"})})}if(this.enableAlignments){c.push("-",d("justifyleft"),d("justifycenter"),d("justifyright"))}if(!Ext.isSafari2){if(this.enableLinks){c.push("-",d("createlink",false,this.createLink))}if(this.enableLists){c.push("-",d("insertorderedlist"),d("insertunorderedlist"))}if(this.enableSourceEdit){c.push("-",d("sourceedit",true,function(h){this.toggleSourceEdit(!this.sourceEditMode)}))}}var b=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild,items:c});if(g){this.fontSelect=g.el;this.mon(this.fontSelect,"change",function(){var h=this.fontSelect.dom.value;this.relayCmd("fontname",h);this.deferFocus()},this)}this.mon(b.el,"click",function(h){h.preventDefault()});this.tb=b;this.tb.doLayout()},onDisable:function(){this.wrap.mask();Ext.form.HtmlEditor.superclass.onDisable.call(this)},onEnable:function(){this.wrap.unmask();Ext.form.HtmlEditor.superclass.onEnable.call(this)},setReadOnly:function(b){Ext.form.HtmlEditor.superclass.setReadOnly.call(this,b);if(this.initialized){if(Ext.isIE){this.getEditorBody().contentEditable=!b}else{this.setDesignMode(!b)}var a=this.getEditorBody();if(a){a.style.cursor=this.readOnly?"default":"text"}this.disableItems(b)}},getDocMarkup:function(){var a=Ext.fly(this.iframe).getHeight()-this.iframePad*2;return String.format('',this.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document)},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(b,a){Ext.form.HtmlEditor.superclass.onRender.call(this,b,a);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.disableItems(true);this.tb.doLayout();this.createIFrame();if(!this.width){var c=this.el.getSize();this.setSize(c.width,this.height||c.height)}this.resizeEl=this.positionEl=this.wrap},createIFrame:function(){var a=document.createElement("iframe");a.name=Ext.id();a.frameBorder="0";a.style.overflow="auto";a.src=Ext.SSL_SECURE_URL;this.wrap.dom.appendChild(a);this.iframe=a;this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);var b=this.getDoc();this.win=this.getWin();b.open();b.write(this.getDocMarkup());b.close();var a={run:function(){var c=this.getDoc();if(c.body||c.readyState=="complete"){Ext.TaskMgr.stop(a);this.setDesignMode(true);this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(a)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var a=this.getDoc();if(!a){return}if(!a.editorInitialized||this.getDesignMode()!="on"){this.initFrame()}}},setDesignMode:function(b){var a=this.getDoc();if(a){if(this.readOnly){b=false}a.designMode=(/on|true/i).test(String(b).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();if(!a){return""}return String(a.designMode).toLowerCase()},disableItems:function(a){if(this.fontSelect){this.fontSelect.dom.disabled=a}this.tb.items.each(function(b){if(b.getItemId()!="sourceedit"){b.setDisabled(a)}})},onResize:function(b,c){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(Ext.isNumber(b)){var e=b-this.wrap.getFrameWidth("lr");this.el.setWidth(e);this.tb.setWidth(e);this.iframe.style.width=Math.max(e,0)+"px"}if(Ext.isNumber(c)){var a=c-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(a);this.iframe.style.height=Math.max(a,0)+"px";var d=this.getEditorBody();if(d){d.style.height=Math.max((a-(this.iframePad*2)),0)+"px"}}}},toggleSourceEdit:function(b){var d,a;if(b===undefined){b=!this.sourceEditMode}this.sourceEditMode=b===true;var c=this.tb.getComponent("sourceedit");if(c.pressed!==this.sourceEditMode){c.toggle(this.sourceEditMode);if(!c.xtbHidden){return}}if(this.sourceEditMode){this.previousSize=this.getSize();d=Ext.get(this.iframe).getHeight();this.disableItems(true);this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus();this.el.dom.style.height=d+"px"}else{a=parseInt(this.el.dom.style.height,10);if(this.initialized){this.disableItems(this.readOnly)}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus();this.setSize(this.previousSize);delete this.previousSize;this.iframe.style.height=a+"px"}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!="http://"){this.relayCmd("createlink",a)}},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(a){Ext.form.HtmlEditor.superclass.setValue.call(this,a);this.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)==this.defaultValue.replace(/\D/g,"")){a=a.substring(1)}return a},syncValue:function(){if(this.initialized){var d=this.getEditorBody();var c=d.innerHTML;if(Ext.isWebKit){var b=d.getAttribute("style");var a=b.match(/text-align:(.*?);/i);if(a&&a[1]){c='
'+c+"
"}}c=this.cleanHtml(c);if(this.fireEvent("beforesync",this,c)!==false){this.el.dom.value=c;this.fireEvent("sync",this,c)}}},getValue:function(){this[this.sourceEditMode?"pushValue":"syncValue"]();return Ext.form.HtmlEditor.superclass.getValue.call(this)},pushValue:function(){if(this.initialized){var a=this.el.dom.value;if(!this.activated&&a.length<1){a=this.defaultValue}if(this.fireEvent("beforepush",this,a)!==false){this.getEditorBody().innerHTML=a;if(Ext.isGecko){this.setDesignMode(false);this.setDesignMode(true)}this.fireEvent("push",this,a)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){try{var c=this.getEditorBody(),a=this.el.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),g,b;a["background-attachment"]="fixed";c.bgProperties="fixed";Ext.DomHelper.applyStyles(c,a);g=this.getDoc();if(g){try{Ext.EventManager.removeAll(g)}catch(d){}}b=this.onEditorEvent.createDelegate(this);Ext.EventManager.on(g,{mousedown:b,dblclick:b,click:b,keyup:b,buffer:100});if(Ext.isGecko){Ext.EventManager.on(g,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isWebKit||Ext.isOpera){Ext.EventManager.on(g,"keydown",this.fixKeys,this)}g.editorInitialized=true;this.initialized=true;this.pushValue();this.setReadOnly(this.readOnly);this.fireEvent("initialize",this)}catch(d){}},beforeDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask)}if(this.rendered){Ext.destroy(this.tb);var b=this.getDoc();if(b){try{Ext.EventManager.removeAll(b);for(var c in b){delete b[c]}}catch(a){}}if(this.wrap){this.wrap.dom.innerHTML="";this.wrap.remove()}}Ext.form.HtmlEditor.superclass.beforeDestroy.call(this)},onFirstFocus:function(){this.activated=true;this.disableItems(this.readOnly);if(Ext.isGecko){this.win.focus();var a=this.win.getSelection();if(!a.focusNode||a.focusNode.nodeType!=3){var b=a.getRangeAt(0);b.selectNodeContents(this.getEditorBody());b.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(c){}}this.fireEvent("activate",this)},adjustFont:function(b){var d=b.getItemId()=="increasefontsize"?1:-1,c=this.getDoc(),a=parseInt(c.queryCommandValue("FontSize")||2,10);if((Ext.isSafari&&!Ext.isSafari2)||Ext.isChrome||Ext.isAir){if(a<=10){a=1+d}else{if(a<=13){a=2+d}else{if(a<=16){a=3+d}else{if(a<=18){a=4+d}else{if(a<=24){a=5+d}else{a=6+d}}}}}a=a.constrain(1,6)}else{if(Ext.isSafari){d*=2}a=Math.max(1,a+d)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",a)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){if(this.readOnly){return}if(!this.activated){this.onFirstFocus();return}var b=this.tb.items.map,c=this.getDoc();if(this.enableFont&&!Ext.isSafari2){var a=(c.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(a!=this.fontSelect.dom.value){this.fontSelect.dom.value=a}}if(this.enableFormat){b.bold.toggle(c.queryCommandState("bold"));b.italic.toggle(c.queryCommandState("italic"));b.underline.toggle(c.queryCommandState("underline"))}if(this.enableAlignments){b.justifyleft.toggle(c.queryCommandState("justifyleft"));b.justifycenter.toggle(c.queryCommandState("justifycenter"));b.justifyright.toggle(c.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){b.insertorderedlist.toggle(c.queryCommandState("insertorderedlist"));b.insertunorderedlist.toggle(c.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){(function(){this.focus();this.execCmd(b,a);this.updateToolbar()}).defer(10,this)},execCmd:function(b,a){var c=this.getDoc();c.execCommand(b,false,a===undefined?null:a);this.syncValue()},applyCommand:function(b){if(b.ctrlKey){var d=b.getCharCode(),a;if(d>0){d=String.fromCharCode(d);switch(d){case"b":a="bold";break;case"i":a="italic";break;case"u":a="underline";break}if(a){this.win.focus();this.execCmd(a);this.deferFocus();b.preventDefault()}}}},insertAtCursor:function(c){if(!this.activated){return}if(Ext.isIE){this.win.focus();var b=this.getDoc(),a=b.selection.createRange();if(a){a.pasteHTML(c);this.syncValue();this.deferFocus()}}else{this.win.focus();this.execCmd("InsertHTML",c);this.deferFocus()}},fixKeys:function(){if(Ext.isIE){return function(g){var a=g.getKey(),d=this.getDoc(),b;if(a==g.TAB){g.stopEvent();b=d.selection.createRange();if(b){b.collapse(true);b.pasteHTML("    ");this.deferFocus()}}else{if(a==g.ENTER){b=d.selection.createRange();if(b){var c=b.parentElement();if(!c||c.tagName.toLowerCase()!="li"){g.stopEvent();b.pasteHTML("
");b.collapse(false);b.select()}}}}}}else{if(Ext.isOpera){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.win.focus();this.execCmd("InsertHTML","    ");this.deferFocus()}}}else{if(Ext.isWebKit){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}else{if(a==b.ENTER){b.stopEvent();this.execCmd("InsertHtml","

");this.deferFocus()}}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor);Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:undefined,maxValue:undefined,minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initDateFormat:"j/n/Y",initComponent:function(){if(Ext.isDefined(this.minValue)){this.setMinValue(this.minValue,true)}if(Ext.isDefined(this.maxValue)){this.setMaxValue(this.maxValue,true)}if(!this.store){this.generateStore(true)}Ext.form.TimeField.superclass.initComponent.call(this)},setMinValue:function(b,a){this.setLimit(b,true,a);return this},setMaxValue:function(b,a){this.setLimit(b,false,a);return this},generateStore:function(b){var c=this.minValue||new Date(this.initDate).clearTime(),a=this.maxValue||new Date(this.initDate).clearTime().add("mi",(24*60)-1),d=[];while(c<=a){d.push(c.dateFormat(this.format));c=c.add("mi",this.increment)}this.bindStore(d,b)},setLimit:function(b,g,a){var e;if(Ext.isString(b)){e=this.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){var c=new Date(this.initDate).clearTime();c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());this[g?"minValue":"maxValue"]=c;if(!a){this.generateStore()}}},getValue:function(){var a=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(a))||""},setValue:function(a){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},validateValue:Ext.form.DateField.prototype.validateValue,formatDate:Ext.form.DateField.prototype.formatDate,parseDate:function(h){if(!h||Ext.isDate(h)){return h}var k=this.initDate+" ",g=this.initDateFormat+" ",b=Date.parseDate(k+h,g+this.format),c=this.altFormats;if(!b&&c){if(!this.altFormatsArray){this.altFormatsArray=c.split("|")}for(var e=0,d=this.altFormatsArray,a=d.length;e=0){if(!d){c=g-1}d=false;while(c>=0){if(e.call(k||this,l,c,i)===true){return[l,c]}c--}l--}}else{if(c>=g){l++;d=false}while(l','
','
','
','
{header}
',"
",'
',"
",'
','
{body}
','',"
","
",'
 
','
 
',""),headerTpl:new Ext.Template('',"",'{cells}',"","
"),bodyTpl:new Ext.Template("{rows}"),cellTpl:new Ext.Template('','
{value}
',""),initTemplates:function(){var c=this.templates||{},d,b,g=new Ext.Template('','
',this.grid.enableHdMenu?'':"","{value}",'',"
",""),a=['','','
{body}
',"",""].join(""),e=['',"","{cells}",this.enableRowBody?a:"","","
"].join("");Ext.applyIf(c,{hcell:g,cell:this.cellTpl,body:this.bodyTpl,header:this.headerTpl,master:this.masterTpl,row:new Ext.Template('
'+e+"
"),rowInner:new Ext.Template(e)});for(b in c){d=c[b];if(d&&Ext.isFunction(d.compile)&&!d.compiled){d.disableFormats=true;d.compile()}}this.templates=c;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(a){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=a;return this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var b=Ext.Element,d=Ext.get(this.grid.getGridEl().dom.firstChild),e=new b(d.child("div.x-grid3-viewport")),c=new b(e.child("div.x-grid3-header")),a=new b(e.child("div.x-grid3-scroller"));if(this.grid.hideHeaders){c.setDisplayed(false)}if(this.forceFit){a.setStyle("overflow-x","hidden")}Ext.apply(this,{el:d,mainWrap:e,scroller:a,mainHd:c,innerHd:c.child("div.x-grid3-header-inner").dom,mainBody:new b(b.fly(a).child("div.x-grid3-body")),focusEl:new b(b.fly(a).child("a")),resizeMarker:new b(d.child("div.x-grid3-resize-marker")),resizeProxy:new b(d.child("div.x-grid3-resize-proxy"))});this.focusEl.swallowEvent("click",true)},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(a){if(!a){return false}return this.fly(a).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(d,c){var b=this.findCell(d),a;if(b){a=this.fly(b).hasClass(c);if(!c||a){return this.getCellIndex(b)}}return false},getCellIndex:function(b){if(b){var a=b.className.match(this.colRe);if(a&&a[1]){return this.cm.getIndexById(a[1])}}return false},findHeaderCell:function(b){var a=this.findCell(b);return a&&this.fly(a).hasClass(this.hdCls)?a:null},findHeaderIndex:function(a){return this.findCellIndex(a,this.hdCls)},findRow:function(a){if(!a){return false}return this.fly(a).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(a){var b=this.findRow(a);return b?b.rowIndex:false},findRowBody:function(a){if(!a){return false}return this.fly(a).findParent(this.rowBodySelector,this.rowBodySelectorDepth)},getRow:function(a){return this.getRows()[a]},getCell:function(b,a){return Ext.fly(this.getRow(b)).query(this.cellSelector)[a]},getHeaderCell:function(a){return this.mainHd.dom.getElementsByTagName("td")[a]},addRowClass:function(b,a){var c=this.getRow(b);if(c){this.fly(c).addClass(a)}},removeRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).removeClass(a)}},removeRow:function(a){Ext.removeNode(this.getRow(a));this.syncFocusEl(a)},removeRows:function(c,a){var b=this.mainBody.dom,d;for(d=c;d<=a;d++){Ext.removeNode(b.childNodes[c])}this.syncFocusEl(c)},getScrollState:function(){var a=this.scroller.dom;return{left:a.scrollLeft,top:a.scrollTop}},restoreScroll:function(a){var b=this.scroller.dom;b.scrollLeft=a.left;b.scrollTop=a.top},scrollToTop:function(){var a=this.scroller.dom;a.scrollTop=0;a.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var a=this.scroller.dom;this.grid.fireEvent("bodyscroll",a.scrollLeft,a.scrollTop)},syncHeaderScroll:function(){var a=this.innerHd,b=this.scroller.dom.scrollLeft;a.scrollLeft=b;a.scrollLeft=b},updateSortIcon:function(d,c){var a=this.sortClasses,b=a[c=="DESC"?1:0],e=this.mainHd.select("td").removeClass(a);e.item(d).addClass(b)},updateAllColumnWidths:function(){var e=this.getTotalWidth(),k=this.cm.getColumnCount(),m=this.getRows(),g=m.length,b=[],l,a,h,d,c;for(d=0;d=this.ds.getCount()){return null}d=(d!==undefined?d:0);var c=this.getRow(h),b=this.cm,e=b.getColumnCount(),a;if(!(g===false&&d===0)){while(dn){o.scrollTop=r-a}}if(e!==false){var m=parseInt(h.offsetLeft,10),k=m+h.offsetWidth,i=parseInt(o.scrollLeft,10),b=i+o.clientWidth;if(mb){o.scrollLeft=k-o.clientWidth}}}return this.getResolvedXY(s)},insertRows:function(a,i,e,h){var d=a.getCount()-1;if(!h&&i===0&&e>=d){this.fireEvent("beforerowsinserted",this,i,e);this.refresh();this.fireEvent("rowsinserted",this,i,e)}else{if(!h){this.fireEvent("beforerowsinserted",this,i,e)}var b=this.renderRows(i,e),g=this.getRow(i);if(g){if(i===0){Ext.fly(this.getRow(0)).removeClass(this.firstRowCls)}Ext.DomHelper.insertHtml("beforeBegin",g,b)}else{var c=this.getRow(d-1);if(c){Ext.fly(c).removeClass(this.lastRowCls)}Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,b)}if(!h){this.processRows(i);this.fireEvent("rowsinserted",this,i,e)}else{if(i===0||i>=d){Ext.fly(this.getRow(i)).addClass(i===0?this.firstRowCls:this.lastRowCls)}}}this.syncFocusEl(i)},deleteRows:function(a,c,b){if(a.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,c,b);this.removeRows(c,b);this.processRows(c);this.fireEvent("rowsdeleted",this,c,b)}},getColumnStyle:function(b,d){var a=this.cm,g=a.config,c=d?"":g[b].css||"",e=g[b].align;c+=String.format("width: {0};",this.getColumnWidth(b));if(a.isHidden(b)){c+="display: none; "}if(e){c+=String.format("text-align: {0};",e)}return c},getColumnWidth:function(b){var c=this.cm.getColumnWidth(b),a=this.borderWidth;if(Ext.isNumber(c)){if(Ext.isBorderBox||(Ext.isWebKit&&!Ext.isSafari2)){return c+"px"}else{return Math.max(c-a,0)+"px"}}else{return c}},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(g,k,h){var a=this.grid,m=this.cm,t=m.getTotalWidth(false),r=this.getGridInnerWidth(),s=r-t,c=[],p=0,o=0,v,d,q;if(r<20||s===0){return false}var e=m.getColumnCount(true),n=m.getColumnCount(false),b=e-(Ext.isNumber(h)?1:0);if(b===0){b=1;h=undefined}for(q=0;qr){var u=(b==e)?p:h,l=Math.max(1,m.getColumnWidth(u)-(t-r));m.setColumnWidth(u,l,true)}if(g!==true){this.updateAllColumnWidths()}return true},autoExpand:function(l){var a=this.grid,i=this.cm,e=this.getGridInnerWidth(),c=i.getTotalWidth(false),g=a.autoExpandColumn;if(!this.userResized&&g){if(e!=c){var k=i.getIndexById(g),b=i.getColumnWidth(k),h=e-c+b,d=Math.min(Math.max(h,a.autoExpandMin),a.autoExpandMax);if(b!=d){i.setColumnWidth(k,d,true);if(l!==true){this.updateColumnWidth(k,d)}}}}},getGridInnerWidth:function(){return this.grid.getGridEl().getWidth(true)-this.getScrollOffset()},getColumnData:function(){var e=[],c=this.cm,g=c.getColumnCount(),a=this.ds.fields,d,b;for(d=0;d'+this.emptyText+"")}},updateHeaderSortState:function(){var b=this.ds.getSortState();if(!b){return}if(!this.sortState||(this.sortState.field!=b.field||this.sortState.direction!=b.direction)){this.grid.fireEvent("sortchange",this.grid,b)}this.sortState=b;var c=this.cm.findColumnIndex(b.field);if(c!=-1){var a=b.direction;this.updateSortIcon(c,a)}},clearHeaderSortState:function(){if(!this.sortState){return}this.grid.fireEvent("sortchange",this.grid,null);this.mainHd.select("td").removeClass(this.sortClasses);delete this.sortState},destroy:function(){var k=this,a=k.grid,d=a.getGridEl(),i=k.dragZone,g=k.splitZone,h=k.columnDrag,e=k.columnDrop,l=k.scrollToTopTask,c,b;if(l&&l.cancel){l.cancel()}Ext.destroyMembers(k,"colMenu","hmenu");k.initData(null,null);k.purgeListeners();Ext.fly(k.innerHd).un("click",k.handleHdDown,k);if(a.enableColumnMove){c=h.dragData;b=h.proxy;Ext.destroy(h.el,b.ghost,b.el,e.el,e.proxyTop,e.proxyBottom,c.ddel,c.header);if(b.anim){Ext.destroy(b.anim)}delete b.ghost;delete c.ddel;delete c.header;h.destroy();delete Ext.dd.DDM.locationCache[h.id];delete h._domRef;delete e.proxyTop;delete e.proxyBottom;e.destroy();delete Ext.dd.DDM.locationCache["gridHeader"+d.id];delete e._domRef;delete Ext.dd.DDM.ids[e.ddGroup]}if(g){g.destroy();delete g._domRef;delete Ext.dd.DDM.ids["gridSplitters"+d.id]}Ext.fly(k.innerHd).removeAllListeners();Ext.removeNode(k.innerHd);delete k.innerHd;Ext.destroy(k.el,k.mainWrap,k.mainHd,k.scroller,k.mainBody,k.focusEl,k.resizeMarker,k.resizeProxy,k.activeHdBtn,k._flyweight,i,g);delete a.container;if(i){i.destroy()}Ext.dd.DDM.currentTarget=null;delete Ext.dd.DDM.locationCache[d.id];Ext.EventManager.removeResizeListener(k.onWindowResize,k)},onDenyColumnHide:function(){},render:function(){if(this.autoFill){var a=this.grid.ownerCt;if(a&&a.getLayout()){a.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders();this.updateHeaderSortState()},this,{single:true})}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.grid.getGridEl().dom.innerHTML=this.renderUI();this.afterRenderUI()},initData:function(a,e){var b=this;if(b.ds){var d=b.ds;d.un("add",b.onAdd,b);d.un("load",b.onLoad,b);d.un("clear",b.onClear,b);d.un("remove",b.onRemove,b);d.un("update",b.onUpdate,b);d.un("datachanged",b.onDataChange,b);if(d!==a&&d.autoDestroy){d.destroy()}}if(a){a.on({scope:b,load:b.onLoad,add:b.onAdd,remove:b.onRemove,update:b.onUpdate,clear:b.onClear,datachanged:b.onDataChange})}if(b.cm){var c=b.cm;c.un("configchange",b.onColConfigChange,b);c.un("widthchange",b.onColWidthChange,b);c.un("headerchange",b.onHeaderChange,b);c.un("hiddenchange",b.onHiddenChange,b);c.un("columnmoved",b.onColumnMove,b)}if(e){delete b.lastViewWidth;e.on({scope:b,configchange:b.onColConfigChange,widthchange:b.onColWidthChange,headerchange:b.onHeaderChange,hiddenchange:b.onHiddenChange,columnmoved:b.onColumnMove})}b.ds=a;b.cm=e},onDataChange:function(){this.refresh(true);this.updateHeaderSortState();this.syncFocusEl(0)},onClear:function(){this.refresh();this.syncFocusEl(0)},onUpdate:function(b,a){this.refreshRow(a)},onAdd:function(b,a,c){this.insertRows(b,c,c+(a.length-1))},onRemove:function(b,a,c,d){if(d!==true){this.fireEvent("beforerowremoved",this,c,a)}this.removeRow(c);if(d!==true){this.processRows(c);this.applyEmptyText();this.fireEvent("rowremoved",this,c,a)}},onLoad:function(){if(Ext.isGecko){if(!this.scrollToTopTask){this.scrollToTopTask=new Ext.util.DelayedTask(this.scrollToTop,this)}this.scrollToTopTask.delay(1)}else{this.scrollToTop()}},onColWidthChange:function(a,b,c){this.updateColumnWidth(b,c)},onHeaderChange:function(a,b,c){this.updateHeaders()},onHiddenChange:function(a,b,c){this.updateColumnHidden(b,c)},onColumnMove:function(a,c,b){this.indexMap=null;this.refresh(true);this.restoreScroll(this.getScrollState());this.afterMove(b);this.grid.fireEvent("columnmove",c,b)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(a){a.on("headerclick",this.onHeaderClick,this)},initEvents:Ext.emptyFn,onHeaderClick:function(b,a){if(this.headersDisabled||!this.cm.isSortable(a)){return}b.stopEditing(true);b.store.sort(this.cm.getDataIndex(a))},onRowOver:function(b,a){var c=this.findRowIndex(a);if(c!==false){this.addRowClass(c,this.rowOverCls)}},onRowOut:function(b,a){var c=this.findRowIndex(a);if(c!==false&&!b.within(this.getRow(c),true)){this.removeRowClass(c,this.rowOverCls)}},onRowSelect:function(a){this.addRowClass(a,this.selectedRowClass)},onRowDeselect:function(a){this.removeRowClass(a,this.selectedRowClass)},onCellSelect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).addClass("x-grid3-cell-selected")}},onCellDeselect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).removeClass("x-grid3-cell-selected")}},handleWheel:function(a){a.stopPropagation()},onColumnSplitterMoved:function(a,b){this.userResized=true;this.grid.colModel.setColumnWidth(a,b,true);if(this.forceFit){this.fitColumns(true,false,a);this.updateAllColumnWidths()}else{this.updateColumnWidth(a,b);this.syncHeaderScroll()}this.grid.fireEvent("columnresize",a,b)},beforeColMenuShow:function(){var b=this.cm,d=b.getColumnCount(),a=this.colMenu,c;a.removeAll();for(c=0;c0){if(!this.cm.isHidden(a-1)){return a}a--}return undefined},handleHdOver:function(c,b){var d=this.findHeaderCell(b);if(d&&!this.headersDisabled){var a=this.fly(d);this.activeHdRef=b;this.activeHdIndex=this.getCellIndex(d);this.activeHdRegion=a.getRegion();if(!this.isMenuDisabled(this.activeHdIndex,a)){a.addClass("x-grid3-hd-over");this.activeHdBtn=a.child(".x-grid3-hd-btn");if(this.activeHdBtn){this.activeHdBtn.dom.style.height=(d.firstChild.offsetHeight-1)+"px"}}}},handleHdOut:function(b,a){var c=this.findHeaderCell(a);if(c&&(!Ext.isIE||!b.within(c,true))){this.activeHdRef=null;this.fly(c).removeClass("x-grid3-hd-over");c.style.cursor=""}},isMenuDisabled:function(a,b){return this.cm.isMenuDisabled(a)},hasRows:function(){var a=this.mainBody.dom.firstChild;return a&&a.nodeType==1&&a.className!="x-grid-empty"},isHideableColumn:function(a){return !a.hidden},bind:function(a,b){this.initData(a,b)}});Ext.grid.GridView.SplitDragZone=Ext.extend(Ext.dd.DDProxy,{constructor:function(a,b){this.grid=a;this.view=a.getView();this.marker=this.view.resizeMarker;this.proxy=this.view.resizeProxy;Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,b,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.scroll=false;this.hw=this.view.splitHandleWidth||5},b4StartDrag:function(a,e){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var d=this.view.mainWrap.getHeight();this.marker.setHeight(d);this.marker.show();this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]);this.proxy.setHeight(d);var b=this.cm.getColumnWidth(this.cellIndex),c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,e)},allowHeaderDrag:function(a){return true},handleMouseDown:function(a){var h=this.view.findHeaderCell(a.getTarget());if(h&&this.allowHeaderDrag(a)){var l=this.view.fly(h).getXY(),c=l[0],i=a.getXY(),b=i[0],g=h.offsetWidth,d=false;if((b-c)<=this.hw){d=-1}else{if((c+g)-b<=this.hw){d=0}}if(d!==false){this.cm=this.grid.colModel;var k=this.view.getCellIndex(h);if(d==-1){if(k+d<0){return}while(this.cm.isHidden(k+d)){--d;if(k+d<0){return}}}this.cellIndex=k+d;this.split=h.dom;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}else{if(this.view.columnDrag){this.view.columnDrag.callHandleMouseDown(a)}}}},endDrag:function(g){this.marker.hide();var a=this.view,c=Math.max(this.minX,g.getPageX()),d=c-this.startPos,b=this.dragHeadersDisabled;a.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+d);setTimeout(function(){a.headersDisabled=b},50)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.PivotGridView=Ext.extend(Ext.grid.GridView,{colHeaderCellCls:"grid-hd-group-cell",title:"",getColumnHeaders:function(){return this.grid.topAxis.buildHeaders()},getRowHeaders:function(){return this.grid.leftAxis.buildHeaders()},renderRows:function(a,r){var b=this.grid,n=b.extractData(),o=n.length,e=this.templates,q=b.renderer,h=typeof q=="function",t=this.getCellCls,m=typeof t=="function",d=e.cell,u=e.row,k=[],p={},c="width:"+this.getGridInnerWidth()+"px;",l,g,s;a=a||0;r=Ext.isDefined(r)?r:o-1;for(s=0;s','
','
','
{title}
','
','
',"
",'
',"
",'
','
','
{body}
','',"
","
",'
 
','
 
',""),initTemplates:function(){Ext.grid.PivotGridView.superclass.initTemplates.apply(this,arguments);var a=this.templates||{};if(!a.gcell){a.gcell=new Ext.XTemplate('','
',this.grid.enableHdMenu?'':"","{value}","
","")}this.templates=a;this.hrowRe=new RegExp("ux-grid-hd-group-row-(\\d+)","")},initElements:function(){Ext.grid.PivotGridView.superclass.initElements.apply(this,arguments);this.rowHeadersEl=new Ext.Element(this.scroller.child("div.x-grid3-row-headers"));this.headerTitleEl=new Ext.Element(this.mainHd.child("div.x-grid3-header-title"))},getGridInnerWidth:function(){var a=Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this,arguments);return a-this.getTotalRowHeaderWidth()},getTotalRowHeaderWidth:function(){var d=this.getRowHeaders(),c=d.length,b=0,a;for(a=0;a0&&d>0){g=g||n.data[a[e-1].dataIndex]!=k[d-1].data[a[e-1].dataIndex]}if(g){r.push({header:p,span:o,start:b});b+=o;o=0}if(h){r.push({header:m,span:o+1,start:b});b+=o;o=0}p=m;o++}c.push({items:r,width:dimension.width||this.defaultHeaderWidth});p=undefined}return c}});Ext.grid.HeaderDragZone=Ext.extend(Ext.dd.DragZone,{maxDragWidth:120,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,c);if(b){this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b))}this.scroll=false},getDragData:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findHeaderCell(a);if(b){return{ddel:b.firstChild,header:b}}return false},onInitDrag:function(a){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var b=this.dragData.ddel.cloneNode(true);b.id=Ext.id();b.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(b);return true},afterValidDrop:function(){this.completeDrop()},afterInvalidDrop:function(){this.completeDrop()},completeDrop:function(){var a=this.view,b=this.dragHeadersDisabled;setTimeout(function(){a.headersDisabled=b},50)}});Ext.grid.HeaderDropZone=Ext.extend(Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:" "},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:" "},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,a.getGridEl().dom)},getTargetFromEvent:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findCellIndex(a);if(b!==false){return this.view.getHeaderCell(b)}},nextVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.nextSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.nextSibling}return null},prevVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.prevSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.prevSibling}return null},positionIndicator:function(d,l,k){var a=Ext.lib.Event.getPageX(k),g=Ext.lib.Dom.getRegion(l.firstChild),c,i,b=g.top+this.proxyOffsets[1];if((g.right-a)<=(g.right-g.left)/2){c=g.right+this.view.borderWidth;i="after"}else{c=g.left;i="before"}if(this.grid.colModel.isFixed(this.view.getCellIndex(l))){return false}c+=this.proxyOffsets[0];this.proxyTop.setLeftTop(c,b);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(c,b+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return i},onNodeEnter:function(d,a,c,b){if(b.header!=d){this.positionIndicator(b.header,d,c)}},onNodeOver:function(g,b,d,c){var a=false;if(c.header!=g){a=this.positionIndicator(c.header,g,d)}if(!a){this.proxyTop.hide();this.proxyBottom.hide()}return a?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(d,a,c,b){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(b,o,g,c){var d=c.header;if(d!=b){var l=this.grid.colModel,k=Ext.lib.Event.getPageX(g),a=Ext.lib.Dom.getRegion(b.firstChild),p=(a.right-k)<=((a.right-a.left)/2)?"after":"before",i=this.view.getCellIndex(d),m=this.view.getCellIndex(b);if(p=="after"){m++}if(i=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){this.config[a].setEditor(b)},destroy:function(){var b=this.config.length,a=0;for(;a0},isSelected:function(a){var b=Ext.isNumber(a)?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,i,h){if(h.button!==0||this.isLocked()){return}var a=this.grid.getView();if(h.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,i,h.ctrlKey);this.last=c;a.focusRow(i)}else{var b=this.isSelected(i);if(h.ctrlKey&&b){this.deselectRow(i)}else{if(!b||this.getCount()>1){this.selectRow(i,h.ctrlKey||h.shiftKey);a.focusRow(i)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}if(!this.silent){this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(o,m){var d=m.getKey(),h,i=this.grid,q=i.lastEdit,l=i.activeEditor,b=m.shiftKey,p,q,a,n;if(d==m.TAB){m.stopEvent();l.completeEdit();if(b){h=i.walkCells(l.row,l.col-1,-1,this.acceptsNav,this)}else{h=i.walkCells(l.row,l.col+1,1,this.acceptsNav,this)}}else{if(d==m.ENTER){if(this.moveEditorOnEnter!==false){if(b){h=i.walkCells(q.row-1,q.col,-1,this.acceptsNav,this)}else{h=i.walkCells(q.row+1,q.col,1,this.acceptsNav,this)}}}}if(h){a=h[0];n=h[1];this.onEditorSelect(a,q.row);if(i.isEditor&&i.editing){p=i.activeEditor;if(p&&p.field.triggerBlur){p.field.triggerBlur()}}i.startEditing(a,n)}},onEditorSelect:function(b,a){if(a!=b){this.selectRow(b)}},destroy:function(){Ext.destroy(this.rowNav);this.rowNav=null;Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=Ext.extend(Ext.util.Observable,{isColumn:true,constructor:function(b){Ext.apply(this,b);if(Ext.isString(this.renderer)){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}if(!this.scope){this.scope=this}var a=this.editor;delete this.editor;this.setEditor(a);this.addEvents("click","contextmenu","dblclick","mousedown");Ext.grid.Column.superclass.constructor.call(this)},processEvent:function(b,d,c,g,a){return this.fireEvent(b,this,c,g,d)},destroy:function(){if(this.setEditor){this.setEditor(null)}this.purgeListeners()},renderer:function(a){return a},getEditor:function(a){return this.editable!==false?this.editor:null},setEditor:function(b){var a=this.editor;if(a){if(a.gridEditor){a.gridEditor.destroy();delete a.gridEditor}else{a.destroy()}}this.editor=null;if(b){if(!b.isXType){b=Ext.create(b,"textfield")}this.editor=b}},getCellEditor:function(b){var a=this.getEditor(b);if(a){if(!a.startEdit){if(!a.gridEditor){a.gridEditor=new Ext.grid.GridEditor(a)}a=a.gridEditor}}return a}});Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:" ",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=(!Ext.isPrimitive(this.tpl)&&this.tpl.compile)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.ActionColumn=Ext.extend(Ext.grid.Column,{header:" ",actionIdRe:/x-action-col-(\d+)/,altText:"",constructor:function(b){var g=this,c=b.items||(g.items=[g]),a=c.length,d,e;Ext.grid.ActionColumn.superclass.constructor.call(g,b);g.renderer=function(h,i){h=Ext.isFunction(b.renderer)?b.renderer.apply(this,arguments)||"":"";i.css+=" x-action-col-cell";for(d=0;d"}return h}},destroy:function(){delete this.items;delete this.renderer;return Ext.grid.ActionColumn.superclass.destroy.apply(this,arguments)},processEvent:function(c,i,d,k,b){var a=i.getTarget().className.match(this.actionIdRe),h,g;if(a&&(h=this.items[parseInt(a[1],10)])){if(c=="click"){(g=h.handler||this.handler)&&g.call(h.scope||this.scope||this,d,k,b,h,i)}else{if((c=="mousedown")&&(h.stopSelection!==false)){return false}}}return Ext.grid.ActionColumn.superclass.processEvent.apply(this,arguments)}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn,actioncolumn:Ext.grid.ActionColumn};Ext.grid.RowNumberer=Ext.extend(Object,{header:"",width:23,sortable:false,constructor:function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}},fixed:true,hideable:false,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}});Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'
 
',width:20,sortable:false,menuDisabled:true,fixed:true,hideable:false,dataIndex:"",id:"checker",isColumn:true,constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){Ext.fly(this.grid.getView().innerHd).on("mousedown",this.onHdMouseDown,this)},this)},processEvent:function(b,d,c,g,a){if(b=="mousedown"){this.onMouseDown(d,d.getTarget());return false}else{return Ext.grid.Column.prototype.processEvent.apply(this,arguments)}},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true);this.grid.getView().focusRow(a)}}}},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'
 
'},onEditorSelect:function(b,a){if(a!=b&&!this.checkOnly){this.selectRow(b)}}});Ext.grid.CellSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{constructor:function(a){Ext.apply(this,a);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)},initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.on(Ext.EventManager.getKeyEvent(),this.handleKeyDown,this);this.grid.getView().on({scope:this,refresh:this.onViewChange,rowupdated:this.onRowUpdated,beforerowremoved:this.clearSelections,beforerowsinserted:this.clearSelections});if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(a){this.select(a.row,a.column,false,true,a.record)},onRowUpdated:function(a,b,c){if(this.selection&&this.selection.record==c){a.onCellSelect(b,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(b){var a=this.selection;if(a){if(b!==true){this.grid.view.onCellDeselect(a.cell[0],a.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(b,d,a,c){if(c.button!==0||this.isLocked()){return}this.select(d,a)},select:function(g,c,b,e,d){if(this.fireEvent("beforecellselect",this,g,c)!==false){this.clearSelections();d=d||this.grid.store.getAt(g);this.selection={record:d,cell:[g,c]};if(!b){var a=this.grid.getView();a.onCellSelect(g,c);if(e!==true){a.focusCell(g,c)}}this.fireEvent("cellselect",this,g,c);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(c,b,a){return !a.isHidden(b)},onEditorKey:function(b,a){if(a.getKey()==a.TAB){this.handleKeyDown(a)}},handleKeyDown:function(l){if(!l.isNavKeyPress()){return}var d=l.getKey(),i=this.grid,q=this.selection,b=this,n=function(g,c,e){return i.walkCells(g,c,e,i.isEditor&&i.editing?b.acceptsNav:b.isSelectable,b)},p,h,a,m,o;switch(d){case l.ESC:case l.PAGE_UP:case l.PAGE_DOWN:break;default:l.stopEvent();break}if(!q){p=n(0,0,1);if(p){this.select(p[0],p[1])}return}p=q.cell;a=p[0];m=p[1];switch(d){case l.TAB:if(l.shiftKey){h=n(a,m-1,-1)}else{h=n(a,m+1,1)}break;case l.DOWN:h=n(a+1,m,1);break;case l.UP:h=n(a-1,m,-1);break;case l.RIGHT:h=n(a,m+1,1);break;case l.LEFT:h=n(a,m-1,-1);break;case l.ENTER:if(i.isEditor&&!i.editing){i.startEditing(a,m);return}break}if(h){a=h[0];m=h[1];this.select(a,m);if(i.isEditor&&i.editing){o=i.activeEditor;if(o&&o.field.triggerBlur){o.field.triggerBlur()}i.startEditing(a,m)}}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)}});Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:false,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.getGridEl().on("mousewheel",this.stopEditing.createDelegate(this,[true]),this);this.on("columnresize",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{var a=this.getView();if(this.clicksToEdit=="auto"&&a.mainBody){a.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}},onResize:function(){Ext.grid.EditorGridPanel.superclass.onResize.apply(this,arguments);var a=this.activeEditor;if(this.editing&&a){a.realign(true)}},onCellDblClick:function(b,c,a){this.startEditing(c,a)},onAutoEditClick:function(c,b){if(c.button!==0){return}var g=this.view.findRowIndex(b),a=this.view.findCellIndex(b);if(g!==false&&a!==false){this.stopEditing();if(this.selModel.getSelectedCell){var d=this.selModel.getSelectedCell();if(d&&d[0]===g&&d[1]===a){this.startEditing(g,a)}}else{if(this.selModel.isSelected(g)){this.startEditing(g,a)}}}},onEditComplete:function(b,d,a){this.editing=false;this.lastActiveEditor=this.activeEditor;this.activeEditor=null;var c=b.record,h=this.colModel.getDataIndex(b.col);d=this.postEditValue(d,a,c,h);if(this.forceValidation===true||String(d)!==String(a)){var g={grid:this,record:c,field:h,originalValue:a,value:d,row:b.row,column:b.col,cancel:false};if(this.fireEvent("validateedit",g)!==false&&!g.cancel&&String(d)!==String(a)){c.set(h,g.value);delete g.cancel;this.fireEvent("afteredit",g)}}this.view.focusCell(b.row,b.col)},startEditing:function(i,c){this.stopEditing();if(this.colModel.isCellEditable(c,i)){this.view.ensureVisible(i,c,true);var d=this.store.getAt(i),h=this.colModel.getDataIndex(c),g={grid:this,record:d,field:h,value:d.data[h],row:i,column:c,cancel:false};if(this.fireEvent("beforeedit",g)!==false&&!g.cancel){this.editing=true;var b=this.colModel.getCellEditor(c,i);if(!b){return}if(!b.rendered){b.parentEl=this.view.getEditorParent(b);b.on({scope:this,render:{fn:function(e){e.field.focus(false,true)},single:true,scope:this},specialkey:function(l,k){this.getSelectionModel().onEditorKey(l,k)},complete:this.onEditComplete,canceledit:this.stopEditing.createDelegate(this,[true])})}Ext.apply(b,{row:i,col:c,record:d});this.lastEdit={row:i,col:c};this.activeEditor=b;b.selectSameEditor=(this.activeEditor==this.lastActiveEditor);var a=this.preEditValue(d,h);b.startEdit(this.view.getCell(i,c).firstChild,Ext.isDefined(a)?a:"");(function(){delete b.selectSameEditor}).defer(50)}}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&Ext.isString(b)?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&Ext.isString(c)?Ext.util.Format.htmlEncode(c):c},stopEditing:function(b){if(this.editing){var a=this.lastActiveEditor=this.activeEditor;if(a){a[b===true?"cancelEdit":"completeEdit"]();this.view.focusCell(a.row,a.col)}this.activeEditor=null}this.editing=false}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(b,a){Ext.grid.GridEditor.superclass.constructor.call(this,b,a);b.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=Ext.extend(Ext.util.Observable,{constructor:function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)},setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)},setValue:function(d,c,a){var b=this.getRec(d);if(b){b.set("value",c);this.source[d]=c}else{if(a){this.source[d]=c;b=new Ext.grid.PropertyRecord({name:d,value:c},d);this.store.add(b)}}},remove:function(b){var a=this.getRec(b);if(a){this.store.remove(a);delete this.source[b]}},getRec:function(a){return this.store.getById(a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=Ext.extend(Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",constructor:function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:this.trueText},{tag:"option",value:"false",html:this.falseText}]},getValue:function(){return this.el.dom.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a,{autoSize:"both"})};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)},renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return this[a?"trueText":"falseText"]},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(d,b,c){var a=this.grid.customRenderers[c.get("name")];if(a){return a.apply(this,arguments)}var e=d;if(Ext.isDate(d)){e=this.renderDate(d)}else{if(typeof d=="boolean"){e=this.renderBool(d)}}return Ext.util.Format.htmlEncode(e)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);this.destroyEditors(this.editors);this.destroyEditors(this.grid.customEditors)},destroyEditors:function(b){for(var a in b){Ext.destroy(b[a])}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customRenderers=this.customRenderers||{};this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.reg("propertygrid",Ext.grid.PropertyGrid);Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",groupMode:"value",cancelEditOnToggle:true,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('
','
',this.groupTextTpl,"
",'
')}this.startGroup.compile();if(!this.endGroup){this.endGroup="
"}},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(d,a,b){if(this.canGroup()&&!this.ignoreAdd){var c=this.getScrollState();this.fireEvent("beforerowsinserted",d,b,b+(a.length-1));this.refresh();this.restoreScroll(c);this.fireEvent("rowsinserted",d,b,b+(a.length-1))}else{if(!this.canGroup()){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(this.canGroup(),true)}},renderUI:function(){var a=Ext.grid.GroupingView.superclass.renderUI.call(this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}return a},processEvent:function(b,i){Ext.grid.GroupingView.superclass.processEvent.call(this,b,i);var h=i.getTarget(".x-grid-group-hd",this.mainBody);if(h){var g=this.getGroupField(),d=this.getPrefix(g),a=h.id.substring(d.length),c=new RegExp("gp-"+Ext.escapeRe(g)+"--hd");a=a.substr(0,a.length-3);if(a||c.test(h.id)){this.grid.fireEvent("group"+b,this.grid,g,a,i)}if(b=="mousedown"&&i.button==0){this.toggleGroup(h.parentNode)}}},onGroupByClick:function(){var a=this.grid;this.enableGrouping=true;a.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));a.fireEvent("groupchange",a,a.store.getGroupState());this.beforeMenuShow();this.refresh()},onShowGroupsClick:function(a,b){this.enableGrouping=b;if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping();this.grid.fireEvent("groupchange",this,null)}},toggleRowIndex:function(c,a){if(!this.canGroup()){return}var b=this.getRow(c);if(b){this.toggleGroup(this.findGroup(b),a)}},toggleGroup:function(c,b){var a=Ext.get(c);b=Ext.isDefined(b)?b:a.hasClass("x-grid-group-collapsed");if(this.state[a.id]!==b){if(this.cancelEditOnToggle!==false){this.grid.stopEditing(true)}this.state[a.id]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")}},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(c){for(var b=0,a=this.length;b0){for(var r=0;r0);if(!E){E=true;Ext.each(r,function(N,O,M){if(N&&(J=H.getElementById(N.id))){if(!N.checkReady||x||J.nextSibling||(H&&H.body)){J=N.override?(N.override===true?N.obj:N.override):J;N.fn.call(J,N.obj);r[O]=null}else{L.push(item)}}});B=(L.length==0)?0:B-1;if(K){o()}else{clearInterval(d);d=null}I=!(E=false)}return I}function o(){if(!d){var I=function(){F()};d=setInterval(I,t)}}function G(){var I=Ext.fly(H).getScroll();return[I.top,I.top]}function k(I,J){I=I.browserEvent||I;var K=I["page"+J];if(!K&&0!=K){K=I["client"+J]||0;if(Ext.isIE){K+=G()[J=="X"?0:1]}}return K}var z={onAvailable:function(K,I,L,J){r.push({id:K,fn:I,obj:L,override:J,checkReady:false});B=m;o()},addListener:function(L,I,K){var J;L=Ext.getDom(L);if(L&&K){if("unload"==I){J=!!(g[g.length]=[L,I,K])}else{v.push([L,I,K,J=e(L,I,K,false)])}}return !!J},removeListener:function(N,J,M){var L=false,K,I;N=Ext.getDom(N);if(!M){L=this.purgeElement(N,false,J)}else{if("unload"==J){Ext.each(g,function(P,Q,O){if(P&&P[0]==N&&P[1]==J&&P[2]==M){g.splice(Q,1);L=true}})}else{K=arguments[3]||A(N,J,M);I=v[K];if(N&&I){h(N,J,I[n],false);I[n]=I[j]=null;v.splice(K,1);L=true}}}return L},getTarget:function(I){I=I.browserEvent||I;return this.resolveTextNode(I.target||I.srcElement)},resolveTextNode:function(I){return I&&!D(I)&&q(I)?I.parentNode:I},getRelatedTarget:function(I){I=I.browserEvent||I;return this.resolveTextNode(I.relatedTarget||(I.type=="mouseout"?I.toElement:I.type=="mouseover"?I.fromElement:null))},getPageX:function(I){return k(I,"X")},getPageY:function(I){return k(I,"Y")},getXY:function(I){return[this.getPageX(I),this.getPageY(I)]},stopEvent:function(I){this.stopPropagation(I);this.preventDefault(I)},stopPropagation:function(I){I=I.browserEvent||I;if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}},preventDefault:function(I){I=I.browserEvent||I;if(I.preventDefault){I.preventDefault()}else{I.returnValue=false}},getEvent:function(I){I=I||l.event;if(!I){var J=this.getEvent.caller;while(J){I=J.arguments[0];if(I&&Event==I.constructor){break}J=J.caller}}return I},getCharCode:function(I){I=I.browserEvent||I;return I.charCode||I.keyCode||0},_load:function(J){x=true;var I=Ext.lib.Event;if(Ext.isIE&&J!==true){h(l,"load",arguments.callee)}},purgeElement:function(J,L,I){var K=this;Ext.each(K.getListeners(J,I),function(M){if(M){K.removeListener(J,M.type,M.fn)}});if(L&&J&&J.childNodes){Ext.each(J.childNodes,function(M){K.purgeElement(M,L,I)})}},getListeners:function(L,J){var M=this,K=[],I;if(J){I=J=="unload"?g:v}else{I=v.concat(g)}Ext.each(I,function(N,O){if(N&&N[C]==L&&(!J||J==N[s])){K.push({type:N[s],fn:N[j],obj:N[u],adjust:N[y],index:O})}});return K.length?K:null},_unload:function(P){var O=Ext.lib.Event,M,L,J,I,K,N;Ext.each(g,function(Q){if(Q){try{N=Q[y]?(Q[y]===true?Q[u]:Q[y]):l;Q[j].call(N,O.getEvent(R),Q[u])}catch(R){}}});g=null;if(v&&(L=v.length)){while(L){if(J=v[K=--L]){O.removeListener(J[C],J[s],J[j],K)}}}h(l,"unload",O._unload)}};z.on=z.addListener;z.un=z.removeListener;if(H&&H.body){z._load(true)}else{e(l,"load",z._load)}e(l,"unload",z._unload);F();return z}();Ext.lib.Ajax=function(){var g=["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];function h(t){var s=t.conn,u;function r(v,w){for(u in w){if(w.hasOwnProperty(u)){v.setRequestHeader(u,w[u])}}}if(l.defaultHeaders){r(s,l.defaultHeaders)}if(l.headers){r(s,l.headers);l.headers=null}}function d(u,t,s,r){return{tId:u,status:s?-1:0,statusText:s?"transaction aborted":"communication failure",isAbort:true,isTimeout:true,argument:t}}function k(r,s){(l.headers=l.headers||{})[r]=s}function p(w,u){var r={},s,t=w.conn;try{s=w.conn.getAllResponseHeaders();Ext.each(s.split("\n"),function(x){var y=x.indexOf(":");r[x.substr(0,y)]=x.substr(y+1)})}catch(v){}return{tId:w.tId,status:t.status,statusText:t.statusText,getResponseHeader:function(x){return r[x]},getAllResponseHeaders:function(){return s},responseText:t.responseText,responseXML:t.responseXML,argument:u}}function o(r){r.conn=null;r=null}function e(w,x,s,r){if(!x){o(w);return}var u,t;try{if(w.conn.status!==undefined&&w.conn.status!=0){u=w.conn.status}else{u=13030}}catch(v){u=13030}if((u>=200&&u<300)||(Ext.isIE&&u==1223)){t=p(w,x.argument);if(x.success){if(!x.scope){x.success(t)}else{x.success.apply(x.scope,[t])}}}else{switch(u){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:t=d(w.tId,x.argument,(s?s:false),r);if(x.failure){if(!x.scope){x.failure(t)}else{x.failure.apply(x.scope,[t])}}break;default:t=p(w,x.argument);if(x.failure){if(!x.scope){x.failure(t)}else{x.failure.apply(x.scope,[t])}}}}o(w);t=null}function n(t,w){w=w||{};var r=t.conn,v=t.tId,s=l.poll,u=w.timeout||null;if(u){l.timeout[v]=setTimeout(function(){l.abort(t,w,true)},u)}s[v]=setInterval(function(){if(r&&r.readyState==4){clearInterval(s[v]);s[v]=null;if(u){clearTimeout(l.timeout[v]);l.timeout[v]=null}e(t,w)}},l.pollInterval)}function j(v,s,u,r){var t=m()||null;if(t){t.conn.open(v,s,true);if(l.useDefaultXhrHeader){k("X-Requested-With",l.defaultXhrHeader)}if(r&&l.useDefaultHeader&&(!l.headers||!l.headers["Content-Type"])){k("Content-Type",l.defaultPostHeader)}if(l.defaultHeaders||l.headers){h(t)}n(t,u);t.conn.send(r||null)}return t}function m(){var s;try{if(s=q(l.transactionId)){l.transactionId++}}catch(r){}finally{return s}}function q(u){var r;try{r=new XMLHttpRequest()}catch(t){for(var s=0;s0&&isFinite(y)){if(t.curFrame+y>=x){y=x-(w+1)}t.curFrame+=y}}};h.Bezier=new function(){this.getPosition=function(r,q){var u=r.length,p=[],s=1-q,o,m;for(o=0;o0&&!Ext.isArray(v[0])){v=[v]}else{}Ext.fly(s,"_anim").position();D.setXY(s,l(A)?A:D.getXY(s));r=z.getAttr("points");if(l(B)){t=m.call(z,B,r);for(u=0,w=v.length;u0){q=q.concat(v)}q[q.length]=t}else{p.setRunAttr.call(this,x)}}});var m=function(q,s){var r=h.Dom.getXY(this.el);return[q[0]-r[0]+s[0],q[1]-r[1]+s[1]]}})()})();(function(){var d=Math.abs,k=Math.PI,j=Math.asin,h=Math.pow,e=Math.sin,g=Ext.lib;Ext.apply(g.Easing,{easeBoth:function(m,l,o,n){return((m/=n/2)<1)?o/2*m*m+l:-o/2*((--m)*(m-2)-1)+l},easeInStrong:function(m,l,o,n){return o*(m/=n)*m*m*m+l},easeOutStrong:function(m,l,o,n){return -o*((m=m/n-1)*m*m*m-1)+l},easeBothStrong:function(m,l,o,n){return((m/=n/2)<1)?o/2*m*m*m*m+l:-o/2*((m-=2)*m*m*m-2)+l},elasticIn:function(n,l,u,r,m,q){if(n==0||(n/=r)==1){return n==0?l:l+u}q=q||(r*0.3);var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return -(m*h(2,10*(n-=1))*e((n*r-o)*(2*k)/q))+l},elasticOut:function(n,l,u,r,m,q){if(n==0||(n/=r)==1){return n==0?l:l+u}q=q||(r*0.3);var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return m*h(2,-10*n)*e((n*r-o)*(2*k)/q)+u+l},elasticBoth:function(n,l,u,r,m,q){if(n==0||(n/=r/2)==2){return n==0?l:l+u}q=q||(r*(0.3*1.5));var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return n<1?-0.5*(m*h(2,10*(n-=1))*e((n*r-o)*(2*k)/q))+l:m*h(2,-10*(n-=1))*e((n*r-o)*(2*k)/q)*0.5+u+l},backIn:function(m,l,p,o,n){n=n||1.70158;return p*(m/=o)*m*((n+1)*m-n)+l},backOut:function(m,l,p,o,n){if(!n){n=1.70158}return p*((m=m/o-1)*m*((n+1)*m+n)+1)+l},backBoth:function(m,l,p,o,n){n=n||1.70158;return((m/=o/2)<1)?p/2*(m*m*(((n*=(1.525))+1)*m-n))+l:p/2*((m-=2)*m*(((n*=(1.525))+1)*m+n)+2)+l},bounceIn:function(m,l,o,n){return o-g.Easing.bounceOut(n-m,0,o,n)+l},bounceOut:function(m,l,o,n){if((m/=n)<(1/2.75)){return o*(7.5625*m*m)+l}else{if(m<(2/2.75)){return o*(7.5625*(m-=(1.5/2.75))*m+0.75)+l}else{if(m<(2.5/2.75)){return o*(7.5625*(m-=(2.25/2.75))*m+0.9375)+l}}}return o*(7.5625*(m-=(2.625/2.75))*m+0.984375)+l},bounceBoth:function(m,l,o,n){return(m0},suspendEvents:function(p){this.eventsSuspended=h;if(p){this.suspendedEventsQueue=[]}},resumeEvents:function(){var p=this;p.eventsSuspended=!delete p.suspendedEventQueue;l(p.suspendedEventsQueue,function(q){p.fireEvent.apply(p,q)})}}}();var e=j.Observable.prototype;e.on=e.addListener;e.un=e.removeListener;j.Observable.releaseCapture=function(n){n.fireEvent=e.fireEvent};function g(p,q,n){return function(){if(q.target==arguments[0]){p.apply(n,m(arguments))}}}function c(q,r,p){var n=new j.DelayedTask();return function(){n.delay(r.buffer,q,p,m(arguments))}}function d(p,q,o,n){return function(){q.removeListener(o,n);return p.apply(n,arguments)}}function b(p,q,n){return function(){var o=m(arguments);(function(){p.apply(n,o)}).defer(q.delay||10)}}j.Event=function(o,n){this.name=n;this.obj=o;this.listeners=[]};j.Event.prototype={addListener:function(q,p,o){var r=this,n;p=p||r.obj;if(!r.isListening(q,p)){n=r.createListener(q,p,o);if(r.firing){r.listeners=r.listeners.slice(0)}r.listeners.push(n)}},createListener:function(r,q,s){s=s||{},q=q||this.obj;var n={fn:r,scope:q,options:s},p=r;if(s.target){p=g(p,s,q)}if(s.delay){p=b(p,s,q)}if(s.single){p=d(p,this,r,q)}if(s.buffer){p=c(p,s,q)}n.fireFn=p;return n},findListener:function(q,p){var o,n=-1;l(this.listeners,function(r,s){o=r.scope;if(r.fn==q&&(o==p||o==this.obj)){n=s;return k}},this);return n},isListening:function(o,n){return this.findListener(o,n)!=-1},removeListener:function(q,p){var o,r=this,n=k;if((o=r.findListener(q,p))!=-1){if(r.firing){r.listeners=r.listeners.slice(0)}r.listeners.splice(o,1);n=h}return n},clearListeners:function(){this.listeners=[]},fire:function(){var p=this,o=m(arguments),n=h;l(p.listeners,function(q){p.firing=h;if(q.fireFn.apply(q.scope||p.obj||window,o)===k){return n=p.firing=k}});p.firing=k;return n}}})();Ext.DomHelper=function(){var t=null,k=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,m=/^table|tbody|tr|td$/i,q,n="afterbegin",o="afterend",c="beforebegin",p="beforeend",a="",h="
",b=a+"",j=""+h,l=b+"",s=""+j;function g(x,z,y,A,w,u){var v=q.insertHtml(A,Ext.getDom(x),r(z));return y?Ext.get(v,true):v}function r(z){var w="",v,y,x,u,A;if(typeof z=="string"){w=z}else{if(Ext.isArray(z)){Ext.each(z,function(B){w+=r(B)})}else{w+="<"+(z.tag=z.tag||"div");for(v in z){y=z[v];if(!/tag|children|cn|html$/i.test(v)&&!Ext.isFunction(y)){if(Ext.isObject(y)){w+=" "+v+"='";for(x in y){u=y[x];w+=!Ext.isFunction(u)?x+":"+u+";":""}w+="'"}else{w+=" "+({cls:"class",htmlFor:"for"}[v]||v)+"='"+y+"'"}}}if(k.test(z.tag)){w+="/>"}else{w+=">";if(A=z.children||z.cn){w+=r(A)}else{if(z.html){w+=z.html}}w+=""}}}return w}function e(z,x,w,y){t.innerHTML=[x,w,y].join("");var u=-1,v=t;while(++u "'+z+'"'},insertBefore:function(u,w,v){return g(u,w,v,c)},insertAfter:function(u,w,v){return g(u,w,v,o,"nextSibling")},insertFirst:function(u,w,v){return g(u,w,v,n,"firstChild")},append:function(u,w,v){return g(u,w,v,p,"",true)},overwrite:function(u,w,v){u=Ext.getDom(u);u.innerHTML=r(w);return v?Ext.get(u.firstChild):u.firstChild},createHtml:r};return q}();Ext.Template=function(d){var e=this,b=arguments,c=[];if(Ext.isArray(d)){d=d.join("")}else{if(b.length>1){Ext.each(b,function(a){if(Ext.isObject(a)){Ext.apply(e,a)}else{c.push(a)}});d=c.join("")}}e.html=d;if(e.compiled){e.compile()}};Ext.Template.prototype={applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(c,d){return a[d]!==undefined?a[d]:""})},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},re:/\{([\w-]+)\}/g,compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'"}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,isOpera=Ext.isOpera,key=30803;eval("var batch = 30803;");function child(p,index){var i=0,n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1,nx;while(n){nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=isOpera?ni.childNodes:(ni.children||ni.childNodes);for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.EventManager=function(){var u,n,k=false,m=Ext.lib.Event,o=Ext.lib.Dom,b=document,v=window,g="ie-deferred-loader",p="DOMContentLoaded",e={},h=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;function l(B,x,A,z,y){var D=Ext.id(B),C=e[D]=e[D]||{};(C[x]=C[x]||[]).push([A,z,y]);m.on(B,x,z);if(x=="mousewheel"&&B.addEventListener){var w=["DOMMouseScroll",z,false];B.addEventListener.apply(B,w);m.on(window,"unload",function(){B.removeEventListener.apply(B,w)})}if(x=="mousedown"&&B==document){Ext.EventManager.stoppedMouseDownEvent.addListener(z)}}function c(){if(!k){Ext.isReady=k=true;if(n){clearInterval(n)}if(Ext.isGecko||Ext.isOpera){b.removeEventListener(p,c,false)}if(Ext.isIE){var w=b.getElementById(g);if(w){w.onreadystatechange=null;w.parentNode.removeChild(w)}}if(u){u.fire();u.clearListeners()}}}function a(){var w="complete";u=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){b.addEventListener(p,c,false)}else{if(Ext.isIE){b.write("