From 86dd023448a1aed54a076df9533ecdf50c4dcd97 Mon Sep 17 00:00:00 2001 From: Alessandro Cosentino Date: Tue, 7 Jun 2011 15:48:21 -0400 Subject: Adding clear logs functions --- apps/files_publiclink/js/admin.js | 2 +- config/.gitignore | 0 css/styles.css | 1 + lib/log.php | 14 +++++++++++++- log/index.php | 18 ++++++++++++++++-- log/js/log.js | 5 ++++- log/templates/index.php | 14 +++++++++++++- 7 files changed, 48 insertions(+), 6 deletions(-) mode change 100644 => 100755 config/.gitignore diff --git a/apps/files_publiclink/js/admin.js b/apps/files_publiclink/js/admin.js index 017c62cb42a..9a0bad604a2 100644 --- a/apps/files_publiclink/js/admin.js +++ b/apps/files_publiclink/js/admin.js @@ -48,5 +48,5 @@ $(document).ready(function() { } } }); - }) + }); }); \ No newline at end of file diff --git a/config/.gitignore b/config/.gitignore old mode 100644 new mode 100755 diff --git a/css/styles.css b/css/styles.css index 2790c5c0492..5027a6b6fe9 100644 --- a/css/styles.css +++ b/css/styles.css @@ -269,6 +269,7 @@ p.actions a.delete, div.actions a.delete { background-image:url('../img/delete.p #logs_options span { margin:0 2em 0 0.5em; font-weight:bold; } #logs_options label { margin:0 1em 0 0; } #logs_options input[type="submit"] { float:right; margin:0 2em 0 0; } +#logs_options input[type="submit"].nofloat { float:none; margin:0 2em 0 0; } #logs_options input[type="text"] { margin:0; padding:0; border:1px solid #ccc; text-align:right; } li.error{ list-style:none; width:640px; margin:4em auto; padding:1em 1em 1em 4em; background-color:#fee; background-image:url('../img/task-attention.png'); background-position:0.8em 0.8em; background-repeat:no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; } diff --git a/lib/log.php b/lib/log.php index aebeba7d4b3..894575ef059 100644 --- a/lib/log.php +++ b/lib/log.php @@ -79,7 +79,7 @@ class OC_LOG { * - app: only entries for this app */ public static function get( $filter = array()){ - $queryString='SELECT * FROM *PREFIX*log WHERE 1=1 '; + $queryString='SELECT * FROM *PREFIX*log WHERE 1=1 ORDER BY moment DESC'; $params=array(); if(isset($filter['from'])){ $queryString.='AND moment>? '; @@ -120,6 +120,18 @@ class OC_LOG { $query->execute(array($date)); return true; } + + /** + * @brief removes all log entries + * @returns true/false + * + * This function deletes all log entries. + */ + public static function deleteAll(){ + $query=OC_DB::prepare("DELETE FROM *PREFIX*log"); + $query->execute(); + return true; + } /** * @brief filter an array of log entries on action diff --git a/log/index.php b/log/index.php index 675396a4d10..db476b85605 100644 --- a/log/index.php +++ b/log/index.php @@ -37,8 +37,10 @@ OC_UTIL::addScript( "log", "log" ); $allActions=array('login','logout','read','write','create','delete'); -//check for a submited config -if(isset($_POST['size'])){ +$removeBeforeDate = 0; + +//check for a submitted config +if(isset($_POST['save'])){ $selectedActions=array(); foreach($allActions as $action){ if(isset($_POST[$action]) and $_POST[$action]=='on'){ @@ -48,10 +50,22 @@ if(isset($_POST['size'])){ OC_PREFERENCES::setValue($_SESSION['user_id'],'log','actions',implode(',',$selectedActions)); OC_PREFERENCES::setValue($_SESSION['user_id'],'log','pagesize',$_POST['size']); } +//clear log entries +else if(isset($_POST['clear'])){ + $removeBeforeDate=(isset($_POST['removeBeforeDate']))?$_POST['removeBeforeDate']:0; + if($removeBeforeDate!==0){ + $removeBeforeDate=strtotime($removeBeforeDate); + OC_LOG::deleteBefore($removeBeforeDate); + } +} +else if(isset($_POST['clearall'])){ + OC_LOG::deleteAll(); +} OC_APP::setActiveNavigationEntry( 'log' ); $logs=OC_LOG::get(); + $selectedActions=explode(',',OC_PREFERENCES::getValue($_SESSION['user_id'],'log','actions',implode(',',$allActions))); $logs=OC_LOG::filterAction($logs,$selectedActions); diff --git a/log/js/log.js b/log/js/log.js index 47c20b3e860..5ec75b94f4b 100644 --- a/log/js/log.js +++ b/log/js/log.js @@ -18,4 +18,7 @@ $(document).ready(function() { } } }); -}); \ No newline at end of file + $('#removeBeforeDate').datepicker({ + dateFormat:'MM d, yy', + }); +}); diff --git a/log/templates/index.php b/log/templates/index.php index 1e294091e3f..efd32ca057a 100644 --- a/log/templates/index.php +++ b/log/templates/index.php @@ -14,7 +14,7 @@

Show :  entries per page. - +

@@ -37,4 +37,16 @@ +
+
+

+ Clear log entries before + + + + +

+
+
+ -- cgit v1.2.3 From 5a284afae6afc5060f901837b1adf96cbc2b3e03 Mon Sep 17 00:00:00 2001 From: Alessandro Cosentino Date: Tue, 7 Jun 2011 15:59:53 -0400 Subject: Small modifications to clear logs functions --- log/index.php | 2 -- log/js/log.js | 1 + log/templates/index.php | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/log/index.php b/log/index.php index db476b85605..56bbbadb99d 100644 --- a/log/index.php +++ b/log/index.php @@ -37,8 +37,6 @@ OC_UTIL::addScript( "log", "log" ); $allActions=array('login','logout','read','write','create','delete'); -$removeBeforeDate = 0; - //check for a submitted config if(isset($_POST['save'])){ $selectedActions=array(); diff --git a/log/js/log.js b/log/js/log.js index 5ec75b94f4b..42ae1b4c852 100644 --- a/log/js/log.js +++ b/log/js/log.js @@ -22,3 +22,4 @@ $(document).ready(function() { dateFormat:'MM d, yy', }); }); + diff --git a/log/templates/index.php b/log/templates/index.php index efd32ca057a..5f398b1dbc6 100644 --- a/log/templates/index.php +++ b/log/templates/index.php @@ -37,6 +37,8 @@ + +

@@ -49,4 +51,4 @@

- + -- cgit v1.2.3 From 5425c3d1e919f305930176aef6f531eb2d42f7dd Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 12 Jun 2011 00:50:13 +0200 Subject: fix delTree --- lib/filestorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/filestorage.php b/lib/filestorage.php index 157e44ff298..819ad2e60b3 100644 --- a/lib/filestorage.php +++ b/lib/filestorage.php @@ -377,7 +377,7 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{ if ($item == '.' || $item == '..') continue; if(is_file($dir.'/'.$item)){ if(unlink($dir.'/'.$item)){ - $this->clearFolderSizeCache($path); + $this->clearFolderSizeCache($dir); } }elseif(is_dir($dir.'/'.$item)){ if (!$this->delTree($dirRelative. "/" . $item)){ -- cgit v1.2.3 From 2a5ee9512ee88da53dcba862a32279bdc7096bfb Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 12 Jun 2011 00:57:43 +0200 Subject: allow tear down of filesystem. also fix a bug when chrooting to '/' --- lib/base.php | 7 ++++++- lib/filesystem.php | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/base.php b/lib/base.php index a3ffb6b1a6f..50c41dc0859 100644 --- a/lib/base.php +++ b/lib/base.php @@ -145,7 +145,7 @@ class OC_UTIL { if( $user != "" ){ //if we aren't logged in, there is no use to set up the filesystem //first set up the local "root" storage and the backupstorage if needed - $rootStorage=OC_FILESYSTEM::createStorage('local',array('datadir'=>$CONFIG_DATADIRECTORY)); + $rootStorage=OC_FILESYSTEM::createStorage('local',array('datadir'=>$CONFIG_DATADIRECTORY_ROOT)); // if( OC_CONFIG::getValue( "enablebackup", false )){ // // This creates the Directorys recursively // if(!is_dir( "$CONFIG_BACKUPDIRECTORY/$user/$root" )){ @@ -182,6 +182,11 @@ class OC_UTIL { } } + public static function tearDownFS(){ + OC_FILESYSTEM::tearDown(); + self::$fsSetup=false; + } + /** * get the current installed version of ownCloud * @return array diff --git a/lib/filesystem.php b/lib/filesystem.php index 2b5c3a56b6e..27a937f5e4c 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -67,6 +67,16 @@ class OC_FILESYSTEM{ return array_keys(self::$storageTypes); } + /** + * tear down the filesystem, removing all storage providers + */ + static public function tearDown(){ + foreach(self::$storages as $mountpoint=>$storage){ + unset(self::$storages[$mountpoint]); + } + $fakeRoot=''; + } + /** * create a new storage of a specific type * @param string type @@ -91,8 +101,10 @@ class OC_FILESYSTEM{ * @return bool */ static public function chroot($fakeRoot){ - if($fakeRoot[0]!=='/'){ - $fakeRoot='/'.$fakeRoot; + if(!$fakeRoot==''){ + if($fakeRoot[0]!=='/'){ + $fakeRoot='/'.$fakeRoot; + } } self::$fakeRoot=$fakeRoot; } -- cgit v1.2.3 From bb5a2a917b78fb13657ac9ebbcc067bd02b22126 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 12 Jun 2011 00:58:47 +0200 Subject: test case library and start of filesystem test --- lib/testcase.php | 93 +++++++++++++++++++++++++++++++++++++++++++++++ tests/index.php | 79 ++++++++++++++++++++++++++++++++++++++++ tests/lib/filesystem.php | 31 ++++++++++++++++ tests/templates/index.php | 11 ++++++ 4 files changed, 214 insertions(+) create mode 100644 lib/testcase.php create mode 100644 tests/index.php create mode 100644 tests/lib/filesystem.php create mode 100644 tests/templates/index.php diff --git a/lib/testcase.php b/lib/testcase.php new file mode 100644 index 00000000000..19494dc2f19 --- /dev/null +++ b/lib/testcase.php @@ -0,0 +1,93 @@ +. +* +*/ + + +/** + * base class for unit tests + */ +class OC_TestCase{ + private $tests; //array of all tests in this test case + + public function __construct(){ + $this->tests=array(); + $this->results=array(); + $functions=get_class_methods(get_class($this)); + $exclude=get_class_methods('OC_TestCase'); + foreach($functions as $function){ + if(array_search($function,$exclude)===false){ + $this->tests[]=$function; + } + } + } + + public function getTests(){ + return $this->tests; + } + + /** + * function that gets called before each test + */ + private function setup(){ + } + + /** + * function that gets called after each test + */ + private function tearDown(){ + } + + /** + * check if the result equals the expected result + * @param mixed $expected the expected result + * @param mixed $result the actual result + * @param string $error (optional) the error message to display if the result isn't expected + */ + protected function assertEquals($expected,$result,$error=''){ + if($expected!==$result){ + if($expected===true){ + $expected='true'; + } + if($expected===false){ + $expected='false'; + } + if($result===true){ + $result='true'; + } + if($result===false){ + $result='false'; + } + if($error==''){ + $error="Unexpected result, expected '$expected' but was '$result'"; + } + throw new Exception($error); + } + } + + /** + * fail the test + * @param string $error the error message + */ + protected function fail($error){ + throw new Exception($error); + } +} \ No newline at end of file diff --git a/tests/index.php b/tests/index.php new file mode 100644 index 00000000000..5e0dbc2c838 --- /dev/null +++ b/tests/index.php @@ -0,0 +1,79 @@ +. +* +*/ + + +/** + * run all test cases + */ + $RUNTIME_NOSETUPFS=true; +require_once('../lib/base.php'); +require_once('testcase.php'); +require_once('template.php'); + +$testCases=loadFiles(__DIR__,array('index.php','templates')); + +$testResults=array(); +foreach($testCases as $testCaseClass){ + $testCase=new $testCaseClass(); + $results=array(); + foreach($testCase->getTests() as $test){ + $testCase->setup(); + try{ + $testCase->$test(); + $results[$test]='Ok'; + }catch(Exception $e){ + $results[$test]=$e->getMessage(); + } + $testCase->tearDown(); + } + $testResults[$testCaseClass]=$results; +} + +$tmpl = new OC_TEMPLATE( 'tests', 'index'); +$tmpl->assign('tests',$testResults); +$tmpl->printPage(); + +/** + * recursively load all files in a folder + * @param string $path + * @param array $exclude list of files to exclude + */ +function loadFiles($path,$exclude=false){ + $results=array(); + if(!$exclude){ + $exclude=array(); + } + $dh=opendir($path); + while($file=readdir($dh)){ + if($file!='.' && $file!='..' && array_search($file,$exclude)===false){ + if(is_file($path.'/'.$file)){ + $result=require_once($path.'/'.$file); + $results[]=$result; + }else{ + $subResults=loadFiles($path.'/'.$file); + $results=array_merge($results,$subResults); + } + } + } + return $results; +} +?> \ No newline at end of file diff --git a/tests/lib/filesystem.php b/tests/lib/filesystem.php new file mode 100644 index 00000000000..a1ded471a65 --- /dev/null +++ b/tests/lib/filesystem.php @@ -0,0 +1,31 @@ +assertEquals(true, OC_FILESYSTEM::is_dir('/'),'Root is not a directory'); + } + + public function fileExists(){ + $this->assertEquals(false, OC_FILESYSTEM::file_exists('/dummy'),'Unexpected result with non-existing file'); + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $this->assertEquals(true, OC_FILESYSTEM::file_exists('/dummy'),'Unexpected result with existing file'); + } + + public function mkdir(){ + OC_FILESYSTEM::mkdir('/dummy'); + $this->assertEquals(true, OC_FILESYSTEM::file_exists('/dummy'),'No such file or directory after creating folder'); + $this->assertEquals(true, OC_FILESYSTEM::is_dir('/dummy'),'File created instead of filder'); + } + + public function tearDown(){ + OC_FILESYSTEM::chroot(''); + OC_FILESYSTEM::delTree('/testuser'); + OC_UTIL::tearDownFS(); + } +} +return 'OC_FILEYSYSTEM_Test'; +?> \ No newline at end of file diff --git a/tests/templates/index.php b/tests/templates/index.php new file mode 100644 index 00000000000..b8d3dac0666 --- /dev/null +++ b/tests/templates/index.php @@ -0,0 +1,11 @@ +$results):?> +

+
    + $result):?> +
  • + + + + +
+ \ No newline at end of file -- cgit v1.2.3 From e179ef5547a19153ee285d9866b8bf3af91a8eca Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 12 Jun 2011 02:55:13 +0200 Subject: test cases for OC_FILESYSTEM --- tests/lib/filesystem.php | 202 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 197 insertions(+), 5 deletions(-) diff --git a/tests/lib/filesystem.php b/tests/lib/filesystem.php index a1ded471a65..73b0069519f 100644 --- a/tests/lib/filesystem.php +++ b/tests/lib/filesystem.php @@ -4,6 +4,11 @@ class OC_FILEYSYSTEM_Test extends OC_TestCase public function setup(){ OC_UTIL::setupFS('testuser','testcase'); } + public function tearDown(){ + OC_FILESYSTEM::chroot(''); + OC_FILESYSTEM::delTree('/testuser'); + OC_UTIL::tearDownFS(); + } public function isDir(){ $this->assertEquals(true, OC_FILESYSTEM::is_dir('/'),'Root is not a directory'); @@ -20,11 +25,198 @@ class OC_FILEYSYSTEM_Test extends OC_TestCase $this->assertEquals(true, OC_FILESYSTEM::file_exists('/dummy'),'No such file or directory after creating folder'); $this->assertEquals(true, OC_FILESYSTEM::is_dir('/dummy'),'File created instead of filder'); } - - public function tearDown(){ - OC_FILESYSTEM::chroot(''); - OC_FILESYSTEM::delTree('/testuser'); - OC_UTIL::tearDownFS(); + + public function rmdir(){ + OC_FILESYSTEM::mkdir('/dummy'); + OC_FILESYSTEM::rmdir('/dummy'); + $this->assertEquals(false, OC_FILESYSTEM::file_exists('/dummy'),'Folder still exists after removing'); + } + + public function isFile(){ + $this->assertEquals(false, OC_FILESYSTEM::is_file('/'),'Root is a file'); + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $this->assertEquals(true, OC_FILESYSTEM::is_file('/dummy'),'Created file is not said to be a file'); + } + + public function opendir(){ + OC_FILESYSTEM::file_put_contents('/dummy1','foo'); + OC_FILESYSTEM::file_put_contents('/dummy2','foo'); + $dh=OC_FILESYSTEM::opendir('/'); + if(!$dh){ + $this->fail('Failed to open root'); + } + $dummy1Found=false; + $dummy2Found=false; + while($file=readdir($dh)){ + if($file=='dummy1'){ + $dummy1Found=true; + }elseif($file=='dummy2'){ + $dummy2Found=true; + }elseif($file!='.' and $file!='..'){ + $this->fail('Unexpected filename when reading opened dir'); + } + } + $this->assertEquals(true,$dummy1Found,'Not all files found when reading opened dir'); + $this->assertEquals(true,$dummy2Found,'Not all files found when reading opened dir'); + } + + public function filesize(){ + OC_FILESYSTEM::file_put_contents('/dummy','1234567890'); + $this->assertEquals(10, OC_FILESYSTEM::filesize('/dummy'),'Unexpected filesize'); + } + + public function stat(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $time=time(); + $stat=OC_FILESYSTEM::stat('/dummy'); + $this->assertEquals(true,abs($time-$stat['atime'])<1,'Unexpected access time');//there can be small difference between those values due to running time + $this->assertEquals(true,abs($time-$stat['ctime'])<1,'Unexpected creation time'); + $this->assertEquals(true,abs($time-$stat['mtime'])<1,'Unexpected modified time'); + $this->assertEquals(3,$stat['size'],'Unexpected filesize'); + } + + public function filetype(){ + OC_FILESYSTEM::file_put_contents('/dummyFile','foo'); + OC_FILESYSTEM::mkdir('/dummyFolder'); + $this->assertEquals('file', OC_FILESYSTEM::filetype('/dummyFile'),'Unexpected filetype of file'); + $this->assertEquals('dir', OC_FILESYSTEM::filetype('/dummyFolder'),'Unexpected filetype of folder'); + } + + public function readfile(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + ob_clean(); + ob_start(); + OC_FILESYSTEM::readfile('/dummy'); + $this->assertEquals('foo', ob_get_contents(),'Unexpected output of readfile'); + ob_end_clean(); + } + + public function isReadable(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $this->assertEquals(true, OC_FILESYSTEM::is_readable('/dummy'),'Can\'t read created file'); + } + + public function isWritable(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $this->assertEquals(true, OC_FILESYSTEM::is_writeable('/dummy'),'Can\'t write created file'); + } + + public function fileatime(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $time=time(); + $this->assertEquals(true,abs($time-OC_FILESYSTEM::fileatime('/dummy'))<1,'Unexpected access time');//there can be small difference between those values due to running time + } + + public function filectime(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $time=time(); + $this->assertEquals(true,abs($time-OC_FILESYSTEM::filectime('/dummy'))<1,'Unexpected creation time');//there can be small difference between those values due to running time + } + + public function filemtime(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $time=time(); + $this->assertEquals(true,abs($time-OC_FILESYSTEM::filemtime('/dummy'))<1,'Unexpected modified time');//there can be small difference between those values due to running time + } + + public function fileGetContents(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $this->assertEquals('foo', OC_FILESYSTEM::file_get_contents('/dummy'),'Unexpected content of file'); + } + + public function unlink(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + OC_FILESYSTEM::unlink('/dummy'); + $this->assertEquals(false, OC_FILESYSTEM::file_exists('/dummy'),'File still exists after deletion'); + } + + public function rename(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + OC_FILESYSTEM::rename('/dummy','/bar'); + $this->assertEquals(true, OC_FILESYSTEM::file_exists('/bar'),'New file doesnt exists after moving'); + $this->assertEquals(false, OC_FILESYSTEM::file_exists('/dummy'),'Old file still exists after moving'); + $this->assertEquals('foo', OC_FILESYSTEM::file_get_contents('/bar'),'Unexpected content of file after moving'); + } + + public function copy(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + OC_FILESYSTEM::copy('/dummy','/bar'); + $this->assertEquals(true, OC_FILESYSTEM::file_exists('/bar'),'New file doesnt exists after copying'); + $this->assertEquals(true, OC_FILESYSTEM::file_exists('/dummy'),'Old file doesnt exists after copying'); + $this->assertEquals('foo', OC_FILESYSTEM::file_get_contents('/bar'),'Unexpected content of file after copying'); + } + + public function fopen(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $fh=OC_FILESYSTEM::fopen('/dummy','r'); + if(!$fh){ + $this->fail('Cant open file for reading'); + } + $content=fread($fh,3); + $this->assertEquals('foo', $content,'Unexpected content of file'); + fclose($fh); + $fh=OC_FILESYSTEM::fopen('/dummy','a'); + fwrite($fh,'bar',3); + fclose($fh); + $this->assertEquals('foobar', OC_FILESYSTEM::file_get_contents('/dummy'),'Unexpected content of file after appending'); + $fh=OC_FILESYSTEM::fopen('/dummy','w'); + fwrite($fh,'bar',3); + fclose($fh); + $this->assertEquals('bar', OC_FILESYSTEM::file_get_contents('/dummy'),'Unexpected content of file after writing'); + } + + public function toTmpFile(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $tmp=OC_FILESYSTEM::toTmpFile('/dummy'); + $this->assertEquals('foo', file_get_contents($tmp),'Unexpected content of temporary file'); + unlink($tmp); + } + + public function fromTmpFile(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $tmp=OC_FILESYSTEM::toTmpFile('/dummy'); + OC_FILESYSTEM::fromTmpFile($tmp,'/bar'); + $this->assertEquals('foo', OC_FILESYSTEM::file_get_contents('/bar'),'Unexpected content of new file'); + $this->assertEquals(false, file_exists($tmp),'Temporary file still exists'); + } + + public function getMimeType(){ + OC_FILESYSTEM::file_put_contents('/dummy','some plain text'); + $this->assertEquals('text/plain', OC_FILESYSTEM::getMimeType('/dummy'),'Unexpected mimetype of pain text file'); + OC_FILESYSTEM::file_put_contents('/dummy',"\n"); + $this->assertEquals('application/xml', OC_FILESYSTEM::getMimeType('/dummy'),'Unexpected mimetype of xml file'); + } + + public function delTree(){ + OC_FILESYSTEM::mkdir('/dummy'); + OC_FILESYSTEM::file_put_contents('/dummy/bar','foo'); + OC_FILESYSTEM::delTree('/dummy'); + $this->assertEquals(false, OC_FILESYSTEM::file_exists('/dummy/bar'),'File in deleted folder still exists'); + $this->assertEquals(false, OC_FILESYSTEM::file_exists('/dummy'),'Deleted folder still exists'); + } + + public function getTree(){ + OC_FILESYSTEM::mkdir('/dummy'); + OC_FILESYSTEM::file_put_contents('/dummy/bar','foo'); + $expected=array('/dummy','/dummy/bar'); + $this->assertEquals($expected, OC_FILESYSTEM::getTree('/dummy'),'Unexpected filelist returned'); + } + + public function hash(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $this->assertEquals(md5('foo'), OC_FILESYSTEM::hash('md5','/dummy'),'Unexpected md5 hash of file'); + } + + public function freeSpace(){ + $oldSpace=OC_FILESYSTEM::free_space('/'); + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $newSpace=OC_FILESYSTEM::free_space('/'); + $this->assertEquals(true, $newSpace<$oldSpace,'free space not smaller after creating a non empty file'); + } + + public function search(){ + OC_FILESYSTEM::file_put_contents('/dummy','foo'); + $this->assertEquals(array('/dummy'),OC_FILESYSTEM::search('my'),'unexpected file list after search'); } } return 'OC_FILEYSYSTEM_Test'; -- cgit v1.2.3 From 964b51879eaffed13287a1e450e6f37171be2e62 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 12 Jun 2011 17:51:31 +0200 Subject: add option to remove tables install from database structure --- lib/database.php | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/lib/database.php b/lib/database.php index 728e7359040..0f0950d05ad 100644 --- a/lib/database.php +++ b/lib/database.php @@ -321,5 +321,43 @@ class OC_DB { return $query; } + + /** + * @brief drop a table + * @param string $tableNamme the table to drop + */ + public static function dropTable($tableName){ + self::connect(); + self::$DBConnection->loadModule('Manager'); + self::$DBConnection->dropTable($tableName); + } + + /** + * remove all tables defined in a database structure xml file + * @param string $file the xml file describing the tables + */ + public static function removeDBStructure($file){ + $CONFIG_DBNAME = OC_CONFIG::getValue( "dbname", "owncloud" ); + $CONFIG_DBTABLEPREFIX = OC_CONFIG::getValue( "dbtableprefix", "oc_" ); + self::connectScheme(); + + // read file + $content = file_get_contents( $file ); + + // Make changes and save them to a temporary file + $file2 = tempnam( sys_get_temp_dir(), 'oc_db_scheme_' ); + $content = str_replace( '*dbname*', $CONFIG_DBNAME, $content ); + $content = str_replace( '*dbprefix*', $CONFIG_DBTABLEPREFIX, $content ); + file_put_contents( $file2, $content ); + + // get the tables + $definition = self::$schema->parseDatabaseDefinitionFile( $file2 ); + + // Delete our temporary file + unlink( $file2 ); + foreach($definition['tables'] as $name=>$table){ + self::dropTable($name); + } + } } ?> \ No newline at end of file -- cgit v1.2.3 From 600219c8c0bec3f3998e0170dd3363ac6cc7824e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 13 Jun 2011 04:05:41 +0200 Subject: sqlite3 driver for mdb2 the only problem that I found with it so far is that it gives a database locked error on login, the rest seems to work fine but more testing is required. --- lib/MDB2/Driver/Datatype/sqlite3.php | 412 ++++++++++ lib/MDB2/Driver/Function/sqlite3.php | 161 ++++ lib/MDB2/Driver/Manager/sqlite3.php | 1364 ++++++++++++++++++++++++++++++++++ lib/MDB2/Driver/Native/sqlite3.php | 58 ++ lib/MDB2/Driver/Reverse/sqlite3.php | 607 +++++++++++++++ lib/MDB2/Driver/sqlite3.php | 1024 +++++++++++++++++++++++++ 6 files changed, 3626 insertions(+) create mode 100644 lib/MDB2/Driver/Datatype/sqlite3.php create mode 100644 lib/MDB2/Driver/Function/sqlite3.php create mode 100644 lib/MDB2/Driver/Manager/sqlite3.php create mode 100644 lib/MDB2/Driver/Native/sqlite3.php create mode 100644 lib/MDB2/Driver/Reverse/sqlite3.php create mode 100644 lib/MDB2/Driver/sqlite3.php diff --git a/lib/MDB2/Driver/Datatype/sqlite3.php b/lib/MDB2/Driver/Datatype/sqlite3.php new file mode 100644 index 00000000000..378d5540cbe --- /dev/null +++ b/lib/MDB2/Driver/Datatype/sqlite3.php @@ -0,0 +1,412 @@ + + */ +class MDB2_Driver_Datatype_sqlite3 extends MDB2_Driver_Datatype_Common +{ + // {{{ _getCollationFieldDeclaration() + + /** + * Obtain DBMS specific SQL code portion needed to set the COLLATION + * of a field declaration to be used in statements like CREATE TABLE. + * + * @param string $collation name of the collation + * + * @return string DBMS specific SQL code portion needed to set the COLLATION + * of a field declaration. + */ + function _getCollationFieldDeclaration($collation) + { + return 'COLLATE '.$collation; + } + + // }}} + // {{{ getTypeDeclaration() + + /** + * Obtain DBMS specific SQL code portion needed to declare an text type + * field to be used in statements like CREATE TABLE. + * + * @param array $field associative array with the name of the properties + * of the field being declared as array indexes. Currently, the types + * of supported field properties are as follows: + * + * length + * Integer value that determines the maximum length of the text + * field. If this argument is missing the field should be + * declared to have the longest length allowed by the DBMS. + * + * default + * Text value to be used as default for this field. + * + * notnull + * Boolean flag that indicates whether this field is constrained + * to not be set to null. + * @return string DBMS specific SQL code portion that should be used to + * declare the specified field. + * @access public + */ + function getTypeDeclaration($field) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + switch ($field['type']) { + case 'text': + $length = !empty($field['length']) + ? $field['length'] : false; + $fixed = !empty($field['fixed']) ? $field['fixed'] : false; + return $fixed ? ($length ? 'CHAR('.$length.')' : 'CHAR('.$db->options['default_text_field_length'].')') + : ($length ? 'VARCHAR('.$length.')' : 'TEXT'); + case 'clob': + if (!empty($field['length'])) { + $length = $field['length']; + if ($length <= 255) { + return 'TINYTEXT'; + } elseif ($length <= 65532) { + return 'TEXT'; + } elseif ($length <= 16777215) { + return 'MEDIUMTEXT'; + } + } + return 'LONGTEXT'; + case 'blob': + if (!empty($field['length'])) { + $length = $field['length']; + if ($length <= 255) { + return 'TINYBLOB'; + } elseif ($length <= 65532) { + return 'BLOB'; + } elseif ($length <= 16777215) { + return 'MEDIUMBLOB'; + } + } + return 'LONGBLOB'; + case 'integer': + if (!empty($field['length'])) { + $length = $field['length']; + if ($length <= 2) { + return 'SMALLINT'; + } elseif ($length == 3 || $length == 4) { + return 'INTEGER'; + } elseif ($length > 4) { + return 'BIGINT'; + } + } + return 'INTEGER'; + case 'boolean': + return 'BOOLEAN'; + case 'date': + return 'DATE'; + case 'time': + return 'TIME'; + case 'timestamp': + return 'DATETIME'; + case 'float': + return 'DOUBLE'.($db->options['fixed_float'] ? '('. + ($db->options['fixed_float']+2).','.$db->options['fixed_float'].')' : ''); + case 'decimal': + $length = !empty($field['length']) ? $field['length'] : 18; + $scale = !empty($field['scale']) ? $field['scale'] : $db->options['decimal_places']; + return 'DECIMAL('.$length.','.$scale.')'; + } + return ''; + } + + // }}} + // {{{ _getIntegerDeclaration() + + /** + * Obtain DBMS specific SQL code portion needed to declare an integer type + * field to be used in statements like CREATE TABLE. + * + * @param string $name name the field to be declared. + * @param string $field associative array with the name of the properties + * of the field being declared as array indexes. + * Currently, the types of supported field + * properties are as follows: + * + * unsigned + * Boolean flag that indicates whether the field + * should be declared as unsigned integer if + * possible. + * + * default + * Integer value to be used as default for this + * field. + * + * notnull + * Boolean flag that indicates whether this field is + * constrained to not be set to null. + * @return string DBMS specific SQL code portion that should be used to + * declare the specified field. + * @access protected + */ + function _getIntegerDeclaration($name, $field) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $default = $autoinc = ''; + if (!empty($field['autoincrement'])) { + $autoinc = ' PRIMARY KEY AUTOINCREMENT'; + } elseif (array_key_exists('default', $field)) { + if ($field['default'] === '') { + $field['default'] = empty($field['notnull']) ? null : 0; + } + $default = ' DEFAULT '.$this->quote($field['default'], 'integer'); + } + + $notnull = empty($field['notnull']) ? '' : ' NOT NULL'; + $unsigned = empty($field['unsigned']) ? '' : ' UNSIGNED'; + $name = $db->quoteIdentifier($name, true); + if($autoinc){ + return $name.' '.$this->getTypeDeclaration($field).$autoinc; + }else{ + return $name.' '.$this->getTypeDeclaration($field).$unsigned.$default.$notnull.$autoinc; + } + } + + // }}} + // {{{ matchPattern() + + /** + * build a pattern matching string + * + * @access public + * + * @param array $pattern even keys are strings, odd are patterns (% and _) + * @param string $operator optional pattern operator (LIKE, ILIKE and maybe others in the future) + * @param string $field optional field name that is being matched against + * (might be required when emulating ILIKE) + * + * @return string SQL pattern + */ + function matchPattern($pattern, $operator = null, $field = null) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $match = ''; + if (!is_null($operator)) { + $field = is_null($field) ? '' : $field.' '; + $operator = strtoupper($operator); + switch ($operator) { + // case insensitive + case 'ILIKE': + $match = $field.'LIKE '; + break; + // case sensitive + case 'LIKE': + $match = $field.'LIKE '; + break; + default: + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'not a supported operator type:'. $operator, __FUNCTION__); + } + } + $match.= "'"; + foreach ($pattern as $key => $value) { + if ($key % 2) { + $match.= $value; + } else { + $match.= $db->escapePattern($db->escape($value)); + } + } + $match.= "'"; + $match.= $this->patternEscapeString(); + return $match; + } + + // }}} + // {{{ _mapNativeDatatype() + + /** + * Maps a native array description of a field to a MDB2 datatype and length + * + * @param array $field native field description + * @return array containing the various possible types, length, sign, fixed + * @access public + */ + function _mapNativeDatatype($field) + { + $db_type = strtolower($field['type']); + $length = !empty($field['length']) ? $field['length'] : null; + $unsigned = !empty($field['unsigned']) ? $field['unsigned'] : null; + $fixed = null; + $type = array(); + switch ($db_type) { + case 'boolean': + $type[] = 'boolean'; + break; + case 'tinyint': + $type[] = 'integer'; + $type[] = 'boolean'; + if (preg_match('/^(is|has)/', $field['name'])) { + $type = array_reverse($type); + } + $unsigned = preg_match('/ unsigned/i', $field['type']); + $length = 1; + break; + case 'smallint': + $type[] = 'integer'; + $unsigned = preg_match('/ unsigned/i', $field['type']); + $length = 2; + break; + case 'mediumint': + $type[] = 'integer'; + $unsigned = preg_match('/ unsigned/i', $field['type']); + $length = 3; + break; + case 'int': + case 'integer': + case 'serial': + $type[] = 'integer'; + $unsigned = preg_match('/ unsigned/i', $field['type']); + $length = 4; + break; + case 'bigint': + case 'bigserial': + $type[] = 'integer'; + $unsigned = preg_match('/ unsigned/i', $field['type']); + $length = 8; + break; + case 'clob': + $type[] = 'clob'; + $fixed = false; + break; + case 'tinytext': + case 'mediumtext': + case 'longtext': + case 'text': + case 'varchar': + case 'varchar2': + $fixed = false; + case 'char': + $type[] = 'text'; + if ($length == '1') { + $type[] = 'boolean'; + if (preg_match('/^(is|has)/', $field['name'])) { + $type = array_reverse($type); + } + } elseif (strstr($db_type, 'text')) { + $type[] = 'clob'; + $type = array_reverse($type); + } + if ($fixed !== false) { + $fixed = true; + } + break; + case 'date': + $type[] = 'date'; + $length = null; + break; + case 'datetime': + case 'timestamp': + $type[] = 'timestamp'; + $length = null; + break; + case 'time': + $type[] = 'time'; + $length = null; + break; + case 'float': + case 'double': + case 'real': + $type[] = 'float'; + break; + case 'decimal': + case 'numeric': + $type[] = 'decimal'; + $length = $length.','.$field['decimal']; + break; + case 'tinyblob': + case 'mediumblob': + case 'longblob': + case 'blob': + $type[] = 'blob'; + $length = null; + break; + case 'year': + $type[] = 'integer'; + $type[] = 'date'; + $length = null; + break; + default: + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'unknown database attribute type: '.$db_type, __FUNCTION__); + } + + if ((int)$length <= 0) { + $length = null; + } + + return array($type, $length, $unsigned, $fixed); + } + + // }}} +} + +?> \ No newline at end of file diff --git a/lib/MDB2/Driver/Function/sqlite3.php b/lib/MDB2/Driver/Function/sqlite3.php new file mode 100644 index 00000000000..0d6b329f0ad --- /dev/null +++ b/lib/MDB2/Driver/Function/sqlite3.php @@ -0,0 +1,161 @@ + | +// +----------------------------------------------------------------------+ +// +// + +require_once('MDB2/Driver/Function/Common.php'); + +/** + * MDB2 SQLite driver for the function modules + * + * @package MDB2 + * @category Database + * @author Lukas Smith + */ +class MDB2_Driver_Function_sqlite3 extends MDB2_Driver_Function_Common +{ + // {{{ constructor + + /** + * Constructor + */ + function __construct($db_index) + { + parent::__construct($db_index); + // create all sorts of UDFs + } + + // {{{ now() + + /** + * Return string to call a variable with the current timestamp inside an SQL statement + * There are three special variables for current date and time. + * + * @return string to call a variable with the current timestamp + * @access public + */ + function now($type = 'timestamp') + { + switch ($type) { + case 'time': + return 'time(\'now\')'; + case 'date': + return 'date(\'now\')'; + case 'timestamp': + default: + return 'datetime(\'now\')'; + } + } + + // }}} + // {{{ unixtimestamp() + + /** + * return string to call a function to get the unix timestamp from a iso timestamp + * + * @param string $expression + * + * @return string to call a variable with the timestamp + * @access public + */ + function unixtimestamp($expression) + { + return 'strftime("%s",'. $expression.', "utc")'; + } + + // }}} + // {{{ substring() + + /** + * return string to call a function to get a substring inside an SQL statement + * + * @return string to call a function to get a substring + * @access public + */ + function substring($value, $position = 1, $length = null) + { + if (!is_null($length)) { + return "substr($value,$position,$length)"; + } + return "substr($value,$position,length($value))"; + } + + // }}} + // {{{ random() + + /** + * return string to call a function to get random value inside an SQL statement + * + * @return return string to generate float between 0 and 1 + * @access public + */ + function random() + { + return '((RANDOM()+2147483648)/4294967296)'; + } + + // }}} + // {{{ replace() + + /** + * return string to call a function to get a replacement inside an SQL statement. + * + * @return string to call a function to get a replace + * @access public + */ + function replace($str, $from_str, $to_str) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $error =& $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'method not implemented', __FUNCTION__); + return $error; + } + + // }}} +} +?> diff --git a/lib/MDB2/Driver/Manager/sqlite3.php b/lib/MDB2/Driver/Manager/sqlite3.php new file mode 100644 index 00000000000..7096126a523 --- /dev/null +++ b/lib/MDB2/Driver/Manager/sqlite3.php @@ -0,0 +1,1364 @@ + | +// +----------------------------------------------------------------------+ +// +// + +require_once('MDB2/Driver/Manager/Common.php'); + +/** + * MDB2 SQLite driver for the management modules + * + * @package MDB2 + * @category Database + * @author Lukas Smith + * @author Lorenzo Alberton + */ +class MDB2_Driver_Manager_sqlite3 extends MDB2_Driver_Manager_Common +{ + // {{{ createDatabase() + + /** + * create a new database + * + * @param string $name name of the database that should be created + * @param array $options array with charset info + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function createDatabase($name, $options = array()) + { + global $SERVERROOT; + $datadir=OC_CONFIG::getValue( "datadirectory", "$SERVERROOT/data" ); + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $database_file = $db->_getDatabaseFile($name); + if (file_exists($database_file)) { + return $db->raiseError(MDB2_ERROR_ALREADY_EXISTS, null, null, + 'database already exists', __FUNCTION__); + } + $php_errormsg = ''; + $database_file="$datadir/$database_file.db"; + $handle=new SQLite3($database_file); + if (!$handle) { + return $db->raiseError(MDB2_ERROR_CANNOT_CREATE, null, null, + (isset($php_errormsg) ? $php_errormsg : 'could not create the database file'), __FUNCTION__); + } + //sqlite doesn't support the latin1 we use +// if (!empty($options['charset'])) { +// $query = 'PRAGMA encoding = ' . $db->quote($options['charset'], 'text'); +// $handle->exec($query); +// } + $handle->close(); + return MDB2_OK; + } + + // }}} + // {{{ dropDatabase() + + /** + * drop an existing database + * + * @param string $name name of the database that should be dropped + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function dropDatabase($name) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $database_file = $db->_getDatabaseFile($name); + if (!@file_exists($database_file)) { + return $db->raiseError(MDB2_ERROR_CANNOT_DROP, null, null, + 'database does not exist', __FUNCTION__); + } + $result = @unlink($database_file); + if (!$result) { + return $db->raiseError(MDB2_ERROR_CANNOT_DROP, null, null, + (isset($php_errormsg) ? $php_errormsg : 'could not remove the database file'), __FUNCTION__); + } + return MDB2_OK; + } + + // }}} + // {{{ _getAdvancedFKOptions() + + /** + * Return the FOREIGN KEY query section dealing with non-standard options + * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... + * + * @param array $definition + * @return string + * @access protected + */ + function _getAdvancedFKOptions($definition) + { + $query = ''; + if (!empty($definition['match'])) { + $query .= ' MATCH '.$definition['match']; + } + if (!empty($definition['onupdate']) && (strtoupper($definition['onupdate']) != 'NO ACTION')) { + $query .= ' ON UPDATE '.$definition['onupdate']; + } + if (!empty($definition['ondelete']) && (strtoupper($definition['ondelete']) != 'NO ACTION')) { + $query .= ' ON DELETE '.$definition['ondelete']; + } + if (!empty($definition['deferrable'])) { + $query .= ' DEFERRABLE'; + } else { + $query .= ' NOT DEFERRABLE'; + } + if (!empty($definition['initiallydeferred'])) { + $query .= ' INITIALLY DEFERRED'; + } else { + $query .= ' INITIALLY IMMEDIATE'; + } + return $query; + } + + // }}} + // {{{ _getCreateTableQuery() + + /** + * Create a basic SQL query for a new table creation + * @param string $name Name of the database that should be created + * @param array $fields Associative array that contains the definition of each field of the new table + * @param array $options An associative array of table options + * @return mixed string (the SQL query) on success, a MDB2 error on failure + * @see createTable() + */ + function _getCreateTableQuery($name, $fields, $options = array()) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + if (!$name) { + return $db->raiseError(MDB2_ERROR_CANNOT_CREATE, null, null, + 'no valid table name specified', __FUNCTION__); + } + if (empty($fields)) { + return $db->raiseError(MDB2_ERROR_CANNOT_CREATE, null, null, + 'no fields specified for table "'.$name.'"', __FUNCTION__); + } + $query_fields = $this->getFieldDeclarationList($fields); + if (PEAR::isError($query_fields)) { + return $query_fields; + } + if (!empty($options['primary'])) { + $query_fields.= ', PRIMARY KEY ('.implode(', ', array_keys($options['primary'])).')'; + } + if (!empty($options['foreign_keys'])) { + foreach ($options['foreign_keys'] as $fkname => $fkdef) { + if (empty($fkdef)) { + continue; + } + $query_fields.= ', CONSTRAINT '.$fkname.' FOREIGN KEY ('.implode(', ', array_keys($fkdef['fields'])).')'; + $query_fields.= ' REFERENCES '.$fkdef['references']['table'].' ('.implode(', ', array_keys($fkdef['references']['fields'])).')'; + $query_fields.= $this->_getAdvancedFKOptions($fkdef); + } + } + + $name = $db->quoteIdentifier($name, true); + $result = 'CREATE '; + if (!empty($options['temporary'])) { + $result .= $this->_getTemporaryTableQuery(); + } + $result .= " TABLE $name ($query_fields)"; + return $result; + } + + // }}} + // {{{ createTable() + + /** + * create a new table + * + * @param string $name Name of the database that should be created + * @param array $fields Associative array that contains the definition + * of each field of the new table + * @param array $options An associative array of table options + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function createTable($name, $fields, $options = array()) + { + $result = parent::createTable($name, $fields, $options); + if (PEAR::isError($result)) { + return $result; + } + // create triggers to enforce FOREIGN KEY constraints + if (!empty($options['foreign_keys'])) { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + foreach ($options['foreign_keys'] as $fkname => $fkdef) { + if (empty($fkdef)) { + continue; + } + //set actions to default if not set + $fkdef['onupdate'] = empty($fkdef['onupdate']) ? $db->options['default_fk_action_onupdate'] : strtoupper($fkdef['onupdate']); + $fkdef['ondelete'] = empty($fkdef['ondelete']) ? $db->options['default_fk_action_ondelete'] : strtoupper($fkdef['ondelete']); + + $trigger_names = array( + 'insert' => $fkname.'_insert_trg', + 'update' => $fkname.'_update_trg', + 'pk_update' => $fkname.'_pk_update_trg', + 'pk_delete' => $fkname.'_pk_delete_trg', + ); + + //create the [insert|update] triggers on the FK table + $table_fields = array_keys($fkdef['fields']); + $referenced_fields = array_keys($fkdef['references']['fields']); + $query = 'CREATE TRIGGER %s BEFORE %s ON '.$name + .' FOR EACH ROW BEGIN' + .' SELECT RAISE(ROLLBACK, \'%s on table "'.$name.'" violates FOREIGN KEY constraint "'.$fkname.'"\')' + .' WHERE (SELECT '; + $aliased_fields = array(); + foreach ($referenced_fields as $field) { + $aliased_fields[] = $fkdef['references']['table'] .'.'.$field .' AS '.$field; + } + $query .= implode(',', $aliased_fields) + .' FROM '.$fkdef['references']['table'] + .' WHERE '; + $conditions = array(); + for ($i=0; $iexec(sprintf($query, $trigger_names['insert'], 'INSERT', 'insert')); + if (PEAR::isError($result)) { + return $result; + } + + $result = $db->exec(sprintf($query, $trigger_names['update'], 'UPDATE', 'update')); + if (PEAR::isError($result)) { + return $result; + } + + //create the ON [UPDATE|DELETE] triggers on the primary table + $restrict_action = 'SELECT RAISE(ROLLBACK, \'%s on table "'.$name.'" violates FOREIGN KEY constraint "'.$fkname.'"\')' + .' WHERE (SELECT '; + $aliased_fields = array(); + foreach ($table_fields as $field) { + $aliased_fields[] = $name .'.'.$field .' AS '.$field; + } + $restrict_action .= implode(',', $aliased_fields) + .' FROM '.$name + .' WHERE '; + $conditions = array(); + $new_values = array(); + $null_values = array(); + for ($i=0; $i OLD.'.$referenced_fields[$i]; + } + $restrict_action .= implode(' AND ', $conditions).') IS NOT NULL' + .' AND (' .implode(' OR ', $conditions2) .')'; + + $cascade_action_update = 'UPDATE '.$name.' SET '.implode(', ', $new_values) .' WHERE '.implode(' AND ', $conditions); + $cascade_action_delete = 'DELETE FROM '.$name.' WHERE '.implode(' AND ', $conditions); + $setnull_action = 'UPDATE '.$name.' SET '.implode(', ', $null_values).' WHERE '.implode(' AND ', $conditions); + + if ('SET DEFAULT' == $fkdef['onupdate'] || 'SET DEFAULT' == $fkdef['ondelete']) { + $db->loadModule('Reverse', null, true); + $default_values = array(); + foreach ($table_fields as $table_field) { + $field_definition = $db->reverse->getTableFieldDefinition($name, $field); + if (PEAR::isError($field_definition)) { + return $field_definition; + } + $default_values[] = $table_field .' = '. $field_definition[0]['default']; + } + $setdefault_action = 'UPDATE '.$name.' SET '.implode(', ', $default_values).' WHERE '.implode(' AND ', $conditions); + } + + $query = 'CREATE TRIGGER %s' + .' %s ON '.$fkdef['references']['table'] + .' FOR EACH ROW BEGIN '; + + if ('CASCADE' == $fkdef['onupdate']) { + $sql_update = sprintf($query, $trigger_names['pk_update'], 'AFTER UPDATE', 'update') . $cascade_action_update. '; END;'; + } elseif ('SET NULL' == $fkdef['onupdate']) { + $sql_update = sprintf($query, $trigger_names['pk_update'], 'BEFORE UPDATE', 'update') . $setnull_action. '; END;'; + } elseif ('SET DEFAULT' == $fkdef['onupdate']) { + $sql_update = sprintf($query, $trigger_names['pk_update'], 'BEFORE UPDATE', 'update') . $setdefault_action. '; END;'; + } elseif ('NO ACTION' == $fkdef['onupdate']) { + $sql_update = sprintf($query.$restrict_action, $trigger_names['pk_update'], 'AFTER UPDATE', 'update') . '; END;'; + } elseif ('RESTRICT' == $fkdef['onupdate']) { + $sql_update = sprintf($query.$restrict_action, $trigger_names['pk_update'], 'BEFORE UPDATE', 'update') . '; END;'; + } + if ('CASCADE' == $fkdef['ondelete']) { + $sql_delete = sprintf($query, $trigger_names['pk_delete'], 'AFTER DELETE', 'delete') . $cascade_action_delete. '; END;'; + } elseif ('SET NULL' == $fkdef['ondelete']) { + $sql_delete = sprintf($query, $trigger_names['pk_delete'], 'BEFORE DELETE', 'delete') . $setnull_action. '; END;'; + } elseif ('SET DEFAULT' == $fkdef['ondelete']) { + $sql_delete = sprintf($query, $trigger_names['pk_delete'], 'BEFORE DELETE', 'delete') . $setdefault_action. '; END;'; + } elseif ('NO ACTION' == $fkdef['ondelete']) { + $sql_delete = sprintf($query.$restrict_action, $trigger_names['pk_delete'], 'AFTER DELETE', 'delete') . '; END;'; + } elseif ('RESTRICT' == $fkdef['ondelete']) { + $sql_delete = sprintf($query.$restrict_action, $trigger_names['pk_delete'], 'BEFORE DELETE', 'delete') . '; END;'; + } + + if (PEAR::isError($result)) { + return $result; + } + $result = $db->exec($sql_delete); + if (PEAR::isError($result)) { + return $result; + } + $result = $db->exec($sql_update); + if (PEAR::isError($result)) { + return $result; + } + } + } + if (PEAR::isError($result)) { + return $result; + } + return MDB2_OK; + } + + // }}} + // {{{ dropTable() + + /** + * drop an existing table + * + * @param string $name name of the table that should be dropped + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function dropTable($name) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + //delete the triggers associated to existing FK constraints + $constraints = $this->listTableConstraints($name); + if (!PEAR::isError($constraints) && !empty($constraints)) { + $db->loadModule('Reverse', null, true); + foreach ($constraints as $constraint) { + $definition = $db->reverse->getTableConstraintDefinition($name, $constraint); + if (!PEAR::isError($definition) && !empty($definition['foreign'])) { + $result = $this->_dropFKTriggers($name, $constraint, $definition['references']['table']); + if (PEAR::isError($result)) { + return $result; + } + } + } + } + + $name = $db->quoteIdentifier($name, true); + return $db->exec("DROP TABLE $name"); + } + + // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = 'VACUUM'; + if (!empty($table)) { + $query .= ' '.$db->quoteIdentifier($table, true); + } + return $db->exec($query); + } + + // }}} + // {{{ alterTable() + + /** + * alter an existing table + * + * @param string $name name of the table that is intended to be changed. + * @param array $changes associative array that contains the details of each type + * of change that is intended to be performed. The types of + * changes that are currently supported are defined as follows: + * + * name + * + * New name for the table. + * + * add + * + * Associative array with the names of fields to be added as + * indexes of the array. The value of each entry of the array + * should be set to another associative array with the properties + * of the fields to be added. The properties of the fields should + * be the same as defined by the MDB2 parser. + * + * + * remove + * + * Associative array with the names of fields to be removed as indexes + * of the array. Currently the values assigned to each entry are ignored. + * An empty array should be used for future compatibility. + * + * rename + * + * Associative array with the names of fields to be renamed as indexes + * of the array. The value of each entry of the array should be set to + * another associative array with the entry named name with the new + * field name and the entry named Declaration that is expected to contain + * the portion of the field declaration already in DBMS specific SQL code + * as it is used in the CREATE TABLE statement. + * + * change + * + * Associative array with the names of the fields to be changed as indexes + * of the array. Keep in mind that if it is intended to change either the + * name of a field and any other properties, the change array entries + * should have the new names of the fields as array indexes. + * + * The value of each entry of the array should be set to another associative + * array with the properties of the fields to that are meant to be changed as + * array entries. These entries should be assigned to the new values of the + * respective properties. The properties of the fields should be the same + * as defined by the MDB2 parser. + * + * Example + * array( + * 'name' => 'userlist', + * 'add' => array( + * 'quota' => array( + * 'type' => 'integer', + * 'unsigned' => 1 + * ) + * ), + * 'remove' => array( + * 'file_limit' => array(), + * 'time_limit' => array() + * ), + * 'change' => array( + * 'name' => array( + * 'length' => '20', + * 'definition' => array( + * 'type' => 'text', + * 'length' => 20, + * ), + * ) + * ), + * 'rename' => array( + * 'sex' => array( + * 'name' => 'gender', + * 'definition' => array( + * 'type' => 'text', + * 'length' => 1, + * 'default' => 'M', + * ), + * ) + * ) + * ) + * + * @param boolean $check indicates whether the function should just check if the DBMS driver + * can perform the requested table alterations if the value is true or + * actually perform them otherwise. + * @access public + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + */ + function alterTable($name, $changes, $check, $options = array()) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + foreach ($changes as $change_name => $change) { + switch ($change_name) { + case 'add': + case 'remove': + case 'change': + case 'name': + case 'rename': + break; + default: + return $db->raiseError(MDB2_ERROR_CANNOT_ALTER, null, null, + 'change type "'.$change_name.'" not yet supported', __FUNCTION__); + } + } + + if ($check) { + return MDB2_OK; + } + + $db->loadModule('Reverse', null, true); + + // actually sqlite 2.x supports no ALTER TABLE at all .. so we emulate it + $fields = $db->manager->listTableFields($name); + if (PEAR::isError($fields)) { + return $fields; + } + + $fields = array_flip($fields); + foreach ($fields as $field => $value) { + $definition = $db->reverse->getTableFieldDefinition($name, $field); + if (PEAR::isError($definition)) { + return $definition; + } + $fields[$field] = $definition[0]; + } + + $indexes = $db->manager->listTableIndexes($name); + if (PEAR::isError($indexes)) { + return $indexes; + } + + $indexes = array_flip($indexes); + foreach ($indexes as $index => $value) { + $definition = $db->reverse->getTableIndexDefinition($name, $index); + if (PEAR::isError($definition)) { + return $definition; + } + $indexes[$index] = $definition; + } + + $constraints = $db->manager->listTableConstraints($name); + if (PEAR::isError($constraints)) { + return $constraints; + } + + if (!array_key_exists('foreign_keys', $options)) { + $options['foreign_keys'] = array(); + } + $constraints = array_flip($constraints); + foreach ($constraints as $constraint => $value) { + if (!empty($definition['primary'])) { + if (!array_key_exists('primary', $options)) { + $options['primary'] = $definition['fields']; + //remove from the $constraint array, it's already handled by createTable() + unset($constraints[$constraint]); + } + } else { + $c_definition = $db->reverse->getTableConstraintDefinition($name, $constraint); + if (PEAR::isError($c_definition)) { + return $c_definition; + } + if (!empty($c_definition['foreign'])) { + if (!array_key_exists($constraint, $options['foreign_keys'])) { + $options['foreign_keys'][$constraint] = $c_definition; + } + //remove from the $constraint array, it's already handled by createTable() + unset($constraints[$constraint]); + } else { + $constraints[$constraint] = $c_definition; + } + } + } + + $name_new = $name; + $create_order = $select_fields = array_keys($fields); + foreach ($changes as $change_name => $change) { + switch ($change_name) { + case 'add': + foreach ($change as $field_name => $field) { + $fields[$field_name] = $field; + $create_order[] = $field_name; + } + break; + case 'remove': + foreach ($change as $field_name => $field) { + unset($fields[$field_name]); + $select_fields = array_diff($select_fields, array($field_name)); + $create_order = array_diff($create_order, array($field_name)); + } + break; + case 'change': + foreach ($change as $field_name => $field) { + $fields[$field_name] = $field['definition']; + } + break; + case 'name': + $name_new = $change; + break; + case 'rename': + foreach ($change as $field_name => $field) { + unset($fields[$field_name]); + $fields[$field['name']] = $field['definition']; + $create_order[array_search($field_name, $create_order)] = $field['name']; + } + break; + default: + return $db->raiseError(MDB2_ERROR_CANNOT_ALTER, null, null, + 'change type "'.$change_name.'" not yet supported', __FUNCTION__); + } + } + + $data = null; + if (!empty($select_fields)) { + $query = 'SELECT '.implode(', ', $select_fields).' FROM '.$db->quoteIdentifier($name, true); + $data = $db->queryAll($query, null, MDB2_FETCHMODE_ORDERED); + } + + $result = $this->dropTable($name); + if (PEAR::isError($result)) { + return $result; + } + + $result = $this->createTable($name_new, $fields, $options); + if (PEAR::isError($result)) { + return $result; + } + + foreach ($indexes as $index => $definition) { + $this->createIndex($name_new, $index, $definition); + } + + foreach ($constraints as $constraint => $definition) { + $this->createConstraint($name_new, $constraint, $definition); + } + + if (!empty($select_fields) && !empty($data)) { + $query = 'INSERT INTO '.$db->quoteIdentifier($name_new, true); + $query.= '('.implode(', ', array_slice(array_keys($fields), 0, count($select_fields))).')'; + $query.=' VALUES (?'.str_repeat(', ?', (count($select_fields) - 1)).')'; + $stmt =$db->prepare($query, null, MDB2_PREPARE_MANIP); + if (PEAR::isError($stmt)) { + return $stmt; + } + foreach ($data as $row) { + $result = $stmt->execute($row); + if (PEAR::isError($result)) { + return $result; + } + } + } + return MDB2_OK; + } + + // }}} + // {{{ listDatabases() + + /** + * list all databases + * + * @return mixed array of database names on success, a MDB2 error on failure + * @access public + */ + function listDatabases() + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'list databases is not supported', __FUNCTION__); + } + + // }}} + // {{{ listUsers() + + /** + * list all users + * + * @return mixed array of user names on success, a MDB2 error on failure + * @access public + */ + function listUsers() + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'list databases is not supported', __FUNCTION__); + } + + // }}} + // {{{ listViews() + + /** + * list all views in the current database + * + * @return mixed array of view names on success, a MDB2 error on failure + * @access public + */ + function listViews($dummy=null) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = "SELECT name FROM sqlite_master WHERE type='view' AND sql NOT NULL"; + $result = $db->queryCol($query); + if (PEAR::isError($result)) { + return $result; + } + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $result = array_map(($db->options['field_case'] == CASE_LOWER ? 'strtolower' : 'strtoupper'), $result); + } + return $result; + } + + // }}} + // {{{ listTableViews() + + /** + * list the views in the database that reference a given table + * + * @param string table for which all referenced views should be found + * @return mixed array of view names on success, a MDB2 error on failure + * @access public + */ + function listTableViews($table) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = "SELECT name, sql FROM sqlite_master WHERE type='view' AND sql NOT NULL"; + $views = $db->queryAll($query, array('text', 'text'), MDB2_FETCHMODE_ASSOC); + if (PEAR::isError($views)) { + return $views; + } + $result = array(); + foreach ($views as $row) { + if (preg_match("/^create view .* \bfrom\b\s+\b{$table}\b /i", $row['sql'])) { + if (!empty($row['name'])) { + $result[$row['name']] = true; + } + } + } + + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $result = array_change_key_case($result, $db->options['field_case']); + } + return array_keys($result); + } + + // }}} + // {{{ listTables() + + /** + * list all tables in the current database + * + * @return mixed array of table names on success, a MDB2 error on failure + * @access public + */ + function listTables($dummy=null) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = "SELECT name FROM sqlite_master WHERE type='table' AND sql NOT NULL ORDER BY name"; + $table_names = $db->queryCol($query); + if (PEAR::isError($table_names)) { + return $table_names; + } + $result = array(); + foreach ($table_names as $table_name) { + if (!$this->_fixSequenceName($table_name, true)) { + $result[] = $table_name; + } + } + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $result = array_map(($db->options['field_case'] == CASE_LOWER ? 'strtolower' : 'strtoupper'), $result); + } + return $result; + } + + // }}} + // {{{ listTableFields() + + /** + * list all fields in a table in the current database + * + * @param string $table name of table that should be used in method + * @return mixed array of field names on success, a MDB2 error on failure + * @access public + */ + function listTableFields($table) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $result = $db->loadModule('Reverse', null, true); + if (PEAR::isError($result)) { + return $result; + } + $query = "SELECT sql FROM sqlite_master WHERE type='table' AND "; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= 'LOWER(name)='.$db->quote(strtolower($table), 'text'); + } else { + $query.= 'name='.$db->quote($table, 'text'); + } + $sql = $db->queryOne($query); + if (PEAR::isError($sql)) { + return $sql; + } + $columns = $db->reverse->_getTableColumns($sql); + $fields = array(); + foreach ($columns as $column) { + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + if ($db->options['field_case'] == CASE_LOWER) { + $column['name'] = strtolower($column['name']); + } else { + $column['name'] = strtoupper($column['name']); + } + } else { + $column = array_change_key_case($column, $db->options['field_case']); + } + $fields[] = $column['name']; + } + return $fields; + } + + // }}} + // {{{ listTableTriggers() + + /** + * list all triggers in the database that reference a given table + * + * @param string table for which all referenced triggers should be found + * @return mixed array of trigger names on success, a MDB2 error on failure + * @access public + */ + function listTableTriggers($table = null) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = "SELECT name FROM sqlite_master WHERE type='trigger' AND sql NOT NULL"; + if (!is_null($table)) { + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= ' AND LOWER(tbl_name)='.$db->quote(strtolower($table), 'text'); + } else { + $query.= ' AND tbl_name='.$db->quote($table, 'text'); + } + } + $result = $db->queryCol($query); + if (PEAR::isError($result)) { + return $result; + } + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $result = array_map(($db->options['field_case'] == CASE_LOWER ? 'strtolower' : 'strtoupper'), $result); + } + return $result; + } + + // }}} + // {{{ createIndex() + + /** + * Get the stucture of a field into an array + * + * @param string $table name of the table on which the index is to be created + * @param string $name name of the index to be created + * @param array $definition associative array that defines properties of the index to be created. + * Currently, only one property named FIELDS is supported. This property + * is also an associative with the names of the index fields as array + * indexes. Each entry of this array is set to another type of associative + * array that specifies properties of the index that are specific to + * each field. + * + * Currently, only the sorting property is supported. It should be used + * to define the sorting direction of the index. It may be set to either + * ascending or descending. + * + * Not all DBMS support index sorting direction configuration. The DBMS + * drivers of those that do not support it ignore this property. Use the + * function support() to determine whether the DBMS driver can manage indexes. + + * Example + * array( + * 'fields' => array( + * 'user_name' => array( + * 'sorting' => 'ascending' + * ), + * 'last_login' => array() + * ) + * ) + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function createIndex($table, $name, $definition) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $table = $db->quoteIdentifier($table, true); + $name = $db->getIndexName($name); + $query = "CREATE INDEX $name ON $table"; + $fields = array(); + foreach ($definition['fields'] as $field_name => $field) { + $field_string = $field_name; + if (!empty($field['sorting'])) { + switch ($field['sorting']) { + case 'ascending': + $field_string.= ' ASC'; + break; + case 'descending': + $field_string.= ' DESC'; + break; + } + } + $fields[] = $field_string; + } + $query .= ' ('.implode(', ', $fields) . ')'; + return $db->exec($query); + } + + // }}} + // {{{ dropIndex() + + /** + * drop existing index + * + * @param string $table name of table that should be used in method + * @param string $name name of the index to be dropped + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function dropIndex($table, $name) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $name = $db->getIndexName($name); + return $db->exec("DROP INDEX $name"); + } + + // }}} + // {{{ listTableIndexes() + + /** + * list all indexes in a table + * + * @param string $table name of table that should be used in method + * @return mixed array of index names on success, a MDB2 error on failure + * @access public + */ + function listTableIndexes($table) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $table = $db->quote($table, 'text'); + $query = "SELECT sql FROM sqlite_master WHERE type='index' AND "; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= 'LOWER(tbl_name)='.strtolower($table); + } else { + $query.= "tbl_name=$table"; + } + $query.= " AND sql NOT NULL ORDER BY name"; + $indexes = $db->queryCol($query, 'text'); + if (PEAR::isError($indexes)) { + return $indexes; + } + + $result = array(); + foreach ($indexes as $sql) { + if (preg_match("/^create index ([^ ]+) on /i", $sql, $tmp)) { + $index = $this->_fixIndexName($tmp[1]); + if (!empty($index)) { + $result[$index] = true; + } + } + } + + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $result = array_change_key_case($result, $db->options['field_case']); + } + return array_keys($result); + } + + // }}} + // {{{ createConstraint() + + /** + * create a constraint on a table + * + * @param string $table name of the table on which the constraint is to be created + * @param string $name name of the constraint to be created + * @param array $definition associative array that defines properties of the constraint to be created. + * Currently, only one property named FIELDS is supported. This property + * is also an associative with the names of the constraint fields as array + * constraints. Each entry of this array is set to another type of associative + * array that specifies properties of the constraint that are specific to + * each field. + * + * Example + * array( + * 'fields' => array( + * 'user_name' => array(), + * 'last_login' => array() + * ) + * ) + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function createConstraint($table, $name, $definition) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + if (!empty($definition['primary'])) { + return $db->manager->alterTable($table, array(), false, array('primary' => $definition['fields'])); + } + + if (!empty($definition['foreign'])) { + return $db->manager->alterTable($table, array(), false, array('foreign_keys' => array($name => $definition))); + } + + $table = $db->quoteIdentifier($table, true); + $name = $db->getIndexName($name); + $query = "CREATE UNIQUE INDEX $name ON $table"; + $fields = array(); + foreach ($definition['fields'] as $field_name => $field) { + $field_string = $field_name; + if (!empty($field['sorting'])) { + switch ($field['sorting']) { + case 'ascending': + $field_string.= ' ASC'; + break; + case 'descending': + $field_string.= ' DESC'; + break; + } + } + $fields[] = $field_string; + } + $query .= ' ('.implode(', ', $fields) . ')'; + return $db->exec($query); + } + + // }}} + // {{{ dropConstraint() + + /** + * drop existing constraint + * + * @param string $table name of table that should be used in method + * @param string $name name of the constraint to be dropped + * @param string $primary hint if the constraint is primary + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function dropConstraint($table, $name, $primary = false) + { + if ($primary || $name == 'PRIMARY') { + return $this->alterTable($table, array(), false, array('primary' => null)); + } + + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + //is it a FK constraint? If so, also delete the associated triggers + $db->loadModule('Reverse', null, true); + $definition = $db->reverse->getTableConstraintDefinition($table, $name); + if (!PEAR::isError($definition) && !empty($definition['foreign'])) { + //first drop the FK enforcing triggers + $result = $this->_dropFKTriggers($table, $name, $definition['references']['table']); + if (PEAR::isError($result)) { + return $result; + } + //then drop the constraint itself + return $this->alterTable($table, array(), false, array('foreign_keys' => array($name => null))); + } + + $name = $db->getIndexName($name); + return $db->exec("DROP INDEX $name"); + } + + // }}} + // {{{ _dropFKTriggers() + + /** + * Drop the triggers created to enforce the FOREIGN KEY constraint on the table + * + * @param string $table table name + * @param string $fkname FOREIGN KEY constraint name + * @param string $referenced_table referenced table name + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access private + */ + function _dropFKTriggers($table, $fkname, $referenced_table) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $triggers = $this->listTableTriggers($table); + $triggers2 = $this->listTableTriggers($referenced_table); + if (!PEAR::isError($triggers2) && !PEAR::isError($triggers)) { + $triggers = array_merge($triggers, $triggers2); + $pattern = '/^'.$fkname.'(_pk)?_(insert|update|delete)_trg$/i'; + foreach ($triggers as $trigger) { + if (preg_match($pattern, $trigger)) { + $result = $db->exec('DROP TRIGGER '.$trigger); + if (PEAR::isError($result)) { + return $result; + } + } + } + } + return MDB2_OK; + } + + // }}} + // {{{ listTableConstraints() + + /** + * list all constraints in a table + * + * @param string $table name of table that should be used in method + * @return mixed array of constraint names on success, a MDB2 error on failure + * @access public + */ + function listTableConstraints($table) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $table = $db->quote($table, 'text'); + $query = "SELECT sql FROM sqlite_master WHERE type='index' AND "; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= 'LOWER(tbl_name)='.strtolower($table); + } else { + $query.= "tbl_name=$table"; + } + $query.= " AND sql NOT NULL ORDER BY name"; + $indexes = $db->queryCol($query, 'text'); + if (PEAR::isError($indexes)) { + return $indexes; + } + + $result = array(); + foreach ($indexes as $sql) { + if (preg_match("/^create unique index ([^ ]+) on /i", $sql, $tmp)) { + $index = $this->_fixIndexName($tmp[1]); + if (!empty($index)) { + $result[$index] = true; + } + } + } + + // also search in table definition for PRIMARY KEYs... + $query = "SELECT sql FROM sqlite_master WHERE type='table' AND "; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= 'LOWER(name)='.strtolower($table); + } else { + $query.= "name=$table"; + } + $query.= " AND sql NOT NULL ORDER BY name"; + $table_def = $db->queryOne($query, 'text'); + if (PEAR::isError($table_def)) { + return $table_def; + } + if (preg_match("/\bPRIMARY\s+KEY\b/i", $table_def, $tmp)) { + $result['primary'] = true; + } + + // ...and for FOREIGN KEYs + if (preg_match_all("/\bCONSTRAINT\b\s+([^\s]+)\s+\bFOREIGN\s+KEY/imsx", $table_def, $tmp)) { + foreach ($tmp[1] as $fk) { + $result[$fk] = true; + } + } + + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $result = array_change_key_case($result, $db->options['field_case']); + } + return array_keys($result); + } + + // }}} + // {{{ createSequence() + + /** + * create sequence + * + * @param string $seq_name name of the sequence to be created + * @param string $start start value of the sequence; default is 1 + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function createSequence($seq_name, $start = 1) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $sequence_name = $db->quoteIdentifier($db->getSequenceName($seq_name), true); + $seqcol_name = $db->quoteIdentifier($db->options['seqcol_name'], true); + $query = "CREATE TABLE $sequence_name ($seqcol_name INTEGER PRIMARY KEY DEFAULT 0 NOT NULL)"; + $res = $db->exec($query); + if (PEAR::isError($res)) { + return $res; + } + if ($start == 1) { + return MDB2_OK; + } + $res = $db->exec("INSERT INTO $sequence_name ($seqcol_name) VALUES (".($start-1).')'); + if (!PEAR::isError($res)) { + return MDB2_OK; + } + // Handle error + $result = $db->exec("DROP TABLE $sequence_name"); + if (PEAR::isError($result)) { + return $db->raiseError($result, null, null, + 'could not drop inconsistent sequence table', __FUNCTION__); + } + return $db->raiseError($res, null, null, + 'could not create sequence table', __FUNCTION__); + } + + // }}} + // {{{ dropSequence() + + /** + * drop existing sequence + * + * @param string $seq_name name of the sequence to be dropped + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function dropSequence($seq_name) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $sequence_name = $db->quoteIdentifier($db->getSequenceName($seq_name), true); + return $db->exec("DROP TABLE $sequence_name"); + } + + // }}} + // {{{ listSequences() + + /** + * list all sequences in the current database + * + * @return mixed array of sequence names on success, a MDB2 error on failure + * @access public + */ + function listSequences($dummy=null) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = "SELECT name FROM sqlite_master WHERE type='table' AND sql NOT NULL ORDER BY name"; + $table_names = $db->queryCol($query); + if (PEAR::isError($table_names)) { + return $table_names; + } + $result = array(); + foreach ($table_names as $table_name) { + if ($sqn = $this->_fixSequenceName($table_name, true)) { + $result[] = $sqn; + } + } + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $result = array_map(($db->options['field_case'] == CASE_LOWER ? 'strtolower' : 'strtoupper'), $result); + } + return $result; + } + + // }}} +} +?> \ No newline at end of file diff --git a/lib/MDB2/Driver/Native/sqlite3.php b/lib/MDB2/Driver/Native/sqlite3.php new file mode 100644 index 00000000000..81dc67dea65 --- /dev/null +++ b/lib/MDB2/Driver/Native/sqlite3.php @@ -0,0 +1,58 @@ + | +// +----------------------------------------------------------------------+ +// +// +require_once 'MDB2/Driver/Native/Common.php'; + +/** + * MDB2 SQLite driver for the native module + * + * @package MDB2 + * @category Database + * @author Lukas Smith + */ +class MDB2_Driver_Native_sqlite extends MDB2_Driver_Native_Common +{ +} +?> \ No newline at end of file diff --git a/lib/MDB2/Driver/Reverse/sqlite3.php b/lib/MDB2/Driver/Reverse/sqlite3.php new file mode 100644 index 00000000000..d488977b158 --- /dev/null +++ b/lib/MDB2/Driver/Reverse/sqlite3.php @@ -0,0 +1,607 @@ + | +// +----------------------------------------------------------------------+ +// +// + +require_once('MDB2/Driver/Reverse/Common.php'); + +/** + * MDB2 SQlite driver for the schema reverse engineering module + * + * @package MDB2 + * @category Database + * @author Lukas Smith + */ +class MDB2_Driver_Reverse_sqlite3 extends MDB2_Driver_Reverse_Common +{ + /** + * Remove SQL comments from the field definition + * + * @access private + */ + function _removeComments($sql) { + $lines = explode("\n", $sql); + foreach ($lines as $k => $line) { + $pieces = explode('--', $line); + if (count($pieces) > 1 && (substr_count($pieces[0], '\'') % 2) == 0) { + $lines[$k] = substr($line, 0, strpos($line, '--')); + } + } + return implode("\n", $lines); + } + + /** + * + */ + function _getTableColumns($sql) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + $start_pos = strpos($sql, '('); + $end_pos = strrpos($sql, ')'); + $column_def = substr($sql, $start_pos+1, $end_pos-$start_pos-1); + // replace the decimal length-places-separator with a colon + $column_def = preg_replace('/(\d),(\d)/', '\1:\2', $column_def); + $column_def = $this->_removeComments($column_def); + $column_sql = explode(',', $column_def); + $columns = array(); + $count = count($column_sql); + if ($count == 0) { + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'unexpected empty table column definition list', __FUNCTION__); + } + $regexp = '/^\s*([^\s]+) +(CHAR|VARCHAR|VARCHAR2|TEXT|BOOLEAN|SMALLINT|INT|INTEGER|DECIMAL|BIGINT|DOUBLE|FLOAT|DATETIME|DATE|TIME|LONGTEXT|LONGBLOB)( ?\(([1-9][0-9]*)(:([1-9][0-9]*))?\))?( NULL| NOT NULL)?( UNSIGNED)?( NULL| NOT NULL)?( PRIMARY KEY)?( DEFAULT (\'[^\']*\'|[^ ]+))?( NULL| NOT NULL)?( PRIMARY KEY)?(\s*\-\-.*)?$/i'; + $regexp2 = '/^\s*([^ ]+) +(PRIMARY|UNIQUE|CHECK)$/i'; + for ($i=0, $j=0; $i<$count; ++$i) { + if (!preg_match($regexp, trim($column_sql[$i]), $matches)) { + if (!preg_match($regexp2, trim($column_sql[$i]))) { + continue; + } + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'unexpected table column SQL definition: "'.$column_sql[$i].'"', __FUNCTION__); + } + $columns[$j]['name'] = trim($matches[1], implode('', $db->identifier_quoting)); + $columns[$j]['type'] = strtolower($matches[2]); + if (isset($matches[4]) && strlen($matches[4])) { + $columns[$j]['length'] = $matches[4]; + } + if (isset($matches[6]) && strlen($matches[6])) { + $columns[$j]['decimal'] = $matches[6]; + } + if (isset($matches[8]) && strlen($matches[8])) { + $columns[$j]['unsigned'] = true; + } + if (isset($matches[9]) && strlen($matches[9])) { + $columns[$j]['autoincrement'] = true; + } + if (isset($matches[12]) && strlen($matches[12])) { + $default = $matches[12]; + if (strlen($default) && $default[0]=="'") { + $default = str_replace("''", "'", substr($default, 1, strlen($default)-2)); + } + if ($default === 'NULL') { + $default = null; + } + $columns[$j]['default'] = $default; + } + if (isset($matches[7]) && strlen($matches[7])) { + $columns[$j]['notnull'] = ($matches[7] === ' NOT NULL'); + } else if (isset($matches[9]) && strlen($matches[9])) { + $columns[$j]['notnull'] = ($matches[9] === ' NOT NULL'); + } else if (isset($matches[13]) && strlen($matches[13])) { + $columns[$j]['notnull'] = ($matches[13] === ' NOT NULL'); + } + ++$j; + } + return $columns; + } + + // {{{ getTableFieldDefinition() + + /** + * Get the stucture of a field into an array + * + * @param string $table_name name of table that should be used in method + * @param string $field_name name of field that should be used in method + * @return mixed data array on success, a MDB2 error on failure. + * The returned array contains an array for each field definition, + * with (some of) these indices: + * [notnull] [nativetype] [length] [fixed] [default] [type] [mdb2type] + * @access public + */ + function getTableFieldDefinition($table_name, $field_name) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + list($schema, $table) = $this->splitTableSchema($table_name); + + $result = $db->loadModule('Datatype', null, true); + if (PEAR::isError($result)) { + return $result; + } + $query = "SELECT sql FROM sqlite_master WHERE type='table' AND "; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= 'LOWER(name)='.$db->quote(strtolower($table), 'text'); + } else { + $query.= 'name='.$db->quote($table, 'text'); + } + $sql = $db->queryOne($query); + if (PEAR::isError($sql)) { + return $sql; + } + $columns = $this->_getTableColumns($sql); + foreach ($columns as $column) { + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + if ($db->options['field_case'] == CASE_LOWER) { + $column['name'] = strtolower($column['name']); + } else { + $column['name'] = strtoupper($column['name']); + } + } else { + $column = array_change_key_case($column, $db->options['field_case']); + } + if ($field_name == $column['name']) { + $mapped_datatype = $db->datatype->mapNativeDatatype($column); + if (PEAR::isError($mapped_datatype)) { + return $mapped_datatype; + } + list($types, $length, $unsigned, $fixed) = $mapped_datatype; + $notnull = false; + if (!empty($column['notnull'])) { + $notnull = $column['notnull']; + } + $default = false; + if (array_key_exists('default', $column)) { + $default = $column['default']; + if (is_null($default) && $notnull) { + $default = ''; + } + } + $autoincrement = false; + if (!empty($column['autoincrement'])) { + $autoincrement = true; + } + + $definition[0] = array( + 'notnull' => $notnull, + 'nativetype' => preg_replace('/^([a-z]+)[^a-z].*/i', '\\1', $column['type']) + ); + if (!is_null($length)) { + $definition[0]['length'] = $length; + } + if (!is_null($unsigned)) { + $definition[0]['unsigned'] = $unsigned; + } + if (!is_null($fixed)) { + $definition[0]['fixed'] = $fixed; + } + if ($default !== false) { + $definition[0]['default'] = $default; + } + if ($autoincrement !== false) { + $definition[0]['autoincrement'] = $autoincrement; + } + foreach ($types as $key => $type) { + $definition[$key] = $definition[0]; + if ($type == 'clob' || $type == 'blob') { + unset($definition[$key]['default']); + } + $definition[$key]['type'] = $type; + $definition[$key]['mdb2type'] = $type; + } + return $definition; + } + } + + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'it was not specified an existing table column', __FUNCTION__); + } + + // }}} + // {{{ getTableIndexDefinition() + + /** + * Get the stucture of an index into an array + * + * @param string $table_name name of table that should be used in method + * @param string $index_name name of index that should be used in method + * @return mixed data array on success, a MDB2 error on failure + * @access public + */ + function getTableIndexDefinition($table_name, $index_name) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + list($schema, $table) = $this->splitTableSchema($table_name); + + $query = "SELECT sql FROM sqlite_master WHERE type='index' AND "; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= 'LOWER(name)=%s AND LOWER(tbl_name)=' . $db->quote(strtolower($table), 'text'); + } else { + $query.= 'name=%s AND tbl_name=' . $db->quote($table, 'text'); + } + $query.= ' AND sql NOT NULL ORDER BY name'; + $index_name_mdb2 = $db->getIndexName($index_name); + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $qry = sprintf($query, $db->quote(strtolower($index_name_mdb2), 'text')); + } else { + $qry = sprintf($query, $db->quote($index_name_mdb2, 'text')); + } + $sql = $db->queryOne($qry, 'text'); + if (PEAR::isError($sql) || empty($sql)) { + // fallback to the given $index_name, without transformation + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $qry = sprintf($query, $db->quote(strtolower($index_name), 'text')); + } else { + $qry = sprintf($query, $db->quote($index_name, 'text')); + } + $sql = $db->queryOne($qry, 'text'); + } + if (PEAR::isError($sql)) { + return $sql; + } + if (!$sql) { + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'it was not specified an existing table index', __FUNCTION__); + } + + $sql = strtolower($sql); + $start_pos = strpos($sql, '('); + $end_pos = strrpos($sql, ')'); + $column_names = substr($sql, $start_pos+1, $end_pos-$start_pos-1); + $column_names = explode(',', $column_names); + + if (preg_match("/^create unique/", $sql)) { + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'it was not specified an existing table index', __FUNCTION__); + } + + $definition = array(); + $count = count($column_names); + for ($i=0; $i<$count; ++$i) { + $column_name = strtok($column_names[$i], ' '); + $collation = strtok(' '); + $definition['fields'][$column_name] = array( + 'position' => $i+1 + ); + if (!empty($collation)) { + $definition['fields'][$column_name]['sorting'] = + ($collation=='ASC' ? 'ascending' : 'descending'); + } + } + + if (empty($definition['fields'])) { + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'it was not specified an existing table index', __FUNCTION__); + } + return $definition; + } + + // }}} + // {{{ getTableConstraintDefinition() + + /** + * Get the stucture of a constraint into an array + * + * @param string $table_name name of table that should be used in method + * @param string $constraint_name name of constraint that should be used in method + * @return mixed data array on success, a MDB2 error on failure + * @access public + */ + function getTableConstraintDefinition($table_name, $constraint_name) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + list($schema, $table) = $this->splitTableSchema($table_name); + + $query = "SELECT sql FROM sqlite_master WHERE type='index' AND "; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= 'LOWER(name)=%s AND LOWER(tbl_name)=' . $db->quote(strtolower($table), 'text'); + } else { + $query.= 'name=%s AND tbl_name=' . $db->quote($table, 'text'); + } + $query.= ' AND sql NOT NULL ORDER BY name'; + $constraint_name_mdb2 = $db->getIndexName($constraint_name); + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $qry = sprintf($query, $db->quote(strtolower($constraint_name_mdb2), 'text')); + } else { + $qry = sprintf($query, $db->quote($constraint_name_mdb2, 'text')); + } + $sql = $db->queryOne($qry, 'text'); + if (PEAR::isError($sql) || empty($sql)) { + // fallback to the given $index_name, without transformation + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $qry = sprintf($query, $db->quote(strtolower($constraint_name), 'text')); + } else { + $qry = sprintf($query, $db->quote($constraint_name, 'text')); + } + $sql = $db->queryOne($qry, 'text'); + } + if (PEAR::isError($sql)) { + return $sql; + } + //default values, eventually overridden + $definition = array( + 'primary' => false, + 'unique' => false, + 'foreign' => false, + 'check' => false, + 'fields' => array(), + 'references' => array( + 'table' => '', + 'fields' => array(), + ), + 'onupdate' => '', + 'ondelete' => '', + 'match' => '', + 'deferrable' => false, + 'initiallydeferred' => false, + ); + if (!$sql) { + $query = "SELECT sql FROM sqlite_master WHERE type='table' AND "; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= 'LOWER(name)='.$db->quote(strtolower($table), 'text'); + } else { + $query.= 'name='.$db->quote($table, 'text'); + } + $query.= " AND sql NOT NULL ORDER BY name"; + $sql = $db->queryOne($query, 'text'); + if (PEAR::isError($sql)) { + return $sql; + } + if ($constraint_name == 'primary') { + // search in table definition for PRIMARY KEYs + if (preg_match("/\bPRIMARY\s+KEY\b\s*\(([^)]+)/i", $sql, $tmp)) { + $definition['primary'] = true; + $definition['fields'] = array(); + $column_names = explode(',', $tmp[1]); + $colpos = 1; + foreach ($column_names as $column_name) { + $definition['fields'][trim($column_name)] = array( + 'position' => $colpos++ + ); + } + return $definition; + } + if (preg_match("/\"([^\"]+)\"[^\,\"]+\bPRIMARY\s+KEY\b[^\,\)]*/i", $sql, $tmp)) { + $definition['primary'] = true; + $definition['fields'] = array(); + $column_names = explode(',', $tmp[1]); + $colpos = 1; + foreach ($column_names as $column_name) { + $definition['fields'][trim($column_name)] = array( + 'position' => $colpos++ + ); + } + return $definition; + } + } else { + // search in table definition for FOREIGN KEYs + $pattern = "/\bCONSTRAINT\b\s+%s\s+ + \bFOREIGN\s+KEY\b\s*\(([^\)]+)\)\s* + \bREFERENCES\b\s+([^\s]+)\s*\(([^\)]+)\)\s* + (?:\bMATCH\s*([^\s]+))?\s* + (?:\bON\s+UPDATE\s+([^\s,\)]+))?\s* + (?:\bON\s+DELETE\s+([^\s,\)]+))?\s* + /imsx"; + $found_fk = false; + if (preg_match(sprintf($pattern, $constraint_name_mdb2), $sql, $tmp)) { + $found_fk = true; + } elseif (preg_match(sprintf($pattern, $constraint_name), $sql, $tmp)) { + $found_fk = true; + } + if ($found_fk) { + $definition['foreign'] = true; + $definition['match'] = 'SIMPLE'; + $definition['onupdate'] = 'NO ACTION'; + $definition['ondelete'] = 'NO ACTION'; + $definition['references']['table'] = $tmp[2]; + $column_names = explode(',', $tmp[1]); + $colpos = 1; + foreach ($column_names as $column_name) { + $definition['fields'][trim($column_name)] = array( + 'position' => $colpos++ + ); + } + $referenced_cols = explode(',', $tmp[3]); + $colpos = 1; + foreach ($referenced_cols as $column_name) { + $definition['references']['fields'][trim($column_name)] = array( + 'position' => $colpos++ + ); + } + if (isset($tmp[4])) { + $definition['match'] = $tmp[4]; + } + if (isset($tmp[5])) { + $definition['onupdate'] = $tmp[5]; + } + if (isset($tmp[6])) { + $definition['ondelete'] = $tmp[6]; + } + return $definition; + } + } + $sql = false; + } + if (!$sql) { + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + $constraint_name . ' is not an existing table constraint', __FUNCTION__); + } + + $sql = strtolower($sql); + $start_pos = strpos($sql, '('); + $end_pos = strrpos($sql, ')'); + $column_names = substr($sql, $start_pos+1, $end_pos-$start_pos-1); + $column_names = explode(',', $column_names); + + if (!preg_match("/^create unique/", $sql)) { + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + $constraint_name . ' is not an existing table constraint', __FUNCTION__); + } + + $definition['unique'] = true; + $count = count($column_names); + for ($i=0; $i<$count; ++$i) { + $column_name = strtok($column_names[$i]," "); + $collation = strtok(" "); + $definition['fields'][$column_name] = array( + 'position' => $i+1 + ); + if (!empty($collation)) { + $definition['fields'][$column_name]['sorting'] = + ($collation=='ASC' ? 'ascending' : 'descending'); + } + } + + if (empty($definition['fields'])) { + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + $constraint_name . ' is not an existing table constraint', __FUNCTION__); + } + return $definition; + } + + // }}} + // {{{ getTriggerDefinition() + + /** + * Get the structure of a trigger into an array + * + * EXPERIMENTAL + * + * WARNING: this function is experimental and may change the returned value + * at any time until labelled as non-experimental + * + * @param string $trigger name of trigger that should be used in method + * @return mixed data array on success, a MDB2 error on failure + * @access public + */ + function getTriggerDefinition($trigger) + { + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = "SELECT name as trigger_name, + tbl_name AS table_name, + sql AS trigger_body, + NULL AS trigger_type, + NULL AS trigger_event, + NULL AS trigger_comment, + 1 AS trigger_enabled + FROM sqlite_master + WHERE type='trigger'"; + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $query.= ' AND LOWER(name)='.$db->quote(strtolower($trigger), 'text'); + } else { + $query.= ' AND name='.$db->quote($trigger, 'text'); + } + $types = array( + 'trigger_name' => 'text', + 'table_name' => 'text', + 'trigger_body' => 'text', + 'trigger_type' => 'text', + 'trigger_event' => 'text', + 'trigger_comment' => 'text', + 'trigger_enabled' => 'boolean', + ); + $def = $db->queryRow($query, $types, MDB2_FETCHMODE_ASSOC); + if (PEAR::isError($def)) { + return $def; + } + if (empty($def)) { + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'it was not specified an existing trigger', __FUNCTION__); + } + if (preg_match("/^create\s+(?:temp|temporary)?trigger\s+(?:if\s+not\s+exists\s+)?.*(before|after)?\s+(insert|update|delete)/Uims", $def['trigger_body'], $tmp)) { + $def['trigger_type'] = strtoupper($tmp[1]); + $def['trigger_event'] = strtoupper($tmp[2]); + } + return $def; + } + + // }}} + // {{{ tableInfo() + + /** + * Returns information about a table + * + * @param string $result a string containing the name of a table + * @param int $mode a valid tableInfo mode + * + * @return array an associative array with the information requested. + * A MDB2_Error object on failure. + * + * @see MDB2_Driver_Common::tableInfo() + * @since Method available since Release 1.7.0 + */ + function tableInfo($result, $mode = null) + { + if (is_string($result)) { + return parent::tableInfo($result, $mode); + } + + $db =$this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + return $db->raiseError(MDB2_ERROR_NOT_CAPABLE, null, null, + 'This DBMS can not obtain tableInfo from result sets', __FUNCTION__); + } +} + +?> \ No newline at end of file diff --git a/lib/MDB2/Driver/sqlite3.php b/lib/MDB2/Driver/sqlite3.php new file mode 100644 index 00000000000..aadc5748b06 --- /dev/null +++ b/lib/MDB2/Driver/sqlite3.php @@ -0,0 +1,1024 @@ + | +// +----------------------------------------------------------------------+ +// +// + +/** + * MDB2 SQLite3 driver + * + * @package MDB2 + * @category Database + * @author Lukas Smith + */ +class MDB2_Driver_sqlite3 extends MDB2_Driver_Common +{ + // {{{ properties + public $string_quoting = array('start' => "'", 'end' => "'", 'escape' => "'", 'escape_pattern' => false); + + public $identifier_quoting = array('start' => '"', 'end' => '"', 'escape' => '"'); + + public $_lasterror = ''; + + public $fix_assoc_fields_names = false; + + // }}} + // {{{ constructor + + /** + * Constructor + */ + function __construct() + { + parent::__construct(); + + $this->phptype = 'sqlite3'; + $this->dbsyntax = 'sqlite'; + + $this->supported['sequences'] = 'emulated'; + $this->supported['indexes'] = true; + $this->supported['affected_rows'] = true; + $this->supported['summary_functions'] = true; + $this->supported['order_by_text'] = true; + $this->supported['current_id'] = 'emulated'; + $this->supported['limit_queries'] = true; + $this->supported['LOBs'] = true; + $this->supported['replace'] = true; + $this->supported['transactions'] = false; + $this->supported['savepoints'] = false; + $this->supported['sub_selects'] = true; + $this->supported['triggers'] = true; + $this->supported['auto_increment'] = true; + $this->supported['primary_key'] = false; // requires alter table implementation + $this->supported['result_introspection'] = false; // not implemented + $this->supported['prepared_statements'] = 'emulated'; + $this->supported['identifier_quoting'] = true; + $this->supported['pattern_escaping'] = false; + $this->supported['new_link'] = false; + + $this->options['DBA_username'] = false; + $this->options['DBA_password'] = false; + $this->options['base_transaction_name'] = '___php_MDB2_sqlite_auto_commit_off'; + $this->options['fixed_float'] = 0; + $this->options['database_path'] = ''; + $this->options['database_extension'] = ''; + $this->options['server_version'] = ''; + $this->options['max_identifiers_length'] = 128; //no real limit + } + + // }}} + // {{{ errorInfo() + + /** + * This method is used to collect information about an error + * + * @param integer $error + * @return array + * @access public + */ + function errorInfo($error = null) + { + $native_code = null; + if ($this->connection) { + $native_code = $this->connection->lastErrorCode(); + } + $native_msg = $this->_lasterror + ? html_entity_decode($this->_lasterror) : $this->connection->lastErrorMsg(); + + // PHP 5.2+ prepends the function name to $php_errormsg, so we need + // this hack to work around it, per bug #9599. + $native_msg = preg_replace('/^sqlite[a-z_]+\(\)[^:]*: /', '', $native_msg); + + if (is_null($error)) { + static $error_regexps; + if (empty($error_regexps)) { + $error_regexps = array( + '/^no such table:/' => MDB2_ERROR_NOSUCHTABLE, + '/^no such index:/' => MDB2_ERROR_NOT_FOUND, + '/^(table|index) .* already exists$/' => MDB2_ERROR_ALREADY_EXISTS, + '/PRIMARY KEY must be unique/i' => MDB2_ERROR_CONSTRAINT, + '/is not unique/' => MDB2_ERROR_CONSTRAINT, + '/columns .* are not unique/i' => MDB2_ERROR_CONSTRAINT, + '/uniqueness constraint failed/' => MDB2_ERROR_CONSTRAINT, + '/may not be NULL/' => MDB2_ERROR_CONSTRAINT_NOT_NULL, + '/^no such column:/' => MDB2_ERROR_NOSUCHFIELD, + '/no column named/' => MDB2_ERROR_NOSUCHFIELD, + '/column not present in both tables/i' => MDB2_ERROR_NOSUCHFIELD, + '/^near ".*": syntax error$/' => MDB2_ERROR_SYNTAX, + '/[0-9]+ values for [0-9]+ columns/i' => MDB2_ERROR_VALUE_COUNT_ON_ROW, + ); + } + foreach ($error_regexps as $regexp => $code) { + if (preg_match($regexp, $native_msg)) { + $error = $code; + break; + } + } + } + return array($error, $native_code, $native_msg); + } + + // }}} + // {{{ escape() + + /** + * Quotes a string so it can be safely used in a query. It will quote + * the text so it can safely be used within a query. + * + * @param string the input string to quote + * @param bool escape wildcards + * + * @return string quoted string + * + * @access public + */ + public function escape($text, $escape_wildcards = false) + { + if($this->connection){ + return $this->connection->escapeString($text); + }else{ + return str_replace("'","''",$text);//TODO; more + } + } + + // }}} + // {{{ beginTransaction() + + /** + * Start a transaction or set a savepoint. + * + * @param string name of a savepoint to set + * @return mixed MDB2_OK on success, a MDB2 error on failure + * + * @access public + */ + function beginTransaction($savepoint = null) + { + $this->debug('Starting transaction/savepoint', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint)); + if (!is_null($savepoint)) { + return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'savepoints are not supported', __FUNCTION__); + } elseif ($this->in_transaction) { + return MDB2_OK; //nothing to do + } + if (!$this->destructor_registered && $this->opened_persistent) { + $this->destructor_registered = true; + register_shutdown_function('MDB2_closeOpenTransactions'); + } + $query = 'BEGIN TRANSACTION '.$this->options['base_transaction_name']; + $result =$this->_doQuery($query, true); + if (PEAR::isError($result)) { + return $result; + } + $this->in_transaction = true; + return MDB2_OK; + } + + // }}} + // {{{ commit() + + /** + * Commit the database changes done during a transaction that is in + * progress or release a savepoint. This function may only be called when + * auto-committing is disabled, otherwise it will fail. Therefore, a new + * transaction is implicitly started after committing the pending changes. + * + * @param string name of a savepoint to release + * @return mixed MDB2_OK on success, a MDB2 error on failure + * + * @access public + */ + function commit($savepoint = null) + { + $this->debug('Committing transaction/savepoint', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint)); + if (!$this->in_transaction) { + return $this->raiseError(MDB2_ERROR_INVALID, null, null, + 'commit/release savepoint cannot be done changes are auto committed', __FUNCTION__); + } + if (!is_null($savepoint)) { + return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'savepoints are not supported', __FUNCTION__); + } + + $query = 'COMMIT TRANSACTION '.$this->options['base_transaction_name']; + $result =$this->_doQuery($query, true); + if (PEAR::isError($result)) { + return $result; + } + $this->in_transaction = false; + return MDB2_OK; + } + + // }}} + // {{{ + + /** + * Cancel any database changes done during a transaction or since a specific + * savepoint that is in progress. This function may only be called when + * auto-committing is disabled, otherwise it will fail. Therefore, a new + * transaction is implicitly started after canceling the pending changes. + * + * @param string name of a savepoint to rollback to + * @return mixed MDB2_OK on success, a MDB2 error on failure + * + * @access public + */ + function rollback($savepoint = null) + { + $this->debug('Rolling back transaction/savepoint', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint)); + if (!$this->in_transaction) { + return $this->raiseError(MDB2_ERROR_INVALID, null, null, + 'rollback cannot be done changes are auto committed', __FUNCTION__); + } + if (!is_null($savepoint)) { + return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'savepoints are not supported', __FUNCTION__); + } + + $query = 'ROLLBACK TRANSACTION '.$this->options['base_transaction_name']; + $result =$this->_doQuery($query, true); + if (PEAR::isError($result)) { + return $result; + } + $this->in_transaction = false; + return MDB2_OK; + } + + // }}} + // {{{ function setTransactionIsolation() + + /** + * Set the transacton isolation level. + * + * @param string standard isolation level + * READ UNCOMMITTED (allows dirty reads) + * READ COMMITTED (prevents dirty reads) + * REPEATABLE READ (prevents nonrepeatable reads) + * SERIALIZABLE (prevents phantom reads) + * @return mixed MDB2_OK on success, a MDB2 error on failure + * + * @access public + * @since 2.1.1 + */ + static function setTransactionIsolation($isolation,$options=array()) + { + $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true)); + switch ($isolation) { + case 'READ UNCOMMITTED': + $isolation = 0; + break; + case 'READ COMMITTED': + case 'REPEATABLE READ': + case 'SERIALIZABLE': + $isolation = 1; + break; + default: + return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'isolation level is not supported: '.$isolation, __FUNCTION__); + } + + $query = "PRAGMA read_uncommitted=$isolation"; + return $this->_doQuery($query, true); + } + + // }}} + // {{{ getDatabaseFile() + + /** + * Builds the string with path+dbname+extension + * + * @return string full database path+file + * @access protected + */ + function _getDatabaseFile($database_name) + { + if ($database_name === '' || $database_name === ':memory:') { + return $database_name; + } + return $this->options['database_path'].$database_name.$this->options['database_extension']; + } + + // }}} + // {{{ connect() + + /** + * Connect to the database + * + * @return true on success, MDB2 Error Object on failure + **/ + function connect() + { + global $SERVERROOT; + $datadir=OC_CONFIG::getValue( "datadirectory", "$SERVERROOT/data" ); + $database_file = $this->_getDatabaseFile($this->database_name); + if (is_resource($this->connection)) { + //if (count(array_diff($this->connected_dsn, $this->dsn)) == 0 + if (MDB2::areEquals($this->connected_dsn, $this->dsn) + && $this->connected_database_name == $database_file + && $this->opened_persistent == $this->options['persistent'] + ) { + return MDB2_OK; + } + $this->disconnect(false); + } + + if (!PEAR::loadExtension($this->phptype)) { + return $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'extension '.$this->phptype.' is not compiled into PHP', __FUNCTION__); + } + + if (empty($this->database_name)) { + return $this->raiseError(MDB2_ERROR_CONNECT_FAILED, null, null, + 'unable to establish a connection', __FUNCTION__); + } + + if ($database_file !== ':memory:') { + if(!strpos($database_file,'.db')){ + $database_file="$datadir/$database_file.db"; + } + if (!file_exists($database_file)) { + if (!touch($database_file)) { + return $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'Could not create database file', __FUNCTION__); + } + if (!isset($this->dsn['mode']) + || !is_numeric($this->dsn['mode']) + ) { + $mode = 0644; + } else { + $mode = octdec($this->dsn['mode']); + } + if (!chmod($database_file, $mode)) { + return $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'Could not be chmodded database file', __FUNCTION__); + } + if (!file_exists($database_file)) { + return $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'Could not be found database file', __FUNCTION__); + } + } + if (!is_file($database_file)) { + return $this->raiseError(MDB2_ERROR_INVALID, null, null, + 'Database is a directory name', __FUNCTION__); + } + if (!is_readable($database_file)) { + return $this->raiseError(MDB2_ERROR_ACCESS_VIOLATION, null, null, + 'Could not read database file', __FUNCTION__); + } + } + + $php_errormsg = ''; + $this->connection = new SQLite3($database_file); + $this->_lasterror = $this->connection->lastErrorMsg(); + if (!$this->connection) { + return $this->raiseError(MDB2_ERROR_CONNECT_FAILED, null, null, + 'unable to establish a connection', __FUNCTION__); + } + + if ($this->fix_assoc_fields_names || + $this->options['portability'] & MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES) + { + $this->connection->exec("PRAGMA short_column_names = 1"); + $this->fix_assoc_fields_names = true; + } + + $this->connected_dsn = $this->dsn; + $this->connected_database_name = $database_file; + $this->opened_persistent = $this->getoption('persistent'); + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; + + return MDB2_OK; + } + + // }}} + // {{{ databaseExists() + + /** + * check if given database name is exists? + * + * @param string $name name of the database that should be checked + * + * @return mixed true/false on success, a MDB2 error on failure + * @access public + */ + function databaseExists($name) + { + $database_file = $this->_getDatabaseFile($name); + $result = file_exists($database_file); + return $result; + } + + // }}} + // {{{ disconnect() + + /** + * Log out and disconnect from the database. + * + * @param boolean $force if the disconnect should be forced even if the + * connection is opened persistently + * @return mixed true on success, false if not connected and error + * object on error + * @access public + */ + function disconnect($force = true) + { + if ($this->connection instanceof SQLite3) { + if ($this->in_transaction) { + $dsn = $this->dsn; + $database_name = $this->database_name; + $persistent = $this->options['persistent']; + $this->dsn = $this->connected_dsn; + $this->database_name = $this->connected_database_name; + $this->options['persistent'] = $this->opened_persistent; + $this->rollback(); + $this->dsn = $dsn; + $this->database_name = $database_name; + $this->options['persistent'] = $persistent; + } + + if (!$this->opened_persistent || $force) { + $this->connection->close(); + } + } else { + return false; + } + return parent::disconnect($force); + } + + // }}} + // {{{ _doQuery() + + /** + * Execute a query + * @param string $query query + * @param boolean $is_manip if the query is a manipulation query + * @param resource $connection + * @param string $database_name + * @return result or error object + * @access protected + */ + function &_doQuery($query, $is_manip = false, $connection = null, $database_name = null) + { + $this->last_query = $query; + $result = $this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'pre')); + if ($result) { + if (PEAR::isError($result)) { + return $result; + } + $query = $result; + } + if ($this->options['disable_query']) { + $result = $is_manip ? 0 : null; + return $result; + } +// print_r(debug_backtrace()); + $result=$this->connection->query($query.';'); + $this->_lasterror = $this->connection->lastErrorMsg(); + + if (!$result) { + $err =$this->raiseError(null, null, null, + 'Could not execute statement', __FUNCTION__); + return $err; + } + + $this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'post', 'result' => $result)); + return $result; + } + + // }}} + // {{{ _affectedRows() + + /** + * Returns the number of rows affected + * + * @param resource $result + * @param resource $connection + * @return mixed MDB2 Error Object or the number of rows affected + * @access private + */ + function _affectedRows($connection, $result = null) + { + return $this->connection->changes(); + } + + // }}} + // {{{ _modifyQuery() + + /** + * Changes a query string for various DBMS specific reasons + * + * @param string $query query to modify + * @param boolean $is_manip if it is a DML query + * @param integer $limit limit the number of rows + * @param integer $offset start reading from given offset + * @return string modified query + * @access protected + */ + function _modifyQuery($query, $is_manip, $limit, $offset) + { + if ($this->options['portability'] & MDB2_PORTABILITY_DELETE_COUNT) { + if (preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $query)) { + $query = preg_replace('/^\s*DELETE\s+FROM\s+(\S+)\s*$/', + 'DELETE FROM \1 WHERE 1=1', $query); + } + } + if ($limit > 0 + && !preg_match('/LIMIT\s*\d(?:\s*(?:,|OFFSET)\s*\d+)?(?:[^\)]*)?$/i', $query) + ) { + $query = rtrim($query); + if (substr($query, -1) == ';') { + $query = substr($query, 0, -1); + } + if ($is_manip) { + $query.= " LIMIT $limit"; + } else { + $query.= " LIMIT $offset,$limit"; + } + } + return $query; + } + + // }}} + // {{{ getServerVersion() + + /** + * return version information about the server + * + * @param bool $native determines if the raw version string should be returned + * @return mixed array/string with version information or MDB2 error object + * @access public + */ + function getServerVersion($native = false) + { + $server_info = false; + if ($this->connected_server_info) { + $server_info = $this->connected_server_info; + } elseif ($this->options['server_version']) { + $server_info = $this->options['server_version']; + } elseif (function_exists('sqlite_libversion')) { + $server_info = @sqlite_libversion(); + } + if (!$server_info) { + return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'Requires either the "server_version" option or the sqlite_libversion() function', __FUNCTION__); + } + // cache server_info + $this->connected_server_info = $server_info; + if (!$native) { + $tmp = explode('.', $server_info, 3); + $server_info = array( + 'major' => isset($tmp[0]) ? $tmp[0] : null, + 'minor' => isset($tmp[1]) ? $tmp[1] : null, + 'patch' => isset($tmp[2]) ? $tmp[2] : null, + 'extra' => null, + 'native' => $server_info, + ); + } + return $server_info; + } + + // }}} + // {{{ replace() + + /** + * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT + * query, except that if there is already a row in the table with the same + * key field values, the old row is deleted before the new row is inserted. + * + * The REPLACE type of query does not make part of the SQL standards. Since + * practically only SQLite implements it natively, this type of query is + * emulated through this method for other DBMS using standard types of + * queries inside a transaction to assure the atomicity of the operation. + * + * @access public + * + * @param string $table name of the table on which the REPLACE query will + * be executed. + * @param array $fields associative array that describes the fields and the + * values that will be inserted or updated in the specified table. The + * indexes of the array are the names of all the fields of the table. The + * values of the array are also associative arrays that describe the + * values and other properties of the table fields. + * + * Here follows a list of field properties that need to be specified: + * + * value: + * Value to be assigned to the specified field. This value may be + * of specified in database independent type format as this + * function can perform the necessary datatype conversions. + * + * Default: + * this property is required unless the Null property + * is set to 1. + * + * type + * Name of the type of the field. Currently, all types Metabase + * are supported except for clob and blob. + * + * Default: no type conversion + * + * null + * Boolean property that indicates that the value for this field + * should be set to null. + * + * The default value for fields missing in INSERT queries may be + * specified the definition of a table. Often, the default value + * is already null, but since the REPLACE may be emulated using + * an UPDATE query, make sure that all fields of the table are + * listed in this function argument array. + * + * Default: 0 + * + * key + * Boolean property that indicates that this field should be + * handled as a primary key or at least as part of the compound + * unique index of the table that will determine the row that will + * updated if it exists or inserted a new row otherwise. + * + * This function will fail if no key field is specified or if the + * value of a key field is set to null because fields that are + * part of unique index they may not be null. + * + * Default: 0 + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + */ + function replace($table, $fields) + { + $count = count($fields); + $query = $values = ''; + $keys = $colnum = 0; + for (reset($fields); $colnum < $count; next($fields), $colnum++) { + $name = key($fields); + if ($colnum > 0) { + $query .= ','; + $values.= ','; + } + $query.= $this->quoteIdentifier($name, true); + if (isset($fields[$name]['null']) && $fields[$name]['null']) { + $value = 'NULL'; + } else { + $type = isset($fields[$name]['type']) ? $fields[$name]['type'] : null; + $value = $this->quote($fields[$name]['value'], $type); + if (PEAR::isError($value)) { + return $value; + } + } + $values.= $value; + if (isset($fields[$name]['key']) && $fields[$name]['key']) { + if ($value === 'NULL') { + return $this->raiseError(MDB2_ERROR_CANNOT_REPLACE, null, null, + 'key value '.$name.' may not be NULL', __FUNCTION__); + } + $keys++; + } + } + if ($keys == 0) { + return $this->raiseError(MDB2_ERROR_CANNOT_REPLACE, null, null, + 'not specified which fields are keys', __FUNCTION__); + } + + $connection = $this->getConnection(); + if (PEAR::isError($connection)) { + return $connection; + } + + $table = $this->quoteIdentifier($table, true); + $query = "REPLACE INTO $table ($query) VALUES ($values)"; + $result =$this->_doQuery($query, true, $connection); + if (PEAR::isError($result)) { + return $result; + } + return $this->_affectedRows($connection, $result); + } + + // }}} + // {{{ nextID() + + /** + * Returns the next free id of a sequence + * + * @param string $seq_name name of the sequence + * @param boolean $ondemand when true the sequence is + * automatic created, if it + * not exists + * + * @return mixed MDB2 Error Object or id + * @access public + */ + function nextID($seq_name, $ondemand = true) + { + $sequence_name = $this->quoteIdentifier($this->getSequenceName($seq_name), true); + $seqcol_name = $this->options['seqcol_name']; + $query = "INSERT INTO $sequence_name ($seqcol_name) VALUES (NULL)"; + $this->pushErrorHandling(PEAR_ERROR_RETURN); + $this->expectError(MDB2_ERROR_NOSUCHTABLE); + $result =$this->_doQuery($query, true); + $this->popExpect(); + $this->popErrorHandling(); + if (PEAR::isError($result)) { + if ($ondemand && $result->getCode() == MDB2_ERROR_NOSUCHTABLE) { + $this->loadModule('Manager', null, true); + $result = $this->manager->createSequence($seq_name); + if (PEAR::isError($result)) { + return $this->raiseError($result, null, null, + 'on demand sequence '.$seq_name.' could not be created', __FUNCTION__); + } else { + return $this->nextID($seq_name, false); + } + } + return $result; + } + $value = $this->lastInsertID(); + if (is_numeric($value)) { + $query = "DELETE FROM $sequence_name WHERE $seqcol_name < $value"; + $result =$this->_doQuery($query, true); + if (PEAR::isError($result)) { + $this->warnings[] = 'nextID: could not delete previous sequence table values from '.$seq_name; + } + } + return $value; + } + + // }}} + // {{{ lastInsertID() + + /** + * Returns the autoincrement ID if supported or $id or fetches the current + * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) + * + * @param string $table name of the table into which a new row was inserted + * @param string $field name of the field into which a new row was inserted + * @return mixed MDB2 Error Object or id + * @access public + */ + function lastInsertID($table = null, $field = null) + { + return $this->connection->lastInsertRowID(); + } + + // }}} + // {{{ currID() + + /** + * Returns the current id of a sequence + * + * @param string $seq_name name of the sequence + * @return mixed MDB2 Error Object or id + * @access public + */ + function currID($seq_name) + { + $sequence_name = $this->quoteIdentifier($this->getSequenceName($seq_name), true); + $seqcol_name = $this->quoteIdentifier($this->options['seqcol_name'], true); + $query = "SELECT MAX($seqcol_name) FROM $sequence_name"; + return $this->queryOne($query, 'integer'); + } +} + +/** + * MDB2 SQLite result driver + * + * @package MDB2 + * @category Database + * @author Lukas Smith + */ +class MDB2_Result_sqlite3 extends MDB2_Result_Common +{ + // }}} + // {{{ fetchRow() + + /** + * Fetch a row and insert the data into an existing array. + * + * @param int $fetchmode how the array data should be indexed + * @param int $rownum number of the row where the data can be found + * @return int data array on success, a MDB2 error on failure + * @access public + */ + function &fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null) + { + if (!is_null($rownum)) { + $seek = $this->seek($rownum); + if (PEAR::isError($seek)) { + return $seek; + } + } + if ($fetchmode == MDB2_FETCHMODE_DEFAULT) { + $fetchmode = $this->db->fetchmode; + } + if ($fetchmode & MDB2_FETCHMODE_ASSOC) { + //$row = @sqlite_fetch_array($this->result, SQLITE_ASSOC); + $row=$this->result->fetchArray(SQLITE3_ASSOC); + if (is_array($row) + && $this->db->options['portability'] & MDB2_PORTABILITY_FIX_CASE + ) { + $row = array_change_key_case($row, $this->db->options['field_case']); + } + } else { + $row=$this->result->fetchArray(SQLITE3_NUM); + } + if (!$row) { + if ($this->result === false) { + $err =$this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, + 'resultset has already been freed', __FUNCTION__); + return $err; + } + $null = null; + return $null; + } + $mode = $this->db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL; + $rtrim = false; + if ($this->db->options['portability'] & MDB2_PORTABILITY_RTRIM) { + if (empty($this->types)) { + $mode += MDB2_PORTABILITY_RTRIM; + } else { + $rtrim = true; + } + } + if ($mode) { + $this->db->_fixResultArrayValues($row, $mode); + } + if (!empty($this->types)) { + $row = $this->db->datatype->convertResultRow($this->types, $row, $rtrim); + } + if (!empty($this->values)) { + $this->_assignBindColumns($row); + } + if ($fetchmode === MDB2_FETCHMODE_OBJECT) { + $object_class = $this->db->options['fetch_class']; + if ($object_class == 'stdClass') { + $row = (object) $row; + } else { + $row = new $object_class($row); + } + } + ++$this->rownum; + return $row; + } + + // }}} + // {{{ _getColumnNames() + + /** + * Retrieve the names of columns returned by the DBMS in a query result. + * + * @return mixed Array variable that holds the names of columns as keys + * or an MDB2 error on failure. + * Some DBMS may not return any columns when the result set + * does not contain any rows. + * @access private + */ + function _getColumnNames() + { + $columns = array(); + $numcols = $this->numCols(); + if (PEAR::isError($numcols)) { + return $numcols; + } + for ($column = 0; $column < $numcols; $column++) { + $column_name = $this->result->getColumnName($column); + $columns[$column_name] = $column; + } + if ($this->db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { + $columns = array_change_key_case($columns, $this->db->options['field_case']); + } + return $columns; + } + + // }}} + // {{{ numCols() + + /** + * Count the number of columns returned by the DBMS in a query result. + * + * @access public + * @return mixed integer value with the number of columns, a MDB2 error + * on failure + */ + function numCols() + { + $this->result->numColumns(); + } +} + +/** + * MDB2 SQLite buffered result driver + * + * @package MDB2 + * @category Database + * @author Lukas Smith + */ +class MDB2_BufferedResult_sqlite3 extends MDB2_Result_sqlite3 +{ + // {{{ seek() + + /** + * Seek to a specific row in a result set + * + * @param int $rownum number of the row where the data can be found + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function seek($rownum = 0) + { + $this->result->reset(); + for($i=0;$i<$rownum;$i++){ + $this->result->fetchArray(); + } + $this->rownum = $rownum - 1; + return MDB2_OK; + } + + // }}} + // {{{ valid() + + /** + * Check if the end of the result set has been reached + * + * @return mixed true or false on sucess, a MDB2 error on failure + * @access public + */ + function valid() + { + $numrows = $this->numRows(); + if (PEAR::isError($numrows)) { + return $numrows; + } + return $this->rownum < ($numrows - 1); + } + + // }}} + // {{{ numRows() + + /** + * Returns the number of rows in a result object + * + * @return mixed MDB2 Error Object or the number of rows + * @access public + */ + function numRows() + { + $rows = 0; + $this->result->reset(); + while($this->result->fetchArray()){ + $rows++; + } + $this->result->reset(); + return $rows; + } +} + +/** + * MDB2 SQLite statement driver + * + * @package MDB2 + * @category Database + * @author Lukas Smith + */ +class MDB2_Statement_sqlite3 extends MDB2_Statement_Common +{ + +} + +?> \ No newline at end of file -- cgit v1.2.3 From 1ea43dd7f9928ac6e74f36822ccb4deeeb804db3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 13 Jun 2011 04:06:43 +0200 Subject: make OC_DB work with the sqlite3 driver --- lib/database.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/database.php b/lib/database.php index 0f0950d05ad..8d7c76756c1 100644 --- a/lib/database.php +++ b/lib/database.php @@ -60,10 +60,10 @@ class OC_DB { 'quote_identifier' => true ); // Add the dsn according to the database type - if( $CONFIG_DBTYPE == 'sqlite' ){ + if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ // sqlite $dsn = array( - 'phptype' => 'sqlite', + 'phptype' => $CONFIG_DBTYPE, 'database' => "$datadir/$CONFIG_DBNAME.db", 'mode' => '0644' ); } @@ -100,6 +100,9 @@ class OC_DB { // We always, really always want associative arrays self::$DBConnection->setFetchMode(MDB2_FETCHMODE_ASSOC); + + //we need to function module for query pre-procesing + self::$DBConnection->loadModule('Function'); } // we are done. great! @@ -297,15 +300,14 @@ class OC_DB { * and replaces the ` woth ' or " according to the database driver. */ private static function processQuery( $query ){ + self::connect(); // We need Database type and table prefix $CONFIG_DBTYPE = OC_CONFIG::getValue( "dbtype", "sqlite" ); $CONFIG_DBTABLEPREFIX = OC_CONFIG::getValue( "dbtableprefix", "oc_" ); // differences is getting the current timestamp - if( $CONFIG_DBTYPE == 'sqlite' ){ - $query = str_replace( 'NOW()', "strftime('%s', 'now')", $query ); - $query = str_replace( 'now()', "strftime('%s', 'now')", $query ); - } + $query = str_replace( 'NOW()', self::$DBConnection->now(), $query ); + $query = str_replace( 'now()', self::$DBConnection->now(), $query ); // differences in escaping of table names (` for mysql) // Problem: what if there is a ` in the value we want to insert? -- cgit v1.2.3 From 80194daec7b612a356daac7c13ccc904a70ffbbf Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 8 Jun 2011 23:12:06 +0200 Subject: Fix php4 legacy calls Reviewed-by: Robin Appelman Reviewboard: http://git.reviewboard.kde.org/r/101549/ --- 3dparty/MDB2.php | 10 +++++----- 3dparty/MDB2/Schema/Parser.php | 9 +-------- 3dparty/MDB2/Schema/Validate.php | 5 ----- 3dparty/PEAR.php | 12 ++++++------ 4 files changed, 12 insertions(+), 24 deletions(-) diff --git a/3dparty/MDB2.php b/3dparty/MDB2.php index 30e564f1457..fbc7107914e 100644 --- a/3dparty/MDB2.php +++ b/3dparty/MDB2.php @@ -639,7 +639,7 @@ class MDB2 */ static function isError($data, $code = null) { - if (is_a($data, 'MDB2_Error')) { + if ($data instanceof MDB2_Error) { if (is_null($code)) { return true; } elseif (is_string($code)) { @@ -666,7 +666,7 @@ class MDB2 */ static function isConnection($value) { - return is_a($value, 'MDB2_Driver_Common'); + return ($value instanceof MDB2_Driver_Common); } // }}} @@ -683,7 +683,7 @@ class MDB2 */ static function isResult($value) { - return is_a($value, 'MDB2_Result'); + return $value instanceof MDB2_Result; } // }}} @@ -700,7 +700,7 @@ class MDB2 */ static function isResultCommon($value) { - return is_a($value, 'MDB2_Result_Common'); + return ($value instanceof MDB2_Result_Common); } // }}} @@ -717,7 +717,7 @@ class MDB2 */ static function isStatement($value) { - return is_a($value, 'MDB2_Statement_Common'); + return $value instanceof MDB2_Statement_Common; } // }}} diff --git a/3dparty/MDB2/Schema/Parser.php b/3dparty/MDB2/Schema/Parser.php index bd7a9657932..b740ef55fa8 100644 --- a/3dparty/MDB2/Schema/Parser.php +++ b/3dparty/MDB2/Schema/Parser.php @@ -127,13 +127,6 @@ class MDB2_Schema_Parser extends XML_Parser $this->val =new MDB2_Schema_Validate($fail_on_invalid_names, $valid_types, $force_defaults); } - function MDB2_Schema_Parser($variables, $fail_on_invalid_names = true, - $structure = false, $valid_types = array(), - $force_defaults = true) - { - $this->__construct($variables, $fail_on_invalid_names, $structure, $valid_types, $force_defaults); - } - function startHandler($xp, $element, $attribs) { if (strtolower($element) == 'variable') { @@ -503,7 +496,7 @@ class MDB2_Schema_Parser extends XML_Parser $this->element = implode('-', $this->elements); } - function &raiseError($msg = null, $xmlecode = 0, $xp = null, $ecode = MDB2_SCHEMA_ERROR_PARSE,$a=null,$b=null,$c=null) + function raiseError($msg = null, $xmlecode = 0, $xp = null, $ecode = MDB2_SCHEMA_ERROR_PARSE,$a=null,$b=null,$c=null) { if (is_null($this->error)) { $error = ''; diff --git a/3dparty/MDB2/Schema/Validate.php b/3dparty/MDB2/Schema/Validate.php index 21be024ce9f..217cf51b959 100644 --- a/3dparty/MDB2/Schema/Validate.php +++ b/3dparty/MDB2/Schema/Validate.php @@ -91,11 +91,6 @@ class MDB2_Schema_Validate $this->force_defaults = $force_defaults; } - function MDB2_Schema_Validate($fail_on_invalid_names = true, $valid_types = array(), $force_defaults = true) - { - $this->__construct($fail_on_invalid_names, $valid_types, $force_defaults); - } - // }}} // {{{ raiseError() diff --git a/3dparty/PEAR.php b/3dparty/PEAR.php index 9760b9d265a..f832c0d4916 100644 --- a/3dparty/PEAR.php +++ b/3dparty/PEAR.php @@ -249,7 +249,7 @@ class PEAR */ static function isError($data, $code = null) { - if (is_a($data, 'PEAR_Error')) { + if ($data instanceof PEAR_Error) { if (is_null($code)) { return true; } elseif (is_string($code)) { @@ -305,7 +305,7 @@ class PEAR function setErrorHandling($mode = null, $options = null) { - if (isset($this) && is_a($this, 'PEAR')) { + if (isset($this) && $this instanceof PEAR) { $setmode = &$this->_default_error_mode; $setoptions = &$this->_default_error_options; } else { @@ -557,7 +557,7 @@ class PEAR $code = null, $userinfo = null) { - if (isset($this) && is_a($this, 'PEAR')) { + if (isset($this) && $this instanceof PEAR) { return $this->raiseError($message, $code, null, null, $userinfo); } else { return PEAR::raiseError($message, $code, null, null, $userinfo); @@ -653,7 +653,7 @@ class PEAR function pushErrorHandling($mode, $options = null) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; - if (isset($this) && is_a($this, 'PEAR')) { + if (isset($this) && $this instanceof PEAR) { $def_mode = &$this->_default_error_mode; $def_options = &$this->_default_error_options; } else { @@ -662,7 +662,7 @@ class PEAR } $stack[] = array($def_mode, $def_options); - if (isset($this) && is_a($this, 'PEAR')) { + if (isset($this) && $this instanceof PEAR) { $this->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); @@ -687,7 +687,7 @@ class PEAR array_pop($stack); list($mode, $options) = $stack[sizeof($stack) - 1]; array_pop($stack); - if (isset($this) && is_a($this, 'PEAR')) { + if (isset($this) && $this instanceof PEAR) { $this->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); -- cgit v1.2.3 From 1e0fe05bef4a935c23d290ebda67059679da629f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 13 Jun 2011 23:15:15 +0200 Subject: fix error with empty config file --- lib/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config.php b/lib/config.php index 6af9fcbe5ad..60c6739a3fe 100644 --- a/lib/config.php +++ b/lib/config.php @@ -139,7 +139,7 @@ class OC_CONFIG{ // Include the file, save the data from $CONFIG include( "$SERVERROOT/config/config.php" ); - if( isset( $CONFIG ) || is_array( $CONFIG )){ + if( isset( $CONFIG ) && is_array( $CONFIG )){ self::$cache = $CONFIG; } -- cgit v1.2.3 From f863002e95e864939923e286ba18e7adfbb786e7 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 13 Jun 2011 23:18:39 +0200 Subject: use sqlite3 if sqlite2 isn't available --- lib/setup.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index 72507f221b9..ab4a786c435 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -1,6 +1,6 @@ \ No newline at end of file +?> -- cgit v1.2.3 From 00858efbe27be3e4e594a9eba40214f451188af5 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 14 Jun 2011 01:11:49 +0200 Subject: store numbers as strings to prevent errors with numeric passwords --- lib/config.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/config.php b/lib/config.php index 60c6739a3fe..cd18ddd499c 100644 --- a/lib/config.php +++ b/lib/config.php @@ -169,9 +169,6 @@ class OC_CONFIG{ $value = $value ? 'true' : 'false'; $content .= "\"$key\" => $value,\n"; } - elseif( is_numeric( $value )){ - $content .= "\"$key\" => $value,\n"; - } else{ $value = str_replace( "'", "\\'", $value ); $content .= "\"$key\" => '$value',\n"; -- cgit v1.2.3 From f6eb7c120538bea8e488a868f9f3d99906a1ea0f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 14 Jun 2011 01:20:26 +0200 Subject: make use of native sqlite3 prepared statements --- lib/MDB2/Driver/sqlite3.php | 331 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 329 insertions(+), 2 deletions(-) diff --git a/lib/MDB2/Driver/sqlite3.php b/lib/MDB2/Driver/sqlite3.php index aadc5748b06..abd2b16ad4b 100644 --- a/lib/MDB2/Driver/sqlite3.php +++ b/lib/MDB2/Driver/sqlite3.php @@ -91,7 +91,7 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common $this->supported['auto_increment'] = true; $this->supported['primary_key'] = false; // requires alter table implementation $this->supported['result_introspection'] = false; // not implemented - $this->supported['prepared_statements'] = 'emulated'; + $this->supported['prepared_statements'] = true; $this->supported['identifier_quoting'] = true; $this->supported['pattern_escaping'] = false; $this->supported['new_link'] = false; @@ -511,7 +511,6 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common $result = $is_manip ? 0 : null; return $result; } -// print_r(debug_backtrace()); $result=$this->connection->query($query.';'); $this->_lasterror = $this->connection->lastErrorMsg(); @@ -814,6 +813,118 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common $query = "SELECT MAX($seqcol_name) FROM $sequence_name"; return $this->queryOne($query, 'integer'); } + + /** + * Prepares a query for multiple execution with execute(). + * With some database backends, this is emulated. + * prepare() requires a generic query as string like + * 'INSERT INTO numbers VALUES(?,?)' or + * 'INSERT INTO numbers VALUES(:foo,:bar)'. + * The ? and :name and are placeholders which can be set using + * bindParam() and the query can be sent off using the execute() method. + * The allowed format for :name can be set with the 'bindname_format' option. + * + * @param string $query the query to prepare + * @param mixed $types array that contains the types of the placeholders + * @param mixed $result_types array that contains the types of the columns in + * the result set or MDB2_PREPARE_RESULT, if set to + * MDB2_PREPARE_MANIP the query is handled as a manipulation query + * @param mixed $lobs key (field) value (parameter) pair for all lob placeholders + * @return mixed resource handle for the prepared query on success, a MDB2 + * error on failure + * @access public + * @see bindParam, execute + */ + function &prepare($query, $types = null, $result_types = null, $lobs = array()) + { + if ($this->options['emulate_prepared'] + || $this->supported['prepared_statements'] !== true + ) { + $obj =& parent::prepare($query, $types, $result_types, $lobs); + return $obj; + } + $this->last_query = $query; + $is_manip = ($result_types === MDB2_PREPARE_MANIP); + $offset = $this->offset; + $limit = $this->limit; + $this->offset = $this->limit = 0; + $query = $this->_modifyQuery($query, $is_manip, $limit, $offset); + $result = $this->debug($query, __FUNCTION__, array('is_manip' => $is_manip, 'when' => 'pre')); + if ($result) { + if (PEAR::isError($result)) { + return $result; + } + $query = $result; + } + $placeholder_type_guess = $placeholder_type = null; + $question = '?'; + $colon = ':'; + $positions = array(); + $position = 0; + while ($position < strlen($query)) { + $q_position = strpos($query, $question, $position); + $c_position = strpos($query, $colon, $position); + if ($q_position && $c_position) { + $p_position = min($q_position, $c_position); + } elseif ($q_position) { + $p_position = $q_position; + } elseif ($c_position) { + $p_position = $c_position; + } else { + break; + } + if (is_null($placeholder_type)) { + $placeholder_type_guess = $query[$p_position]; + } + + $new_pos = $this->_skipDelimitedStrings($query, $position, $p_position); + if (PEAR::isError($new_pos)) { + return $new_pos; + } + if ($new_pos != $position) { + $position = $new_pos; + continue; //evaluate again starting from the new position + } + + + if ($query[$position] == $placeholder_type_guess) { + if (is_null($placeholder_type)) { + $placeholder_type = $query[$p_position]; + $question = $colon = $placeholder_type; + } + if ($placeholder_type == ':') { + $regexp = '/^.{'.($position+1).'}('.$this->options['bindname_format'].').*$/s'; + $parameter = preg_replace($regexp, '\\1', $query); + if ($parameter === '') { + $err =& $this->raiseError(MDB2_ERROR_SYNTAX, null, null, + 'named parameter name must match "bindname_format" option', __FUNCTION__); + return $err; + } + $positions[$p_position] = $parameter; + $query = substr_replace($query, '?', $position, strlen($parameter)+1); + } else { + $positions[$p_position] = count($positions); + } + $position = $p_position + 1; + } else { + $position = $p_position; + } + } + $connection = $this->getConnection(); + if (PEAR::isError($connection)) { + return $connection; + } + $statement =$this->connection->prepare($query); + if (!$statement) { + return $this->db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'unable to prepare statement: '.$query); + } + + $class_name = 'MDB2_Statement_'.$this->phptype; + $obj = new $class_name($this, $statement, $positions, $query, $types, $result_types, $is_manip, $limit, $offset); + $this->debug($query, __FUNCTION__, array('is_manip' => $is_manip, 'when' => 'post', 'result' => $obj)); + return $obj; + } } /** @@ -1018,7 +1129,223 @@ class MDB2_BufferedResult_sqlite3 extends MDB2_Result_sqlite3 */ class MDB2_Statement_sqlite3 extends MDB2_Statement_Common { + // }}} + // {{{ function bindValue($parameter, &$value, $type = null) + + private function getParamType($type){ + switch(strtolower($type)){ + case 'text': + return SQLITE3_TEXT; + case 'boolean': + case 'integer': + return SQLITE3_INTEGER; + case 'float': + return SQLITE3_FLOAT; + case 'blob': + return SQLITE3_BLOB; + } + } + /** + * Set the value of a parameter of a prepared query. + * + * @param int the order number of the parameter in the query + * statement. The order number of the first parameter is 1. + * @param mixed value that is meant to be assigned to specified + * parameter. The type of the value depends on the $type argument. + * @param string specifies the type of the field + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * + * @access public + */ + function bindValue($parameter, $value, $type = null){ + if($type){ + $type=$this->getParamType($type); + $this->statement->bindValue($parameter,$value,$type); + }else{ + $this->statement->bindValue($parameter,$value); + } + return MDB2_OK; + } + + /** + * Bind a variable to a parameter of a prepared query. + * + * @param int the order number of the parameter in the query + * statement. The order number of the first parameter is 1. + * @param mixed variable that is meant to be bound to specified + * parameter. The type of the value depends on the $type argument. + * @param string specifies the type of the field + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * + * @access public + */ + function bindParam($parameter, &$value, $type = null){ + if($type){ + $type=$this->getParamType($type); + $this->statement->bindParam($parameter,$value,$type); + }else{ + $this->statement->bindParam($parameter,$value); + } + return MDB2_OK; + } + + /** + * Release resources allocated for the specified prepared query. + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * @access public + */ + function free() + { + $this->statement->close(); + } + /** + * Execute a prepared query statement helper method. + * + * @param mixed $result_class string which specifies which result class to use + * @param mixed $result_wrap_class string which specifies which class to wrap results in + * + * @return mixed MDB2_Result or integer (affected rows) on success, + * a MDB2 error on failure + * @access private + */ + function &_execute($result_class = true, $result_wrap_class = false){ + if (is_null($this->statement)) { + $result =& parent::_execute($result_class, $result_wrap_class); + return $result; + } + $this->db->last_query = $this->query; + $this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'pre', 'parameters' => $this->values)); + if ($this->db->getOption('disable_query')) { + $result = $this->is_manip ? 0 : null; + return $result; + } + + $connection = $this->db->getConnection(); + if (PEAR::isError($connection)) { + return $connection; + } + + $result = $this->statement->execute(); + if ($result==false) { + $err =$this->db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, + 'cant execute statement', __FUNCTION__); + } + + if ($this->is_manip) { + $affected_rows = $this->db->_affectedRows($connection, $result); + return $affected_rows; + } + + $result =& $this->db->_wrapResult($result, $this->result_types, + $result_class, $result_wrap_class, $this->limit, $this->offset); + $this->db->debug($this->query, 'execute', array('is_manip' => $this->is_manip, 'when' => 'post', 'result' => $result)); + return $result; + } + + /** + * Set the values of multiple a parameter of a prepared query in bulk. + * + * @param array specifies all necessary information + * for bindValue() the array elements must use keys corresponding to + * the number of the position of the parameter. + * @param array specifies the types of the fields + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * + * @access public + * @see bindParam() + */ + function bindValueArray($values, $types = null) + { + $types = is_array($types) ? array_values($types) : array_fill(0, count($values), null); + $parameters = array_keys($values); + foreach ($parameters as $key => $parameter) { + $this->db->pushErrorHandling(PEAR_ERROR_RETURN); + $this->db->expectError(MDB2_ERROR_NOT_FOUND); + $err = $this->bindValue($parameter+1, $values[$parameter], $types[$key]); + $this->db->popExpect(); + $this->db->popErrorHandling(); + if (PEAR::isError($err)) { + if ($err->getCode() == MDB2_ERROR_NOT_FOUND) { + //ignore (extra value for missing placeholder) + continue; + } + return $err; + } + } + return MDB2_OK; + } + // }}} + // {{{ function bindParamArray(&$values, $types = null) + + /** + * Bind the variables of multiple a parameter of a prepared query in bulk. + * + * @param array specifies all necessary information + * for bindParam() the array elements must use keys corresponding to + * the number of the position of the parameter. + * @param array specifies the types of the fields + * + * @return mixed MDB2_OK on success, a MDB2 error on failure + * + * @access public + * @see bindParam() + */ + function bindParamArray(&$values, $types = null) + { + $types = is_array($types) ? array_values($types) : array_fill(0, count($values), null); + $parameters = array_keys($values); + foreach ($parameters as $key => $parameter) { + $err = $this->bindParam($parameter+1, $values[$parameter], $types[$key]); + if (PEAR::isError($err)) { + return $err; + } + } + return MDB2_OK; + } + + // }}} + // {{{ function &execute($values = null, $result_class = true, $result_wrap_class = false) + + /** + * Execute a prepared query statement. + * + * @param array specifies all necessary information + * for bindParam() the array elements must use keys corresponding + * to the number of the position of the parameter. + * @param mixed specifies which result class to use + * @param mixed specifies which class to wrap results in + * + * @return mixed MDB2_Result or integer (affected rows) on success, + * a MDB2 error on failure + * @access public + */ + function &execute($values = null, $result_class = true, $result_wrap_class = false) + { + if (is_null($this->positions)) { + return $this->db->raiseError(MDB2_ERROR, null, null, + 'Prepared statement has already been freed', __FUNCTION__); + } + $values = (array)$values; + if (!empty($values)) { + if(count($this->types)){ + $types=$this->types; + }else{ + $types=null; + } + $err = $this->bindValueArray($values,$types); + if (PEAR::isError($err)) { + return $this->db->raiseError(MDB2_ERROR, null, null, + 'Binding Values failed with message: ' . $err->getMessage(), __FUNCTION__); + } + } + $result =$this->_execute($result_class, $result_wrap_class); + return $result; + } } ?> \ No newline at end of file -- cgit v1.2.3 From 141ffbb1f53f465e64125a020dee6304075a51aa Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 14 Jun 2011 01:22:58 +0200 Subject: small fix in filesystem test --- tests/index.php | 6 +++--- tests/lib/filesystem.php | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/index.php b/tests/index.php index 5e0dbc2c838..30ebde11235 100644 --- a/tests/index.php +++ b/tests/index.php @@ -30,7 +30,7 @@ require_once('testcase.php'); require_once('template.php'); $testCases=loadFiles(__DIR__,array('index.php','templates')); - +ob_end_clean(); $testResults=array(); foreach($testCases as $testCaseClass){ $testCase=new $testCaseClass(); @@ -65,10 +65,10 @@ function loadFiles($path,$exclude=false){ $dh=opendir($path); while($file=readdir($dh)){ if($file!='.' && $file!='..' && array_search($file,$exclude)===false){ - if(is_file($path.'/'.$file)){ + if(is_file($path.'/'.$file) and substr($file,-3)=='php'){ $result=require_once($path.'/'.$file); $results[]=$result; - }else{ + }elseif(is_dir($path.'/'.$file)){ $subResults=loadFiles($path.'/'.$file); $results=array_merge($results,$subResults); } diff --git a/tests/lib/filesystem.php b/tests/lib/filesystem.php index 73b0069519f..1b1703a06d7 100644 --- a/tests/lib/filesystem.php +++ b/tests/lib/filesystem.php @@ -84,7 +84,6 @@ class OC_FILEYSYSTEM_Test extends OC_TestCase public function readfile(){ OC_FILESYSTEM::file_put_contents('/dummy','foo'); - ob_clean(); ob_start(); OC_FILESYSTEM::readfile('/dummy'); $this->assertEquals('foo', ob_get_contents(),'Unexpected output of readfile'); -- cgit v1.2.3 From 7d3ae7ae9baa7a2212fb80f31434d746e811d455 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 14 Jun 2011 16:03:57 +0200 Subject: fix settings page for non-admin users --- lib/template.php | 4 ++-- templates/layout.admin.php | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/template.php b/lib/template.php index 0d6776aa26d..93adc35eca7 100644 --- a/lib/template.php +++ b/lib/template.php @@ -206,9 +206,9 @@ class OC_TEMPLATE{ $page->assign('searchbox', $search->fetchPage()); // Add menu data if( OC_GROUP::inGroup( $_SESSION["user_id"], "admin" )){ - $page->assign( "settingsnavigation", OC_APP::getSettingsNavigation()); + $page->assign( "adminnavigation", OC_APP::getAdminNavigation()); } - $page->assign( "adminnavigation", OC_APP::getAdminNavigation()); + $page->assign( "settingsnavigation", OC_APP::getSettingsNavigation()); } else { diff --git a/templates/layout.admin.php b/templates/layout.admin.php index 541427f5d5e..36b824639d3 100644 --- a/templates/layout.admin.php +++ b/templates/layout.admin.php @@ -33,14 +33,16 @@ - -
  • class="active">
  • - - -
  • - - - + + +
  • class="active">
  • + + +
  • + + + + -- cgit v1.2.3 From 1b6307471e0fe3c79b09682c4afd5c8d9d44896c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 14 Jun 2011 16:13:51 +0200 Subject: remove outdated plugins entry in settings page --- admin/appinfo/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php index e87013bd993..775575e22a8 100644 --- a/admin/appinfo/app.php +++ b/admin/appinfo/app.php @@ -5,7 +5,6 @@ OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administratio OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" =>"System", "icon" => OC_HELPER::imagePath( "admin", "administration.png" ))); OC_APP::addAdminPage( array( "id" => "core_users", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users", "icon" => OC_HELPER::imagePath( "admin", "users.png" ))); OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps", "icon" => OC_HELPER::imagePath( "admin", "apps.png" ))); -OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "plugins.png" ))); // Add subentries for App installer OC_APP::addNavigationSubEntry( "core_apps", array( "id" => "core_apps_installed", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php?add=some¶meters=here" ), "name" => "Installed apps", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); -- cgit v1.2.3 From fd2c1839a1e2d306cc55c810c4d3741c67b9dab5 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 14 Jun 2011 16:16:50 +0200 Subject: remove plugins settings page --- admin/plugins.php | 52 --------------------------------------------- admin/templates/plugins.php | 28 ------------------------ 2 files changed, 80 deletions(-) delete mode 100644 admin/plugins.php delete mode 100644 admin/templates/plugins.php diff --git a/admin/plugins.php b/admin/plugins.php deleted file mode 100644 index fd1933a7fa1..00000000000 --- a/admin/plugins.php +++ /dev/null @@ -1,52 +0,0 @@ -. -* -*/ - -require_once('../lib/base.php'); -require( 'template.php' ); -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); - exit(); -} - -OC_APP::setActiveNavigationEntry( "core_plugins" ); -$plugins=array(); -$blacklist=OC_PLUGIN::loadBlackList(); - -foreach( OC_PLUGIN::listPlugins() as $i ){ - // Gather data about plugin - $data = OC_PLUGIN::getPluginData($plugin); - - // Is it enabled? - $data["enabled"] = ( array_search( $plugin, $blacklist ) === false ); - - // Add the data - $plugins[] = $data; -} - - -$tmpl = new OC_TEMPLATE( "admin", "plugins", "admin" ); -$tmpl->assign( "plugins", $plugins ); -$tmpl->printPage(); - -?> - diff --git a/admin/templates/plugins.php b/admin/templates/plugins.php deleted file mode 100644 index 8f5e87d3e80..00000000000 --- a/admin/templates/plugins.php +++ /dev/null @@ -1,28 +0,0 @@ - -

    Administration

    -

    Plugins

    - - - - - - - - - - - - - - - - - - - - -
    NameDescriptionVersionAuthor
    enable
    -- cgit v1.2.3 From 3062723c343c25fe8e5d9482b699eaa4e4f6a6b7 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 16 Jun 2011 14:56:49 +0200 Subject: default to sqlite3 over sqlite2 for new installations --- lib/setup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index ab4a786c435..c2757021f20 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -66,8 +66,8 @@ class OC_SETUP { $password = htmlspecialchars_decode($options['adminpass']); $datadir = htmlspecialchars_decode($options['directory']); - //if only sqlite3 is available use that. - if($dbtype=='sqlite' and !is_callable('sqlite_open')){ + //use sqlite3 when available, otherise sqlite2 will be used. + if($dbtype=='sqlite' and class_exists('SQLite3')){ $dbtype='sqlite3'; } -- cgit v1.2.3 From 300b8c06cfacbae7df4f7886851cea8c895111c5 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 16 Jun 2011 22:44:16 +0200 Subject: allow plugins to cancel filesystem operations using the provided hooks --- lib/filesystem.php | 152 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 103 insertions(+), 49 deletions(-) diff --git a/lib/filesystem.php b/lib/filesystem.php index 27a937f5e4c..0faa7404700 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -29,10 +29,13 @@ * * Hooks provided: * read(path) - * write(path) - * create(path) (when a file is created both, write and create will be emited) - * delete(path) - * rename(oldpath,newpath) + * write(path, &run) + * create(path, &run) (when a file is created, both create and write will be emited in that order) + * delete(path, &run) + * rename(oldpath,newpath, &run) + * copy(oldpath,newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emited in that order) + * + * the &run parameter can be set to false to prevent the operation from occuring */ class OC_FILESYSTEM{ static private $storages=array(); @@ -222,14 +225,23 @@ class OC_FILESYSTEM{ static public function mkdir($path){ $parent=substr($path,0,strrpos($path,'/')); if(self::canWrite($parent) and $storage=self::getStorage($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); - return $storage->mkdir(self::getInternalPath($path)); + $run=true; + OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path, 'run' => &$run)); + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); + } + if($run){ + return $storage->mkdir(self::getInternalPath($path)); + } } } static public function rmdir($path){ if(self::canWrite($path) and $storage=self::getStorage($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'delete', array( 'path' => $path)); - return $storage->rmdir(self::getInternalPath($path)); + $run=true; + OC_HOOK::emit( 'OC_FILESYSTEM', 'delete', array( 'path' => $path, 'run' => &$run)); + if($run){ + return $storage->rmdir(self::getInternalPath($path)); + } } } static public function opendir($path){ @@ -319,55 +331,76 @@ class OC_FILESYSTEM{ } static public function file_put_contents($path,$data){ if(self::canWrite($path) and $storage=self::getStorage($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path)); + $run=true; if(!self::file_exists($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); + OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path, 'run' => &$run)); + } + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); + } + if($run){ + return $storage->file_put_contents(self::getInternalPath($path),$data); } - return $storage->file_put_contents(self::getInternalPath($path),$data); } } static public function unlink($path){ if(self::canWrite($path) and $storage=self::getStorage($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'delete', array( 'path' => $path)); - return $storage->unlink(self::getInternalPath($path)); + $run=true; + OC_HOOK::emit( 'OC_FILESYSTEM', 'delete', array( 'path' => $path, 'run' => &$run)); + if($run){ + return $storage->unlink(self::getInternalPath($path)); + } } } static public function rename($path1,$path2){ if(self::canWrite($path1) and self::canWrite($path2)){ - $mp1=self::getMountPoint($path1); - $mp2=self::getMountPoint($path2); - if($mp1==$mp2){ - if($storage=self::getStorage($path1)){ - return $storage->rename(self::getInternalPath($path1),self::getInternalPath($path2)); + $run=true; + OC_HOOK::emit( 'OC_FILESYSTEM', 'rename', array( 'oldpath' => $path1 ,'newpath'=>$path2, 'run' => &$run)); + if($run){ + $mp1=self::getMountPoint($path1); + $mp2=self::getMountPoint($path2); + if($mp1==$mp2){ + if($storage=self::getStorage($path1)){ + return $storage->rename(self::getInternalPath($path1),self::getInternalPath($path2)); + } + }elseif($storage1=self::getStorage($path1) and $storage2=self::getStorage($path2)){ + $tmpFile=$storage1->toTmpFile(self::getInternalPath($path1)); + $result=$storage2->fromTmpFile(self::getInternalPath($path2)); + $storage1->unlink(self::getInternalPath($path1)); + return $result; } - }elseif($storage1=self::getStorage($path1) and $storage2=self::getStorage($path2)){ - $tmpFile=$storage1->toTmpFile(self::getInternalPath($path1)); - $result=$storage2->fromTmpFile(self::getInternalPath($path2)); - $storage1->unlink(self::getInternalPath($path1)); - return $result; } - OC_HOOK::emit( 'OC_FILESYSTEM', 'rename', array( 'oldpath' => $path1 ,'newpath'=>$path2)); } } static public function copy($path1,$path2){ if(self::canRead($path1) and self::canWrite($path2)){ - $mp1=self::getMountPoint($path1); - $mp2=self::getMountPoint($path2); - if($mp1==$mp2){ - if($storage=self::getStorage($path1)){ - return $storage->copy(self::getInternalPath($path1),self::getInternalPath($path2)); + $run=true; + OC_HOOK::emit( 'OC_FILESYSTEM', 'copy', array( 'oldpath' => $path1 ,'newpath'=>$path2, 'run' => &$run)); + if($run and !self::file_exists($path2)){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path2, 'run' => &$run)); + } + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path2, 'run' => &$run)); + } + if($run){ + $mp1=self::getMountPoint($path1); + $mp2=self::getMountPoint($path2); + if($mp1==$mp2){ + if($storage=self::getStorage($path1)){ + return $storage->copy(self::getInternalPath($path1),self::getInternalPath($path2)); + } + }elseif($storage1=self::getStorage($path1) and $storage2=self::getStorage($path2)){ + $tmpFile=$storage1->toTmpFile(self::getInternalPath($path1)); + return $storage2->fromTmpFile(self::getInternalPath($path2)); } - }elseif($storage1=self::getStorage($path1) and $storage2=self::getStorage($path2)){ - $tmpFile=$storage1->toTmpFile(self::getInternalPath($path1)); - return $storage2->fromTmpFile(self::getInternalPath($path2)); } - OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path2)); } } static public function fopen($path,$mode){ $allowed=((strpos($path,'r')===false and strpos($path,'r+')!==false and self::canRead) or self::canWrite($path)); if($allowed){ if($storage=self::getStorage($path)){ + $run=true; switch($mode){ case 'r': OC_HOOK::emit( 'OC_FILESYSTEM', 'read', array( 'path' => $path)); @@ -377,21 +410,27 @@ class OC_FILESYSTEM{ case 'x+': case 'a+': OC_HOOK::emit( 'OC_FILESYSTEM', 'read', array( 'path' => $path)); - OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path)); if(!self::file_exists($path)){ OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); } + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); + } break; case 'w': case 'x': case 'a': - OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path)); if(!self::file_exists($path)){ OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); } + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); + } break; } - return $storage->fopen(self::getInternalPath($path),$mode); + if($run){ + return $storage->fopen(self::getInternalPath($path),$mode); + } } } } @@ -403,20 +442,30 @@ class OC_FILESYSTEM{ } static public function fromTmpFile($tmpFile,$path){ if(self::canWrite($path) and $storage=self::getStorage($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path)); + $run=true; if(!self::file_exists($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); + OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path, 'run' => &$run)); + } + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); + } + if($run){ + return $storage->fromTmpFile($tmpFile,self::getInternalPath($path)); } - return $storage->fromTmpFile($tmpFile,self::getInternalPath($path)); } } static public function fromUploadedFile($tmpFile,$path){ if(self::canWrite($path) and $storage=self::getStorage($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path)); - if(!self::file_exists($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); + $run=true; + if($run and !self::file_exists($path)){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path, 'run' => &$run)); + } + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); + } + if($run){ + return $storage->fromUploadedFile($tmpFile,self::getInternalPath($path)); } - return $storage->fromUploadedFile($tmpFile,self::getInternalPath($path)); } } static public function getMimeType($path){ @@ -426,8 +475,11 @@ class OC_FILESYSTEM{ } static public function delTree($path){ if(self::canWrite($path) and $storage=self::getStorage($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'delete', array( 'path' => $path)); - return $storage->delTree(self::getInternalPath($path)); + $run=true; + OC_HOOK::emit( 'OC_FILESYSTEM', 'delete', array( 'path' => $path, 'run' => &$run)); + if($run){ + return $storage->delTree(self::getInternalPath($path)); + } } } static public function find($path){ @@ -475,10 +527,12 @@ class OC_FILESYSTEM{ $fakeRootLength=strlen(self::$fakeRoot); foreach(self::$storages as $mountpoint=>$storage){ $results=$storage->search($query); - foreach($results as $result){ - $file=str_replace('//','/',$mountpoint.$result); - $file=substr($file,$fakeRootLength); - $files[]=$file; + if(is_array($results)){ + foreach($results as $result){ + $file=str_replace('//','/',$mountpoint.$result); + $file=substr($file,$fakeRootLength); + $files[]=$file; + } } } return $files; -- cgit v1.2.3 From 07b72ca53459bcd150a21e2133a7d5936d92cbec Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 16 Jun 2011 23:15:58 +0200 Subject: make the system for default fileactions more flexible --- files/js/fileactions.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/files/js/fileactions.js b/files/js/fileactions.js index dec1d1cfb04..1bdbc4ac0bb 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -8,7 +8,7 @@ FileActions={ FileActions.actions[mime][name]=action; }, setDefault:function(mime,name){ - FileActions.defaults[mime]=FileActions.actions[mime][name]; + FileActions.defaults[mime]=name; }, get:function(mime,type){ var actions={}; @@ -35,15 +35,18 @@ FileActions={ if(mime){ var mimePart=mime.substr(0,mime.indexOf('/')); } + var name=false; if(mime && FileActions.defaults[mime]){ - return FileActions.defaults[mime]; + name=FileActions.defaults[mime]; }else if(mime && FileActions.defaults[mimePart]){ - return FileActions.defaults[mimePart]; + name=FileActions.defaults[mimePart]; }else if(type && FileActions.defaults[type]){ - return FileActions.defaults[type]; + name=FileActions.defaults[type]; }else{ - return FileActions.defaults.all; + name=FileActions.defaults.all; } + var actions=this.get(mime,type); + return actions[name]; }, display:function(parent){ $('#file_menu ul').empty(); -- cgit v1.2.3 From 561c3a15f0d3821ffbaef84052c77182914b2d12 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 17 Jun 2011 14:17:08 +0200 Subject: prevent some possible warnings if there are files in /apps --- lib/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app.php b/lib/app.php index a56e0c2f9e6..e373331850d 100644 --- a/lib/app.php +++ b/lib/app.php @@ -59,7 +59,7 @@ class OC_APP{ // The rest comes here $dir = opendir( "$SERVERROOT/apps" ); while( false !== ( $filename = readdir( $dir ))){ - if( substr( $filename, 0, 1 ) != '.' ){ + if( substr( $filename, 0, 1 ) != '.' and is_dir("$SERVERROOT/apps/$filename") ){ if( file_exists( "$SERVERROOT/apps/$filename/appinfo/app.php" )){ if(OC_APPCONFIG::getValue($filename,'installed_version',0)==0){ //check if the plugin is fully installed //install the database -- cgit v1.2.3 From c4e7761ee814f18ff6dca4e88f13b3bf05959290 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 17 Jun 2011 14:17:53 +0200 Subject: make new folder dialog behave more like a regular form, so you can press enter to create the folder --- files/js/files.js | 3 ++- files/templates/index.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/js/files.js b/files/js/files.js index 0172ab1b1a9..45931b9bae3 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -51,7 +51,8 @@ $(document).ready(function() { } }); - $('#file_newfolder_submit').click(function() { + $('#file_newfolder_form').submit(function(event) { + event.preventDefault(); $.ajax({ url: 'ajax/newfolder.php', data: "dir="+$('#dir').val()+"&foldername="+$('#file_newfolder_name').val(), diff --git a/files/templates/index.php b/files/templates/index.php index 11cf0360e1e..d2d0a237d7b 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -13,7 +13,7 @@
      - +
    Download -- cgit v1.2.3 From 51420a75228d10c803f102eefa3264484675616e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 17 Jun 2011 16:09:43 +0200 Subject: only create one connection to a sqlite3 database, fixes 'Database locked' errors with webdav --- lib/MDB2/Driver/sqlite3.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/MDB2/Driver/sqlite3.php b/lib/MDB2/Driver/sqlite3.php index abd2b16ad4b..a569da187aa 100644 --- a/lib/MDB2/Driver/sqlite3.php +++ b/lib/MDB2/Driver/sqlite3.php @@ -348,6 +348,9 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common **/ function connect() { + if($this->connection instanceof SQLite3){ + return MDB2_OK; + } global $SERVERROOT; $datadir=OC_CONFIG::getValue( "datadirectory", "$SERVERROOT/data" ); $database_file = $this->_getDatabaseFile($this->database_name); @@ -409,6 +412,7 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common $php_errormsg = ''; $this->connection = new SQLite3($database_file); + $this->connection->busyTimeout(100); $this->_lasterror = $this->connection->lastErrorMsg(); if (!$this->connection) { return $this->raiseError(MDB2_ERROR_CONNECT_FAILED, null, null, @@ -1346,6 +1350,10 @@ class MDB2_Statement_sqlite3 extends MDB2_Statement_Common $result =$this->_execute($result_class, $result_wrap_class); return $result; } + + function __destruct() { + $this->free(); + } } ?> \ No newline at end of file -- cgit v1.2.3 From be3ee0318942f092839b3de04f193a04e397116c Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sat, 18 Jun 2011 22:02:45 +0200 Subject: handle app repo connection failure --- admin/apps.php | 7 +++ admin/templates/app_noconn.php | 7 +++ lib/ocsclient.php | 128 ++++++++++++++++++++++------------------- 3 files changed, 84 insertions(+), 58 deletions(-) create mode 100644 admin/templates/app_noconn.php diff --git a/admin/apps.php b/admin/apps.php index 7ce3f4c419f..5b4e65e340e 100644 --- a/admin/apps.php +++ b/admin/apps.php @@ -36,7 +36,14 @@ if(isset($_GET['id'])) $id=$_GET['id']; else $id=0; if(isset($_GET['cat'])) $cat=$_GET['cat']; else $cat=0; $categories=OC_OCSCLIENT::getCategories(); +if($categories==NULL){ + OC_APP::setActiveNavigationEntry( "core_apps" ); + $tmpl = new OC_TEMPLATE( "admin", "app_noconn", "admin" ); + $tmpl->printPage(); + unset($tmpl); + exit(); +} /* All diff --git a/admin/templates/app_noconn.php b/admin/templates/app_noconn.php new file mode 100644 index 00000000000..2ca3d15d445 --- /dev/null +++ b/admin/templates/app_noconn.php @@ -0,0 +1,7 @@ + +

    Apps Repository

    +

    Cannot connect to apps repository

    \ No newline at end of file diff --git a/lib/ocsclient.php b/lib/ocsclient.php index a3c4659c6e4..cfd529b2ec4 100644 --- a/lib/ocsclient.php +++ b/lib/ocsclient.php @@ -37,7 +37,10 @@ class OC_OCSCLIENT{ public static function getCategories(){ $url='http://api.apps.owncloud.com/v1/content/categories'; - $xml=file_get_contents($url); + $xml=@file_get_contents($url); + if($xml==FALSE){ + return NULL; + } $data=simplexml_load_string($xml); $tmp=$data->data; @@ -61,16 +64,19 @@ class OC_OCSCLIENT{ * This function returns a list of all the applications on the OCS server */ public static function getApplications($categories){ - if(is_array($categories)) { + if(is_array($categories)) { $categoriesstring=implode('x',$categories); }else{ $categoriesstring=$categories; } $url='http://api.apps.owncloud.com/v1/content/data?categories='.urlencode($categoriesstring).'&sortmode=new&page=0&pagesize=10'; $apps=array(); - $xml=file_get_contents($url); + $xml=@file_get_contents($url); + if($xml==FALSE){ + return NULL; + } $data=simplexml_load_string($xml); - + $tmp=$data->data->content; for($i = 0; $i < count($tmp); $i++) { $app=array(); @@ -90,60 +96,66 @@ class OC_OCSCLIENT{ } - /** - * @brief Get an the applications from the OCS server - * @returns array with application data - * - * This function returns an applications from the OCS server - */ - public static function getApplication($id){ - $url='http://api.apps.owncloud.com/v1/content/data/'.urlencode($id); - - $xml=file_get_contents($url); - $data=simplexml_load_string($xml); - - $tmp=$data->data->content; - $app=array(); - $app['id']=$tmp->id; - $app['name']=$tmp->name; - $app['type']=$tmp->typeid; - $app['typename']=$tmp->typename; - $app['personid']=$tmp->personid; - $app['detailpage']=$tmp->detailpage; - $app['preview1']=$tmp->smallpreviewpic1; - $app['preview2']=$tmp->smallpreviewpic2; - $app['preview3']=$tmp->smallpreviewpic3; - $app['changed']=strtotime($tmp->changed); - $app['description']=$tmp->description; - - return $app; - } - - /** - * @brief Get all the knowledgebase entries from the OCS server - * @returns array with q and a data - * - * This function returns a list of all the knowledgebase entries from the OCS server - */ - public static function getKnownledgebaseEntries(){ - $url='http://api.apps.owncloud.com/v1/knowledgebase/data?type=150&page=0&pagesize=10'; - - $kbe=array(); - $xml=file_get_contents($url); - $data=simplexml_load_string($xml); - - $tmp=$data->data->content; - for($i = 0; $i < count($tmp); $i++) { - $kb=array(); - $kb['id']=$tmp[$i]->id; - $kb['name']=$tmp[$i]->name; - $kb['description']=$tmp[$i]->description; - $kb['answer']=$tmp[$i]->answer; - $kb['preview1']=$tmp[$i]->smallpreviewpic1; - $kbe[]=$kb; - } - return $kbe; - } + /** + * @brief Get an the applications from the OCS server + * @returns array with application data + * + * This function returns an applications from the OCS server + */ + public static function getApplication($id){ + $url='http://api.apps.owncloud.com/v1/content/data/'.urlencode($id); + + $xml=@file_get_contents($url); + if($xml==FALSE){ + return NULL; + } + $data=simplexml_load_string($xml); + + $tmp=$data->data->content; + $app=array(); + $app['id']=$tmp->id; + $app['name']=$tmp->name; + $app['type']=$tmp->typeid; + $app['typename']=$tmp->typename; + $app['personid']=$tmp->personid; + $app['detailpage']=$tmp->detailpage; + $app['preview1']=$tmp->smallpreviewpic1; + $app['preview2']=$tmp->smallpreviewpic2; + $app['preview3']=$tmp->smallpreviewpic3; + $app['changed']=strtotime($tmp->changed); + $app['description']=$tmp->description; + + return $app; + } + + /** + * @brief Get all the knowledgebase entries from the OCS server + * @returns array with q and a data + * + * This function returns a list of all the knowledgebase entries from the OCS server + */ + public static function getKnownledgebaseEntries(){ + $url='http://api.apps.owncloud.com/v1/knowledgebase/data?type=150&page=0&pagesize=10'; + + $kbe=array(); + $xml=@file_get_contents($url); + if($xml==FALSE){ + return NULL; + } + $data=simplexml_load_string($xml); + + $tmp=$data->data->content; + for($i = 0; $i < count($tmp); $i++) { + $kb=array(); + $kb['id']=$tmp[$i]->id; + $kb['name']=$tmp[$i]->name; + $kb['description']=$tmp[$i]->description; + $kb['answer']=$tmp[$i]->answer; + $kb['preview1']=$tmp[$i]->smallpreviewpic1; + $kbe[]=$kb; + } + return $kbe; + } -- cgit v1.2.3 From 97ab331b2a41777b64881118819902183e5f0b98 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sat, 18 Jun 2011 23:57:03 +0200 Subject: change db index names to avoid collisions --- apps/files_publiclink/appinfo/database.xml | 2 +- db_structure.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/files_publiclink/appinfo/database.xml b/apps/files_publiclink/appinfo/database.xml index de63b03f445..4fe6be47d8d 100644 --- a/apps/files_publiclink/appinfo/database.xml +++ b/apps/files_publiclink/appinfo/database.xml @@ -35,7 +35,7 @@ true - token + a_files_publiclink_token true token diff --git a/db_structure.xml b/db_structure.xml index 599352c2a8d..19cdccef8a4 100644 --- a/db_structure.xml +++ b/db_structure.xml @@ -208,7 +208,7 @@ - path + locks_path path ascending @@ -216,7 +216,7 @@ - path_2 + locks_path_2 path ascending @@ -224,7 +224,7 @@ - path_3 + locks_path_3 path ascending @@ -236,7 +236,7 @@ - expires + locks_expires expires ascending @@ -253,7 +253,7 @@ - token + locks_token true token -- cgit v1.2.3 From 1cab3ca92cf07f7e4d7402fae7cf49e1e489b14f Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sun, 19 Jun 2011 00:55:19 +0200 Subject: move installation of shipped apps to setup --- lib/app.php | 24 +++--------------------- lib/setup.php | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/lib/app.php b/lib/app.php index e373331850d..4e67da3c414 100644 --- a/lib/app.php +++ b/lib/app.php @@ -57,28 +57,10 @@ class OC_APP{ } // The rest comes here - $dir = opendir( "$SERVERROOT/apps" ); - while( false !== ( $filename = readdir( $dir ))){ - if( substr( $filename, 0, 1 ) != '.' and is_dir("$SERVERROOT/apps/$filename") ){ - if( file_exists( "$SERVERROOT/apps/$filename/appinfo/app.php" )){ - if(OC_APPCONFIG::getValue($filename,'installed_version',0)==0){ //check if the plugin is fully installed - //install the database - if(is_file("$SERVERROOT/apps/$filename/appinfo/database.xml")){ - OC_DB::createDbFromStructure("$SERVERROOT/apps/$filename/appinfo/database.xml"); - } - - //run appinfo/install.php - if(is_file("$SERVERROOT/apps/$filename/appinfo/install.php")){ - include("$SERVERROOT/apps/$filename/appinfo/install.php"); - } - $info=self::getAppInfo("$SERVERROOT/apps/$filename/appinfo/info.xml"); - OC_APPCONFIG::setValue($filename,'installed_version',$info['version']); - } - require( "apps/$filename/appinfo/app.php" ); - } - } + $apps = OC_APPCONFIG::getApps(); + foreach( $apps as $app ){ + require( "apps/$app/appinfo/app.php" ); } - closedir( $dir ); self::$init = true; diff --git a/lib/setup.php b/lib/setup.php index c2757021f20..e9cb3da686c 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -31,6 +31,7 @@ else { class OC_SETUP { public static function install($options) { + global $SERVERROOT; $error = array(); $dbtype = $options['dbtype']; @@ -133,6 +134,21 @@ class OC_SETUP { OC_GROUP::createGroup('admin'); OC_GROUP::addToGroup($username, 'admin'); + foreach( array( "files_imageviewer", "files_publiclink" ) as $app ){ + + if(is_file("$SERVERROOT/apps/$app/appinfo/database.xml")){ + OC_DB::createDbFromStructure("$SERVERROOT/apps/$app/appinfo/database.xml"); + } + + //run appinfo/install.php + if(is_file("$SERVERROOT/apps/$app/appinfo/install.php")){ + include("$SERVERROOT/apps/$app/appinfo/install.php"); + } + + $info=OC_APP::getAppInfo("$SERVERROOT/apps/$app/appinfo/info.xml"); + OC_APPCONFIG::setValue($app,'installed_version',$info['version']); + } + //create htaccess files for apache hosts self::createHtaccess(); //TODO detect if apache is used -- cgit v1.2.3 From 14dddc0c9e116874b76bdf5965cd2c1b0e4d2e5e Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 14:23:24 +0200 Subject: forgot "event" as a parameter. --- apps/files_publiclink/js/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_publiclink/js/admin.js b/apps/files_publiclink/js/admin.js index 9a0bad604a2..21857718149 100644 --- a/apps/files_publiclink/js/admin.js +++ b/apps/files_publiclink/js/admin.js @@ -8,7 +8,7 @@ $(document).ready(function() { source: "../../files/ajax/autocomplete.php", minLength: 1 }); - $("button.delete").live('click', function() { + $("button.delete").live('click', function( event ) { event.preventDefault(); var token=$(this).attr('data-token'); var data="token="+token; @@ -22,7 +22,7 @@ $(document).ready(function() { } }); }); - $('#newlink').submit(function(){ + $('#newlink').submit(function( event ){ event.preventDefault(); var path=$('#path').val(); var expire=$('#expire_time').val()||0; -- cgit v1.2.3 From 6a19a7d22639f056ccb39d94f2358882ed875faf Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 14:24:26 +0200 Subject: added preferences to base.php, will be needed for i18n stuff --- lib/base.php | 2 ++ log/index.php | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/base.php b/lib/base.php index 50c41dc0859..1baf5dc1679 100644 --- a/lib/base.php +++ b/lib/base.php @@ -80,6 +80,8 @@ require_once('appconfig.php'); require_once('files.php'); require_once('filesystem.php'); require_once('filestorage.php'); +require_once('l10n.php'); +require_once('preferences.php'); require_once('log.php'); require_once('user.php'); require_once('group.php'); diff --git a/log/index.php b/log/index.php index 56bbbadb99d..985ab60b52e 100644 --- a/log/index.php +++ b/log/index.php @@ -24,8 +24,7 @@ //require_once('../../config/config.php'); require_once('../lib/base.php'); -require( 'template.php' ); -require( 'preferences.php' ); +require_once( 'template.php' ); if( !OC_USER::isLoggedIn()){ header( 'Location: '.OC_HELPER::linkTo( 'index.php' )); -- cgit v1.2.3 From baa00a589f7d4cdf920e5fb8185082e19bc179d1 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 14:27:52 +0200 Subject: l10n added --- lib/l10n.php | 247 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/template.php | 7 +- 2 files changed, 252 insertions(+), 2 deletions(-) create mode 100644 lib/l10n.php diff --git a/lib/l10n.php b/lib/l10n.php new file mode 100644 index 00000000000..47d331b3fc6 --- /dev/null +++ b/lib/l10n.php @@ -0,0 +1,247 @@ +. + * + */ + +/** + * This class is for i18n and l10n + */ +class OC_L10N{ + /** + * cache + */ + protected static $cache = array(); + + /** + * The best language + */ + protected static $language = ''; + + /** + * Translations + */ + private $translations = array(); + + /** + * Localization + */ + private $localizations = array( + 'date' => 'd.m.Y', + 'datetime' => 'd.m.Y H:i:s', + 'time' => 'H:i:s' ); + + /** + * @brief The constructor + * @param $app the app requesting l10n + * @param $lang default: null Language + * @returns OC_L10N-Object + * + * If language is not set, the constructor tries to find the right + * language. + */ + public function __construct( $app, $lang = null ){ + // Find the right language + if( is_null( $lang )){ + self::findLanguage( $app ); + } + + // Use cache if possible + if(array_key_exists($app.'::'.$lang, self::$cache )){ + $this->translations = self::$cache[$app.'::'.$lang]['t']; + $this->localizations = self::$cache[$app.'::'.$lang]['l']; + } + else{ + $i18ndir = self::findI18nDir( $app ); + + // Localization is in /l10n, Texts are in $i18ndir + // (Just no need to define date/time format etc. twice) + if( file_exists( $i18ndir.$lang.'php' )){ + // Include the file, save the data from $CONFIG + include( $i18ndir.$lang.'php' ); + if( isset( $TRANSLATIONS ) && is_array( $TRANSLATIONS )){ + $this->translations = $TRANSLATIONS; + } + } + + if( file_exists( '/l10n/l10n-'.$lang.'php' )){ + // Include the file, save the data from $CONFIG + include( $SERVERROOT.'/l10n/l10n-'.$lang.'php' ); + if( isset( $LOCALIZATIONS ) && is_array( $LOCALIZATIONS )){ + $this->localizations = array_merge( $this->localizations, $LOCALIZATIONS ); + } + } + + self::$cache[$app.'::'.$lang]['t'] = $this->translations; + self::$cache[$app.'::'.$lang]['l'] = $this->localizations; + } + } + + /** + * @brief Translating + * @param $text The text we need a translation for + * @returns Translation or the same text + * + * Returns the translation. If no translation is found, $text will be + * returned. + */ + public function t($text){ + if(array_key_exists($text, $this->translations)){ + return $this->translations[$text]; + } + return $text; + } + + /** + * @brief Localization + * @param $type Type of localization + * @param $params parameters for this localization + * @returns String or false + * + * Returns the localized data. + * + * Implemented types: + * - date + * - Creates a date + * - l10n-field: date + * - params: timestamp (int) + * - datetime + * - Creates date and time + * - l10n-field: datetime + * - params: timestamp (int) + * - time + * - Creates a time + * - l10n-field: time + * - params: timestamp (int) + */ + public function l($type, $data){ + switch($type){ + case 'date': + return date( $this->localizations['date'], $data ); + break; + case 'datetime': + return date( $this->localizations['datetime'], $data ); + break; + case 'time': + return date( $this->localizations['time'], $data ); + break; + default: + return false; + } + } + + /** + * @brief Choose a language + * @param $texts Associative Array with possible strings + * @returns String + * + * $text is an array 'de' => 'hallo welt', 'en' => 'hello world', ... + * + * This function is useful to avoid loading thousands of files if only one + * simple string is needed, for example in appinfo.php + */ + public static function selectLanguage( $text ){ + $lang = self::findLanguage( array_keys( $text )); + return $text[$lang]; + } + + /** + * @brief find the best language + * @param $app Array or string, details below + * @returns language + * + * If $app is an array, ownCloud assumes that these are the available + * languages. Otherwise ownCloud tries to find the files in the l10n + * folder. + * + * If nothing works it returns 'en' + */ + public static function findLanguage( $app = null ){ + if( !is_array( $app) && self::$language != '' ){ + return self::$language; + } + + $available = array(); + if( is_array( $app )){ + $available = $app; + } + else{ + $dir = self::findI18nDir( $app ); + if( file_exists($dir)){ + $dh = opendir($dir); + while(( $file = readdir( $dh )) !== false ){ + if( substr( $file, -4, 4 ) == '.php' ){ + $i = substr( $file, 0, -4 ); + if( $i != '' ){ + $available[] = $i; + } + } + } + closedir($dh); + } + } + + if( isset($_SESSION['user_id']) && OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' )){ + $lang = OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' ); + self::$language = $lang; + if( array_search( $lang, $available )){ + return $lang; + } + } + + if( isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] )){ + $accepted_languages = preg_split( '/,\s*/', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ); + foreach( $accepted_languages as $i ){ + $temp = explode( ';', $i ); + $temp = explode( '-', $temp[0] ); + if( array_key_exists( $temp[0], $available )){ + return $temp[0]; + } + } + } + + // Last try: English + return 'en'; + } + + /** + * @brief find the best language + * @param $app App that needs to be translated + * @returns language + * + * Finds the best language. Depends on user settings and browser + * information + */ + protected static function findI18nDir( $app ){ + global $SERVERROOT; + + // find the i18n dir + $i18ndir = $SERVERROOT.'/l10n/'; + if( $app != 'core' && $app != '' ){ + // Check if the app is in the app folder + if( file_exists( $SERVERROOT.'/apps/'.$app.'/l10n/' )){ + $i18ndir = $SERVERROOT.'/apps/'.$app.'/l10n/'; + } + else{ + $i18ndir = $SERVERROOT.'/'.$app.'/l10n/'; + } + } + return $i18ndir; + } +} \ No newline at end of file diff --git a/lib/template.php b/lib/template.php index 93adc35eca7..6b9a1c38e11 100644 --- a/lib/template.php +++ b/lib/template.php @@ -73,8 +73,9 @@ function human_file_size( $bytes ){ class OC_TEMPLATE{ private $renderas; // Create a full page? private $application; // template Application - private $vars; // The smarty object - private $template; // The smarty object + private $vars; // Vars + private $template; // The path to the template + private $l10n; // The l10n-Object /** * @brief Constructor @@ -113,6 +114,7 @@ class OC_TEMPLATE{ $this->application = $app; $this->template = $template; $this->vars = array(); + $this->l10n = new OC_L10N($app); } /** @@ -251,6 +253,7 @@ class OC_TEMPLATE{ private function _fetch(){ // Register the variables $_ = $this->vars; + $l = $this->l10n; // Execute the template ob_start(); -- cgit v1.2.3 From d5b550395af51d1299da4600870a403b7f7921d8 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 15:08:28 +0200 Subject: Removed debug messages --- lib/files.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/files.php b/lib/files.php index 9e66f9dab82..fca311833b5 100644 --- a/lib/files.php +++ b/lib/files.php @@ -30,15 +30,6 @@ require_once("log.php"); */ class OC_FILES { static $tmpFiles=array(); - /** - * show a web GUI filebrowser - * - * @param basedir $basedir - * @param dir $dir - */ - public static function showBrowser($basedir,$dir){ - echo '
    '; - } /** * get the content of a directory @@ -101,7 +92,7 @@ class OC_FILES { if(strpos($files,';')){ $files=explode(';',$files); } - echo 't'; + if(is_array($files)){ $zip = new ZipArchive(); $filename = sys_get_temp_dir()."/ownCloud.zip"; @@ -300,7 +291,6 @@ class OC_FILES { global $SERVERROOT; global $WEBROOT; $size=OC_HELPER::humanFileSize($size); - echo $size; $size=substr($size,0,-1);//strip the B $size=str_replace(' ','',$size); //remove the space between the size and the postfix $content = "ErrorDocument 404 /$WEBROOT/templates/404.php\n";//custom 404 error page -- cgit v1.2.3 From 6b2ec221045c2e437d5658be1bc1dc001911e1e4 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sun, 19 Jun 2011 15:18:52 +0200 Subject: allow disabling apps, install apps as disabled --- lib/app.php | 41 ++++++++++++++++++++++++++++++++++++++++- lib/installer.php | 45 ++++++++++++++++++++++++++++++++++++--------- lib/setup.php | 1 + 3 files changed, 77 insertions(+), 10 deletions(-) diff --git a/lib/app.php b/lib/app.php index 4e67da3c414..c2a850b6f6a 100644 --- a/lib/app.php +++ b/lib/app.php @@ -59,7 +59,9 @@ class OC_APP{ // The rest comes here $apps = OC_APPCONFIG::getApps(); foreach( $apps as $app ){ - require( "apps/$app/appinfo/app.php" ); + if( self::isEnabled( $app )){ + require( "apps/$app/appinfo/app.php" ); + } } self::$init = true; @@ -68,6 +70,43 @@ class OC_APP{ return true; } + /** + * @brief checks whether or not an app is enabled + * @param $app app + * @returns true/false + * + * This function checks whether or not an app is enabled. + */ + public static function isEnabled( $app ){ + if( 'yes' == OC_APPCONFIG::getValue( $app, 'enabled' )){ + return true; + } + + return false; + } + + /** + * @brief enables an app + * @param $app app + * @returns true/false + * + * This function set an app as enabled in appconfig. + */ + public static function enable( $app ){ + OC_APPCONFIG::setValue( $app, 'enabled', 'yes' ); + } + + /** + * @brief enables an app + * @param $app app + * @returns true/false + * + * This function set an app as enabled in appconfig. + */ + public static function disable( $app ){ + OC_APPCONFIG::setValue( $app, 'enabled', 'no' ); + } + /** * @brief makes owncloud aware of this app * @param $data array with all information diff --git a/lib/installer.php b/lib/installer.php index 7ab07bf5077..02b71027cd7 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -59,7 +59,7 @@ class OC_INSTALLER{ if(!isset($data['source'])){ error_log("No source specified when installing app"); - return; + return false; } //download the file if necesary @@ -67,13 +67,13 @@ class OC_INSTALLER{ $path=tempnam(sys_get_temp_dir(),'oc_installer_'); if(!isset($data['href'])){ error_log("No href specified when installing app from http"); - return; + return false; } copy($data['href'],$path); }else{ if(!isset($data['path'])){ error_log("No path specified when installing app from local file"); - return; + return false; } $path=$data['path']; } @@ -92,7 +92,7 @@ class OC_INSTALLER{ if($data['source']=='http'){ unlink($path); } - return; + return false; } //load the info.xml file of the app @@ -102,23 +102,33 @@ class OC_INSTALLER{ if($data['source']=='http'){ unlink($path); } - return; + return false; } $info=OC_APP::getAppInfo($extractDir.'/appinfo/info.xml'); $basedir=$SERVERROOT.'/apps/'.$info['id']; //check if an app with the same id is already installed - if(is_dir($basedir)){ + if(self::isInstalled( $info['id'] ))){ error_log("App already installed"); OC_HELPER::rmdirr($extractDir); if($data['source']=='http'){ unlink($path); } - return; + return false; } + + //check if the destination directory already exists ++ if(is_dir($basedir)){ ++ error_log("App's directory already exists"); ++ OC_HELPER::rmdirr($extractDir); ++ if($data['source']=='http'){ ++ unlink($path); ++ } ++ return false; ++ } if(isset($data['pretent']) and $data['pretent']==true){ - return; + return false; } //copy the app to the correct place @@ -128,7 +138,7 @@ class OC_INSTALLER{ if($data['source']=='http'){ unlink($path); } - return; + return false; } OC_HELPER::copyr($extractDir,$basedir); @@ -150,6 +160,23 @@ class OC_INSTALLER{ //set the installed version OC_APPCONFIG::setValue($info['id'],'installed_version',$info['version']); + OC_APPCONFIG::setValue($info['id'],'enabled','no'); + return true; + } + + /** + * @brief checks whether or not an app is installed + * @param $app app + * @returns true/false + * + * Checks whether or not an app is installed, i.e. registered in apps table. + */ + public static function isInstalled( $app ){ + + if( null == OC_APPCONFIG::getValue( $app, "installed_version" )){ + return false; + } + return true; } diff --git a/lib/setup.php b/lib/setup.php index e9cb3da686c..43ead7b96ac 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -147,6 +147,7 @@ class OC_SETUP { $info=OC_APP::getAppInfo("$SERVERROOT/apps/$app/appinfo/info.xml"); OC_APPCONFIG::setValue($app,'installed_version',$info['version']); + OC_APPCONFIG::setValue($app,'enabled','yes'); } //create htaccess files for apache hosts -- cgit v1.2.3 From a688e5a5b1d34abba1b2b59ae790022a40ff3d29 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 16:05:23 +0200 Subject: Load preferences only if user is registered --- lib/l10n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/l10n.php b/lib/l10n.php index 47d331b3fc6..e800941e3d3 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -197,7 +197,7 @@ class OC_L10N{ } } - if( isset($_SESSION['user_id']) && OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' )){ + if( isset($_SESSION['user_id']) && $_SESSION['user_id'] && OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' )){ $lang = OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' ); self::$language = $lang; if( array_search( $lang, $available )){ -- cgit v1.2.3 From abac11d8c42fdc3e93bbfc65d8e30474d3bb876a Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 18:50:25 +0200 Subject: tabs, not spaces --- log/index.php | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/log/index.php b/log/index.php index 985ab60b52e..950e1f82d19 100644 --- a/log/index.php +++ b/log/index.php @@ -21,14 +21,13 @@ * */ - //require_once('../../config/config.php'); require_once('../lib/base.php'); require_once( 'template.php' ); if( !OC_USER::isLoggedIn()){ - header( 'Location: '.OC_HELPER::linkTo( 'index.php' )); - exit(); + header( 'Location: '.OC_HELPER::linkTo( 'index.php' )); + exit(); } //load the script @@ -48,15 +47,15 @@ if(isset($_POST['save'])){ OC_PREFERENCES::setValue($_SESSION['user_id'],'log','pagesize',$_POST['size']); } //clear log entries -else if(isset($_POST['clear'])){ - $removeBeforeDate=(isset($_POST['removeBeforeDate']))?$_POST['removeBeforeDate']:0; - if($removeBeforeDate!==0){ - $removeBeforeDate=strtotime($removeBeforeDate); - OC_LOG::deleteBefore($removeBeforeDate); - } +elseif(isset($_POST['clear'])){ + $removeBeforeDate=(isset($_POST['removeBeforeDate']))?$_POST['removeBeforeDate']:0; + if($removeBeforeDate!==0){ + $removeBeforeDate=strtotime($removeBeforeDate); + OC_LOG::deleteBefore($removeBeforeDate); + } } -else if(isset($_POST['clearall'])){ - OC_LOG::deleteAll(); +elseif(isset($_POST['clearall'])){ + OC_LOG::deleteAll(); } OC_APP::setActiveNavigationEntry( 'log' ); @@ -83,7 +82,8 @@ $url=OC_HELPER::linkTo( 'log', 'index.php' ).'?page='; $pager=OC_UTIL::getPageNavi($pageCount,$page,$url); if($pager){ $pagerHTML=$pager->fetchPage(); -}else{ +} +else{ $pagerHTML=''; } @@ -91,7 +91,8 @@ $showActions=array(); foreach($allActions as $action){ if(array_search($action,$selectedActions)!==false){ $showActions[$action]='checked="checked"'; - }else{ + } + else{ $showActions[$action]=''; } } -- cgit v1.2.3 From e8e483d07943e7c4874ee6147e3910ee868ed14d Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 18:53:02 +0200 Subject: L10N is here ;-) --- .gitignore | 6 +++++ docs/createtranslation.pl | 28 +++++++++++++++++++ l10n/l10n-de.php | 5 ++++ lib/l10n.php | 17 +++++++----- log/l10n/de.php | 14 ++++++++++ log/l10n/de.po | 68 +++++++++++++++++++++++++++++++++++++++++++++++ log/l10n/log | 3 +++ log/l10n/messages.pot | 66 +++++++++++++++++++++++++++++++++++++++++++++ log/l10n/xgettextfiles | 1 + log/templates/index.php | 26 +++++++++--------- 10 files changed, 214 insertions(+), 20 deletions(-) create mode 100644 docs/createtranslation.pl create mode 100644 l10n/l10n-de.php create mode 100644 log/l10n/de.php create mode 100644 log/l10n/de.po create mode 100644 log/l10n/log create mode 100644 log/l10n/messages.pot create mode 100644 log/l10n/xgettextfiles diff --git a/.gitignore b/.gitignore index 9cfb7a5861e..6a1ffc21cae 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,11 @@ _darcs/* CVS/* .svn/* RCS/* + +# kdevelop .kdev *.kdev4 + +# Lokalize +*lokalize* + diff --git a/docs/createtranslation.pl b/docs/createtranslation.pl new file mode 100644 index 00000000000..4c1c7c38d73 --- /dev/null +++ b/docs/createtranslation.pl @@ -0,0 +1,28 @@ +#!/usr/bin/perl +use strict; +use Locale::PO; +use Data::Dumper; + +opendir( DIR, '.' ); +my @files = readdir( DIR ); +closedir( DIR ); + +foreach my $i ( @files ){ + next unless $i =~ m/^(.*)\.po$/; + my $lang = $1; + my $hash = Locale::PO->load_file_ashash( $i ); + + # Create array + my @strings = (); + foreach my $key ( keys( %{$hash} )){ + next if $key eq '""'; + push( @strings, $hash->{$key}->msgid()." => ".$hash->{$key}->msgstr()); + } + + # Write PHP file + open( OUT, ">$lang.php" ); + print OUT " 'd.m.Y', + 'datetime' => 'd.m.Y H:i:s', + 'time' => 'H:i:s' ); diff --git a/lib/l10n.php b/lib/l10n.php index e800941e3d3..4eae109cb52 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -57,32 +57,33 @@ class OC_L10N{ * language. */ public function __construct( $app, $lang = null ){ + global $SERVERROOT; // Find the right language if( is_null( $lang )){ - self::findLanguage( $app ); + $lang = self::findLanguage( $app ); } // Use cache if possible if(array_key_exists($app.'::'.$lang, self::$cache )){ + $this->translations = self::$cache[$app.'::'.$lang]['t']; $this->localizations = self::$cache[$app.'::'.$lang]['l']; } else{ $i18ndir = self::findI18nDir( $app ); - // Localization is in /l10n, Texts are in $i18ndir // (Just no need to define date/time format etc. twice) - if( file_exists( $i18ndir.$lang.'php' )){ + if( file_exists( $i18ndir.$lang.'.php' )){ // Include the file, save the data from $CONFIG - include( $i18ndir.$lang.'php' ); + include( $i18ndir.$lang.'.php' ); if( isset( $TRANSLATIONS ) && is_array( $TRANSLATIONS )){ $this->translations = $TRANSLATIONS; } } - if( file_exists( '/l10n/l10n-'.$lang.'php' )){ + if( file_exists( $SERVERROOT.'/l10n/l10n-'.$lang.'.php' )){ // Include the file, save the data from $CONFIG - include( $SERVERROOT.'/l10n/l10n-'.$lang.'php' ); + include( $SERVERROOT.'/l10n/l10n-'.$lang.'.php' ); if( isset( $LOCALIZATIONS ) && is_array( $LOCALIZATIONS )){ $this->localizations = array_merge( $this->localizations, $LOCALIZATIONS ); } @@ -133,12 +134,15 @@ class OC_L10N{ public function l($type, $data){ switch($type){ case 'date': + if( is_string( $data )) $data = strtotime( $data ); return date( $this->localizations['date'], $data ); break; case 'datetime': + if( is_string( $data )) $data = strtotime( $data ); return date( $this->localizations['datetime'], $data ); break; case 'time': + if( is_string( $data )) $data = strtotime( $data ); return date( $this->localizations['time'], $data ); break; default: @@ -209,7 +213,6 @@ class OC_L10N{ $accepted_languages = preg_split( '/,\s*/', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ); foreach( $accepted_languages as $i ){ $temp = explode( ';', $i ); - $temp = explode( '-', $temp[0] ); if( array_key_exists( $temp[0], $available )){ return $temp[0]; } diff --git a/log/l10n/de.php b/log/l10n/de.php new file mode 100644 index 00000000000..5cfc3486aff --- /dev/null +++ b/log/l10n/de.php @@ -0,0 +1,14 @@ + "Zeige", +"Uploads" => "Uploads", +"Filter:" => "Filter:", +"Logouts" => "Abmeldungen", +"Logins" => "Anmeldungen", +"When" => "Wann", +"Downloads" => "Downloads", +"Clear log entries before" => "Lösche Einträge vor dem", +"What" => "Was", +"entries per page." => "Einträge pro Seite", +"Creations" => "Erstellungen", +"Deletions" => "Löschungen" +); diff --git a/log/l10n/de.po b/log/l10n/de.po new file mode 100644 index 00000000000..a901754f1a6 --- /dev/null +++ b/log/l10n/de.po @@ -0,0 +1,68 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Jakob Sack , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 16:44+0200\n" +"PO-Revision-Date: 2011-06-19 16:54+0200\n" +"Last-Translator: Jakob Sack \n" +"Language-Team: German \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: ../templates/index.php:4 +msgid "Filter:" +msgstr "Filter:" + +#: ../templates/index.php:7 +msgid "Logins" +msgstr "Anmeldungen" + +#: ../templates/index.php:8 +msgid "Logouts" +msgstr "Abmeldungen" + +#: ../templates/index.php:9 +msgid "Downloads" +msgstr "Downloads" + +#: ../templates/index.php:10 +msgid "Uploads" +msgstr "Uploads" + +#: ../templates/index.php:11 +msgid "Creations" +msgstr "Erstellungen" + +#: ../templates/index.php:12 +msgid "Deletions" +msgstr "Löschungen" + +#: ../templates/index.php:15 +msgid "Show:" +msgstr "Zeige" + +#: ../templates/index.php:16 +msgid "entries per page." +msgstr "Einträge pro Seite" + +#: ../templates/index.php:26 +msgid "What" +msgstr "Was" + +#: ../templates/index.php:27 +msgid "When" +msgstr "Wann" + +#: ../templates/index.php:45 +msgid "Clear log entries before" +msgstr "Lösche Einträge vor dem" + + diff --git a/log/l10n/log b/log/l10n/log new file mode 100644 index 00000000000..e5e074bf9aa --- /dev/null +++ b/log/l10n/log @@ -0,0 +1,3 @@ +[General] +LangCode=de +TargetLangCode=de diff --git a/log/l10n/messages.pot b/log/l10n/messages.pot new file mode 100644 index 00000000000..2da2355a3ab --- /dev/null +++ b/log/l10n/messages.pot @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 16:53+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:4 +msgid "Filter:" +msgstr "" + +#: ../templates/index.php:7 +msgid "Logins" +msgstr "" + +#: ../templates/index.php:8 +msgid "Logouts" +msgstr "" + +#: ../templates/index.php:9 +msgid "Downloads" +msgstr "" + +#: ../templates/index.php:10 +msgid "Uploads" +msgstr "" + +#: ../templates/index.php:11 +msgid "Creations" +msgstr "" + +#: ../templates/index.php:12 +msgid "Deletions" +msgstr "" + +#: ../templates/index.php:15 +msgid "Show:" +msgstr "" + +#: ../templates/index.php:16 +msgid "entries per page." +msgstr "" + +#: ../templates/index.php:26 +msgid "What" +msgstr "" + +#: ../templates/index.php:27 +msgid "When" +msgstr "" + +#: ../templates/index.php:45 +msgid "Clear log entries before" +msgstr "" diff --git a/log/l10n/xgettextfiles b/log/l10n/xgettextfiles new file mode 100644 index 00000000000..a24bcc89a85 --- /dev/null +++ b/log/l10n/xgettextfiles @@ -0,0 +1 @@ +../templates/index.php diff --git a/log/templates/index.php b/log/templates/index.php index 5f398b1dbc6..2756332f519 100644 --- a/log/templates/index.php +++ b/log/templates/index.php @@ -1,19 +1,19 @@

    - Filter : + t( 'Filter:' ); ?> - name="login" id="logins" /> - name="logout" id="logouts" /> - name="read" id="downloads" /> - name="write" id="uploads" /> - name="create" id="creations" /> - name="delete" id="deletions" /> + name="login" id="logins" /> + name="logout" id="logouts" /> + name="read" id="downloads" /> + name="write" id="uploads" /> + name="create" id="creations" /> + name="delete" id="deletions" />

    - Show : -  entries per page. + t( 'Show:' ); ?> +  t( 'entries per page.' ); ?>

    @@ -23,15 +23,15 @@ - - + + - + @@ -42,7 +42,7 @@

    - Clear log entries before + t( 'Clear log entries before' ); ?> -- cgit v1.2.3 From c26719a10de214a6ea1c352b13bdd52b34e5a070 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 19:38:51 +0200 Subject: Fixed documentation of OC_L10N --- lib/l10n.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/l10n.php b/lib/l10n.php index 4eae109cb52..2f72b971173 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -121,18 +121,20 @@ class OC_L10N{ * - date * - Creates a date * - l10n-field: date - * - params: timestamp (int) + * - params: timestamp (int/string) * - datetime * - Creates date and time * - l10n-field: datetime - * - params: timestamp (int) + * - params: timestamp (int/string) * - time * - Creates a time * - l10n-field: time - * - params: timestamp (int) + * - params: timestamp (int/string) */ public function l($type, $data){ switch($type){ + // If you add something don't forget to add it to $localizations + // at the top of the page case 'date': if( is_string( $data )) $data = strtotime( $data ); return date( $this->localizations['date'], $data ); -- cgit v1.2.3 From 80257558af202cbfb242cd3ab8ef31511f52aa51 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sun, 19 Jun 2011 22:15:38 +0200 Subject: admin templates are now translateable --- admin/templates/app.php | 6 +++--- admin/templates/app_noconn.php | 4 ++-- admin/templates/apps.php | 8 ++++---- admin/templates/system.php | 4 ++-- admin/templates/users.php | 28 ++++++++++++++-------------- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/admin/templates/app.php b/admin/templates/app.php index 1ea31bdecde..c8989e323ce 100644 --- a/admin/templates/app.php +++ b/admin/templates/app.php @@ -6,7 +6,7 @@ $app=$_['app']; ?>

    '.$app['typename'].''); ?>
    -
    +l('datetime', $app["changed"]); ?>
    WhatWhent( 'What' ); ?>t( 'When' ); ?>
    "> l('datetime', $entry["date"] ); ?>
    @@ -19,9 +19,9 @@ $app=$_['app']; - +

    - read more
    '); ?> + '.$l->t( 'read more' ).'
    '); ?>
    INSTALLt( 'INSTALL' ); ?>
    diff --git a/admin/templates/app_noconn.php b/admin/templates/app_noconn.php index 2ca3d15d445..70b7d9b3119 100644 --- a/admin/templates/app_noconn.php +++ b/admin/templates/app_noconn.php @@ -3,5 +3,5 @@ * Template for Apps when can't connect to app store */ ?> -

    Apps Repository

    -

    Cannot connect to apps repository

    \ No newline at end of file +

    t( 'Apps Repository' ); ?>

    +

    t( 'Cannot connect to apps repository' ); ?>

    diff --git a/admin/templates/apps.php b/admin/templates/apps.php index 36a7cd53029..593aad63182 100644 --- a/admin/templates/apps.php +++ b/admin/templates/apps.php @@ -3,15 +3,15 @@ * Template for Apps */ ?> -

    Apps Repository

    +

    t( 'Apps Repository' ); ?>

    - - + + @@ -19,7 +19,7 @@ - + diff --git a/admin/templates/system.php b/admin/templates/system.php index 4087b40a483..92ff9c836a8 100644 --- a/admin/templates/system.php +++ b/admin/templates/system.php @@ -3,6 +3,6 @@ * Template for admin pages */ ?> -

    Administration

    -

    System Settings

    +

    t( 'Administration' ); ?>

    +

    t( 'System Settings' ); ?>

    #TBD \ No newline at end of file diff --git a/admin/templates/users.php b/admin/templates/users.php index 235df5bf829..c6ee57a61d5 100644 --- a/admin/templates/users.php +++ b/admin/templates/users.php @@ -3,22 +3,22 @@
    NameModifiedt( 'Name' ); ?>t( 'Modified' ); ?>
    "") { echo(''); } ?> " title="">
    '.$app['typename'].''); ?>
    l('datetime', $app["changed"]); ?>
    - + - + @@ -37,17 +37,17 @@ "> - +
    Namet( 'Name' ); ?> Groups
       
    removet( 'remove' ); ?>
    -

    Groups

    +

    t( 'Groups' ); ?>

    - + @@ -55,7 +55,7 @@ - + @@ -65,7 +65,7 @@ diff --git a/templates/part.searchbox.php b/templates/part.searchbox.php index 910af81ebb2..7465a7326ee 100644 --- a/templates/part.searchbox.php +++ b/templates/part.searchbox.php @@ -1,4 +1,4 @@ ' method='post'> '/> - + ' class='prettybutton'/> \ No newline at end of file -- cgit v1.2.3 From 99ae7cd47777f7d7176194d4caced9036fcb1f46 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 23:46:59 +0200 Subject: Autodetection of language is working now --- lib/l10n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/l10n.php b/lib/l10n.php index 8a7ff9d8535..f760d78c72b 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -224,7 +224,7 @@ class OC_L10N{ $accepted_languages = preg_split( '/,\s*/', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ); foreach( $accepted_languages as $i ){ $temp = explode( ';', $i ); - if( array_key_exists( $temp[0], $available )){ + if( array_search( $temp[0], $available ) !== false ){ return $temp[0]; } } -- cgit v1.2.3 From a7b7f5a76ce7fe3fb371f008d5de9c749ac5c1c1 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Mon, 20 Jun 2011 00:17:49 +0200 Subject: app files_publiclink is now translateable --- apps/files_publiclink/templates/admin.php | 10 +++++----- apps/files_publiclink/templates/index.php | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/files_publiclink/templates/admin.php b/apps/files_publiclink/templates/admin.php index 2483eef321a..95b99109f23 100644 --- a/apps/files_publiclink/templates/admin.php +++ b/apps/files_publiclink/templates/admin.php @@ -2,18 +2,18 @@
    Namet( 'Name' ); ?>
    - remove + t( 'remove' ); ?>   @@ -91,22 +91,22 @@
    - Do you really want to delete user $user? + t( 'Do you really want to delete user' ); ?> $user?
    - Do you really want to delete group $group? + t( 'Do you really want to delete group' ); ?> $group?
    -- cgit v1.2.3 From 07f2fcf7ec249d45dfe1a4e38439d1e756a0bc86 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 19 Jun 2011 22:23:05 +0200 Subject: add post_* hooks to filesystem for write, create, delete, rename and copy --- lib/filesystem.php | 103 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 76 insertions(+), 27 deletions(-) diff --git a/lib/filesystem.php b/lib/filesystem.php index 0faa7404700..e6b1638d8d7 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -30,10 +30,15 @@ * Hooks provided: * read(path) * write(path, &run) + * post_write(path) * create(path, &run) (when a file is created, both create and write will be emited in that order) + * post_create(path) * delete(path, &run) + * post_delete(path) * rename(oldpath,newpath, &run) + * post_rename(oldpath,newpath) * copy(oldpath,newpath, &run) (if the newpath doesn't exists yes, copy, create and write will be emited in that order) + * post_rename(oldpath,newpath) * * the &run parameter can be set to false to prevent the operation from occuring */ @@ -231,7 +236,10 @@ class OC_FILESYSTEM{ OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); } if($run){ - return $storage->mkdir(self::getInternalPath($path)); + $result=$storage->mkdir(self::getInternalPath($path)); + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_create', array( 'path' => $path)); + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_write', array( 'path' => $path)); + return $result; } } } @@ -240,7 +248,9 @@ class OC_FILESYSTEM{ $run=true; OC_HOOK::emit( 'OC_FILESYSTEM', 'delete', array( 'path' => $path, 'run' => &$run)); if($run){ - return $storage->rmdir(self::getInternalPath($path)); + $result=$storage->rmdir(self::getInternalPath($path)); + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_delete', array( 'path' => $path)); + return $result; } } } @@ -332,14 +342,20 @@ class OC_FILESYSTEM{ static public function file_put_contents($path,$data){ if(self::canWrite($path) and $storage=self::getStorage($path)){ $run=true; - if(!self::file_exists($path)){ + $exists=self::file_exists($path); + if(!$exists){ OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path, 'run' => &$run)); } if($run){ OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); } if($run){ - return $storage->file_put_contents(self::getInternalPath($path),$data); + $result=$storage->file_put_contents(self::getInternalPath($path),$data); + if(!$exists){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_create', array( 'path' => $path)); + } + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_write', array( 'path' => $path)); + return $result; } } } @@ -348,7 +364,9 @@ class OC_FILESYSTEM{ $run=true; OC_HOOK::emit( 'OC_FILESYSTEM', 'delete', array( 'path' => $path, 'run' => &$run)); if($run){ - return $storage->unlink(self::getInternalPath($path)); + $result=$storage->unlink(self::getInternalPath($path)); + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_delete', array( 'path' => $path)); + return $result; } } } @@ -361,14 +379,15 @@ class OC_FILESYSTEM{ $mp2=self::getMountPoint($path2); if($mp1==$mp2){ if($storage=self::getStorage($path1)){ - return $storage->rename(self::getInternalPath($path1),self::getInternalPath($path2)); + $result=$storage->rename(self::getInternalPath($path1),self::getInternalPath($path2)); } }elseif($storage1=self::getStorage($path1) and $storage2=self::getStorage($path2)){ $tmpFile=$storage1->toTmpFile(self::getInternalPath($path1)); $result=$storage2->fromTmpFile(self::getInternalPath($path2)); $storage1->unlink(self::getInternalPath($path1)); - return $result; } + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_rename', array( 'oldpath' => $path1, 'newpath'=>$path2)); + return $result; } } } @@ -376,7 +395,8 @@ class OC_FILESYSTEM{ if(self::canRead($path1) and self::canWrite($path2)){ $run=true; OC_HOOK::emit( 'OC_FILESYSTEM', 'copy', array( 'oldpath' => $path1 ,'newpath'=>$path2, 'run' => &$run)); - if($run and !self::file_exists($path2)){ + $exists=self::file_exists($path2); + if($run and !$exists){ OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path2, 'run' => &$run)); } if($run){ @@ -387,12 +407,18 @@ class OC_FILESYSTEM{ $mp2=self::getMountPoint($path2); if($mp1==$mp2){ if($storage=self::getStorage($path1)){ - return $storage->copy(self::getInternalPath($path1),self::getInternalPath($path2)); + $result=$storage->copy(self::getInternalPath($path1),self::getInternalPath($path2)); } }elseif($storage1=self::getStorage($path1) and $storage2=self::getStorage($path2)){ $tmpFile=$storage1->toTmpFile(self::getInternalPath($path1)); - return $storage2->fromTmpFile(self::getInternalPath($path2)); + $result=$storage2->fromTmpFile(self::getInternalPath($path2)); } + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_copy', array( 'oldpath' => $path1 ,'newpath'=>$path2)); + if(!$exists){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_create', array( 'path' => $path)); + } + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_write', array( 'path' => $path)); + return $result; } } } @@ -401,6 +427,8 @@ class OC_FILESYSTEM{ if($allowed){ if($storage=self::getStorage($path)){ $run=true; + $exists=self::file_exists($path); + $write=false; switch($mode){ case 'r': OC_HOOK::emit( 'OC_FILESYSTEM', 'read', array( 'path' => $path)); @@ -410,26 +438,33 @@ class OC_FILESYSTEM{ case 'x+': case 'a+': OC_HOOK::emit( 'OC_FILESYSTEM', 'read', array( 'path' => $path)); - if(!self::file_exists($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); - } - if($run){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); - } + $write=true; break; case 'w': case 'x': case 'a': - if(!self::file_exists($path)){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); - } - if($run){ - OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); - } + $write=true; break; } + if($write){ + if(!$exists){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path)); + } + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); + } + } if($run){ - return $storage->fopen(self::getInternalPath($path),$mode); + $result=$storage->fopen(self::getInternalPath($path),$mode); + if($write){ + if(!$exists){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_create', array( 'path' => $path)); + } + if($run){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_write', array( 'path' => $path)); + } + } + return $result; } } } @@ -443,28 +478,42 @@ class OC_FILESYSTEM{ static public function fromTmpFile($tmpFile,$path){ if(self::canWrite($path) and $storage=self::getStorage($path)){ $run=true; - if(!self::file_exists($path)){ + $exists=self::file_exists($path); + if(!$exists){ OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path, 'run' => &$run)); } if($run){ OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); } if($run){ - return $storage->fromTmpFile($tmpFile,self::getInternalPath($path)); + $result=$storage->fromTmpFile($tmpFile,self::getInternalPath($path)); + if(!$exists){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_create', array( 'path' => $path)); + } + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_write', array( 'path' => $path)); + return $result; } } } static public function fromUploadedFile($tmpFile,$path){ + error_log('upload'); if(self::canWrite($path) and $storage=self::getStorage($path)){ $run=true; - if($run and !self::file_exists($path)){ + $exists=self::file_exists($path); + if(!$exists){ OC_HOOK::emit( 'OC_FILESYSTEM', 'create', array( 'path' => $path, 'run' => &$run)); } if($run){ OC_HOOK::emit( 'OC_FILESYSTEM', 'write', array( 'path' => $path, 'run' => &$run)); } + error_log('upload2'); if($run){ - return $storage->fromUploadedFile($tmpFile,self::getInternalPath($path)); + $result=$storage->fromUploadedFile($tmpFile,self::getInternalPath($path)); + if(!$exists){ + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_create', array( 'path' => $path)); + } + OC_HOOK::emit( 'OC_FILESYSTEM', 'post_write', array( 'path' => $path)); + return $result; } } } -- cgit v1.2.3 From 11dc3bb0e15753e54ceca74300963202b397092b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 19 Jun 2011 22:30:47 +0200 Subject: only load apps if they exist --- lib/app.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/app.php b/lib/app.php index c2a850b6f6a..544c57c1d6f 100644 --- a/lib/app.php +++ b/lib/app.php @@ -60,7 +60,9 @@ class OC_APP{ $apps = OC_APPCONFIG::getApps(); foreach( $apps as $app ){ if( self::isEnabled( $app )){ - require( "apps/$app/appinfo/app.php" ); + if(is_file($SERVERROOT."/apps/$app/appinfo/app.php")){ + require( "apps/$app/appinfo/app.php" ); + } } } -- cgit v1.2.3 From 37f9e037725de58bd9b611fff759f7d12cc6ee5a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 19 Jun 2011 22:34:04 +0200 Subject: improved check in oc_preferences if a key already exists --- lib/preferences.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/preferences.php b/lib/preferences.php index 5a9ed395085..0f4636f6832 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -139,10 +139,12 @@ class OC_PREFERENCES{ */ public static function setValue( $user, $app, $key, $value ){ // Check if the key does exist - $exists = self::getValue( $user, $app, $key, null ); + $query = OC_DB::prepare( 'SELECT configvalue FROM *PREFIX*preferences WHERE userid = ? AND appid = ? AND configkey = ?' ); + $values=$query->execute(array($user,$app,$key))->fetchAll(); + error_log(print_r($values,true)); + $exists=(count($values)>0); - // null: does not exist. Insert. - if( is_null( $exists )){ + if( !$exists ){ $query = OC_DB::prepare( 'INSERT INTO *PREFIX*preferences ( userid, appid, configkey, configvalue ) VALUES( ?, ?, ?, ? )' ); $query->execute( array( $user, $app, $key, $value )); } -- cgit v1.2.3 From ee247a21a49c801a4bf96b42a2d6ea28c9446ee6 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sun, 19 Jun 2011 22:42:33 +0200 Subject: shipped apps are no longer hardcoded --- lib/installer.php | 18 +++++++++--------- lib/setup.php | 46 ++++++++++++++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/lib/installer.php b/lib/installer.php index 02b71027cd7..91b7ea7da67 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -108,7 +108,7 @@ class OC_INSTALLER{ $basedir=$SERVERROOT.'/apps/'.$info['id']; //check if an app with the same id is already installed - if(self::isInstalled( $info['id'] ))){ + if(self::isInstalled( $info['id'] )){ error_log("App already installed"); OC_HELPER::rmdirr($extractDir); if($data['source']=='http'){ @@ -118,14 +118,14 @@ class OC_INSTALLER{ } //check if the destination directory already exists -+ if(is_dir($basedir)){ -+ error_log("App's directory already exists"); -+ OC_HELPER::rmdirr($extractDir); -+ if($data['source']=='http'){ -+ unlink($path); -+ } -+ return false; -+ } + if(is_dir($basedir)){ + error_log("App's directory already exists"); + OC_HELPER::rmdirr($extractDir); + if($data['source']=='http'){ + unlink($path); + } + return false; + } if(isset($data['pretent']) and $data['pretent']==true){ return false; diff --git a/lib/setup.php b/lib/setup.php index 43ead7b96ac..0e324b741a2 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -1,5 +1,7 @@ -- cgit v1.2.3 From 51c0a8e3ced84eeb4465d5f81571b448f231a4a5 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sun, 19 Jun 2011 23:10:59 +0200 Subject: index now properly reloaded after setup --- lib/setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/setup.php b/lib/setup.php index 0e324b741a2..f64842a9041 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -23,7 +23,7 @@ if(isset($_POST['install']) AND $_POST['install']=='true') { OC_TEMPLATE::printGuestPage("", "installation", $options); } else { - header("Location: $WEBROOT"); + header("Location: $SUBURI"); exit(); } } -- cgit v1.2.3 From 38545d5ee467016b8b1ea28faead546179889f09 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sun, 19 Jun 2011 23:29:09 +0200 Subject: and even more properly now ;P --- lib/setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/setup.php b/lib/setup.php index f64842a9041..5905261f18f 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -23,7 +23,7 @@ if(isset($_POST['install']) AND $_POST['install']=='true') { OC_TEMPLATE::printGuestPage("", "installation", $options); } else { - header("Location: $SUBURI"); + header("Location: $WEBROOT$SUBURI"); exit(); } } -- cgit v1.2.3 From b31a8ac985c829fde5e7baa90efd21eeb27fb08c Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Sun, 19 Jun 2011 23:33:34 +0200 Subject: More l10n-stuff --- admin/l10n/messages.pot | 91 ++++++++++++++++++++++++++++++++ admin/l10n/xgettextfiles | 5 ++ docs/createtranslation.pl | 1 + docs/getstrings.pl | 18 +++++++ index.php | 2 + js/js.js | 43 ++++++++-------- js/setup.js | 26 ++++++++++ l10n/de.php | 11 ++++ l10n/de.po | 120 +++++++++++++++++++++++++++++++++++++++++++ l10n/javascript.php | 34 ++++++++++++ l10n/messages.pot | 120 +++++++++++++++++++++++++++++++++++++++++++ l10n/xgettextfiles | 7 +++ lib/l10n.php | 20 +++++--- log/l10n/da.php | 14 +++++ log/l10n/da.po | 67 ++++++++++++++++++++++++ log/l10n/log | 1 + templates/404.php | 2 +- templates/installation.php | 36 ++++++------- templates/layout.admin.php | 3 ++ templates/layout.guest.php | 5 +- templates/layout.user.php | 3 ++ templates/login.php | 2 +- templates/logout.php | 2 +- templates/part.pagenavi.php | 4 +- templates/part.searchbox.php | 2 +- 25 files changed, 584 insertions(+), 55 deletions(-) create mode 100644 admin/l10n/messages.pot create mode 100644 admin/l10n/xgettextfiles create mode 100644 docs/getstrings.pl create mode 100644 js/setup.js create mode 100644 l10n/de.php create mode 100644 l10n/de.po create mode 100644 l10n/javascript.php create mode 100644 l10n/messages.pot create mode 100644 l10n/xgettextfiles create mode 100644 log/l10n/da.php create mode 100644 log/l10n/da.po diff --git a/admin/l10n/messages.pot b/admin/l10n/messages.pot new file mode 100644 index 00000000000..c30a4454311 --- /dev/null +++ b/admin/l10n/messages.pot @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:32+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/app.php:22 +msgid "read more" +msgstr "" + +#: ../templates/app.php:24 +msgid "INSTALL" +msgstr "" + +#: ../templates/app_noconn.php:6 ../templates/apps.php:6 +msgid "Apps Repository" +msgstr "" + +#: ../templates/app_noconn.php:7 +msgid "Cannot connect to apps repository" +msgstr "" + +#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 +#: ../templates/users.php:50 +msgid "Name" +msgstr "" + +#: ../templates/apps.php:14 +msgid "Modified" +msgstr "" + +#: ../templates/system.php:6 +msgid "Administration" +msgstr "" + +#: ../templates/system.php:7 +msgid "System Settings" +msgstr "" + +#: ../templates/users.php:13 +msgid "Add user" +msgstr "" + +#: ../templates/users.php:21 +msgid "Password" +msgstr "" + +#: ../templates/users.php:30 +msgid "Create user" +msgstr "" + +#: ../templates/users.php:40 ../templates/users.php:68 +msgid "remove" +msgstr "" + +#: ../templates/users.php:46 +msgid "Groups" +msgstr "" + +#: ../templates/users.php:58 +msgid "Create group" +msgstr "" + +#: ../templates/users.php:94 +msgid "Force new password:" +msgstr "" + +#: ../templates/users.php:96 +msgid "Set" +msgstr "" + +#: ../templates/users.php:102 +msgid "Do you really want to delete user" +msgstr "" + +#: ../templates/users.php:109 +msgid "Do you really want to delete group" +msgstr "" diff --git a/admin/l10n/xgettextfiles b/admin/l10n/xgettextfiles new file mode 100644 index 00000000000..37acbc25deb --- /dev/null +++ b/admin/l10n/xgettextfiles @@ -0,0 +1,5 @@ +../templates/app.php +../templates/app_noconn.php +../templates/apps.php +../templates/system.php +../templates/users.php diff --git a/docs/createtranslation.pl b/docs/createtranslation.pl index 4c1c7c38d73..12ba22a5ea4 100644 --- a/docs/createtranslation.pl +++ b/docs/createtranslation.pl @@ -16,6 +16,7 @@ foreach my $i ( @files ){ my @strings = (); foreach my $key ( keys( %{$hash} )){ next if $key eq '""'; + next if $hash->{$key}->msgstr() eq '""'; push( @strings, $hash->{$key}->msgid()." => ".$hash->{$key}->msgstr()); } diff --git a/docs/getstrings.pl b/docs/getstrings.pl new file mode 100644 index 00000000000..0325438b551 --- /dev/null +++ b/docs/getstrings.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl +use strict; + +if( -e 'messages.pot' ){ + `xgettext --files-from=xgettextfiles --join-existing --output=messages.pot --keyword=t` +} +else{ + `xgettext --files-from=xgettextfiles --output=messages.pot --keyword=t` +} + +opendir( DIR, '.' ); +my @files = readdir( DIR ); +closedir( DIR ); + +foreach my $i ( @files ){ + next unless $i =~ m/^(.*)\.po$/; + `xgettext --files-from=xgettextfiles --join-existing --output=$i --keyword=t` +} diff --git a/index.php b/index.php index f4d6f27a3c4..5aaa8fb89c0 100644 --- a/index.php +++ b/index.php @@ -27,6 +27,8 @@ require_once(dirname(__FILE__).'/lib/base.php'); require_once('appconfig.php'); require_once('template.php'); +OC_UTIL::addScript('setup'); + $not_installed = !OC_CONFIG::getValue('installed', false); $install_called = (isset($_POST['install']) AND $_POST['install']=='true'); diff --git a/js/js.js b/js/js.js index a6765ec62db..7e44b7ce6d5 100644 --- a/js/js.js +++ b/js/js.js @@ -1,26 +1,23 @@ -$(document).ready(function() { - // Hide the MySQL config div if needed : - if(!$('#mysql').is(':checked') && $('#hasSQLite').val()=='true') { - $('#use_mysql').hide(); +var _l10ncache = {}; +function t(app,text){ + if( !( app in _l10ncache )){ + $.post( oc_webroot+'/l10n/javascript.php', {'app': app}, function(jsondata){ + _l10ncache[app] = jsondata.data; + }); + + // Bad answer ... + if( !( app in _l10ncache )){ + _l10ncache[app] = []; + } } - - $('#datadirField').hide(250); - if($('#hasSQLite').val()=='true'){ - $('#databaseField').hide(250); + if( typeof( _l10ncache[app][text] ) !== 'undefined' ){ + return _l10ncache[app][text]; } - - $('#sqlite').click(function() { - $('#use_mysql').slideUp(250); - }); - - $('#mysql').click(function() { - $('#use_mysql').slideDown(250); - }); - - $('#showAdvanced').click(function() { - $('#datadirField').slideToggle(250); - if($('#hasSQLite').val()=='true'){ - $('#databaseField').slideToggle(250); - } - }); + else{ + return text; + } +} + +$(document).ready(function(){ + // Put fancy stuff in here }); diff --git a/js/setup.js b/js/setup.js new file mode 100644 index 00000000000..b4616b8b14c --- /dev/null +++ b/js/setup.js @@ -0,0 +1,26 @@ +$(document).ready(function() { + // Hide the MySQL config div if needed : + if(!$('#mysql').is(':checked') && $('#hasSQLite').val()=='true') { + $('#use_mysql').hide(); + } + + $('#datadirField').hide(250); + if($('#hasSQLite').val()=='true'){ + $('#databaseField').hide(250); + } + + $('#sqlite').click(function() { + $('#use_mysql').slideUp(250); + }); + + $('#mysql').click(function() { + $('#use_mysql').slideDown(250); + }); + + $('#showAdvanced').click(function() { + $('#datadirField').slideToggle(250); + if($('#hasSQLite').val()=='true'){ + $('#databaseField').slideToggle(250); + } + }); +}); diff --git a/l10n/de.php b/l10n/de.php new file mode 100644 index 00000000000..fb00345e69d --- /dev/null +++ b/l10n/de.php @@ -0,0 +1,11 @@ + "Sie wurden abgemeldet.", +"Set where to store the data." => "Speicherort der Daten", +"Advanced" => "Erweitert", +"prev" => "zurück", +"Login:" => "Benutzername:", +"Login failed!" => "Anmeldung Fehlgeschlagen!", +"next" => "weiter", +"Password:" => "Passwort:", +"Search" => "Suchen" +); diff --git a/l10n/de.po b/l10n/de.po new file mode 100644 index 00000000000..19b12ca4aac --- /dev/null +++ b/l10n/de.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "" + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "" + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "" + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "" + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "Benutzername:" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "Passwort:" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "Erweitert" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "Speicherort der Daten" + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "" + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "" + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "" + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "" + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "" + +#: ../templates/layout.guest.php:17 ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

    " +msgstr "" + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "Anmeldung Fehlgeschlagen!" + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "Sie wurden abgemeldet." + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "zurück" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "weiter" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "Suchen" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "" diff --git a/l10n/javascript.php b/l10n/javascript.php new file mode 100644 index 00000000000..a1e84487f63 --- /dev/null +++ b/l10n/javascript.php @@ -0,0 +1,34 @@ +. +* +*/ + +// Init owncloud +require_once('../lib/base.php'); + +$app = $_POST["app"]; + +// We send json data +header( "Content-Type: application/jsonrequest" ); +$l = new OC_L10N( $app ); + +echo json_encode( array( 'status' => 'success', 'data' => $l->getTranslations())); +?> diff --git a/l10n/messages.pot b/l10n/messages.pot new file mode 100644 index 00000000000..591a1c724e3 --- /dev/null +++ b/l10n/messages.pot @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "" + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "" + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "" + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "" + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "" + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "" + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "" + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "" + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "" + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "" + +#: ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

    " +msgstr "" + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "" + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "" + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "" diff --git a/l10n/xgettextfiles b/l10n/xgettextfiles new file mode 100644 index 00000000000..b5d83a880d4 --- /dev/null +++ b/l10n/xgettextfiles @@ -0,0 +1,7 @@ +../templates/404.php +../templates/installation.php +../templates/layout.guest.php +../templates/login.php +../templates/logout.php +../templates/part.pagenavi.php +../templates/part.searchbox.php diff --git a/lib/l10n.php b/lib/l10n.php index 2f72b971173..8a7ff9d8535 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -109,6 +109,16 @@ class OC_L10N{ return $text; } + /** + * @brief getTranslations + * @returns Fetch all translations + * + * Returns an associative array with all translations + */ + public function getTranslations(){ + return $this->translations; + } + /** * @brief Localization * @param $type Type of localization @@ -202,11 +212,10 @@ class OC_L10N{ closedir($dh); } } - if( isset($_SESSION['user_id']) && $_SESSION['user_id'] && OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' )){ $lang = OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' ); self::$language = $lang; - if( array_search( $lang, $available )){ + if( array_search( $lang, $available ) !== false ){ return $lang; } } @@ -226,12 +235,9 @@ class OC_L10N{ } /** - * @brief find the best language + * @brief find the l10n directory * @param $app App that needs to be translated - * @returns language - * - * Finds the best language. Depends on user settings and browser - * information + * @returns directory */ protected static function findI18nDir( $app ){ global $SERVERROOT; diff --git a/log/l10n/da.php b/log/l10n/da.php new file mode 100644 index 00000000000..8ab99277bfa --- /dev/null +++ b/log/l10n/da.php @@ -0,0 +1,14 @@ + "Vis:", +"Uploads" => "Uploads", +"Filter:" => "Filter:", +"Logouts" => "Logouts", +"Logins" => "Logins", +"When" => "Hvornår", +"Downloads" => "Downloads", +"Clear log entries before" => "Slet log poster før", +"What" => "Hvilket", +"entries per page." => "poster pr side.", +"Creations" => "Oprettelser", +"Deletions" => "Sletninger" +); diff --git a/log/l10n/da.po b/log/l10n/da.po new file mode 100644 index 00000000000..5a88aedee94 --- /dev/null +++ b/log/l10n/da.po @@ -0,0 +1,67 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Mikkel Bjerg Larsen , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 16:53+0200\n" +"PO-Revision-Date: 2011-06-19 21:09+0200\n" +"Last-Translator: Mikkel Bjerg Larsen \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/index.php:4 +msgid "Filter:" +msgstr "Filter:" + +#: ../templates/index.php:7 +msgid "Logins" +msgstr "Logins" + +#: ../templates/index.php:8 +msgid "Logouts" +msgstr "Logouts" + +#: ../templates/index.php:9 +msgid "Downloads" +msgstr "Downloads" + +#: ../templates/index.php:10 +msgid "Uploads" +msgstr "Uploads" + +#: ../templates/index.php:11 +msgid "Creations" +msgstr "Oprettelser" + +#: ../templates/index.php:12 +msgid "Deletions" +msgstr "Sletninger" + +#: ../templates/index.php:15 +msgid "Show:" +msgstr "Vis:" + +#: ../templates/index.php:16 +msgid "entries per page." +msgstr "poster pr side." + +#: ../templates/index.php:26 +msgid "What" +msgstr "Hvilket" + +#: ../templates/index.php:27 +msgid "When" +msgstr "Hvornår" + +#: ../templates/index.php:45 +msgid "Clear log entries before" +msgstr "Slet log poster før" + diff --git a/log/l10n/log b/log/l10n/log index e5e074bf9aa..f70eb6af3fe 100644 --- a/log/l10n/log +++ b/log/l10n/log @@ -1,3 +1,4 @@ [General] LangCode=de +ProjectID=oc_log TargetLangCode=de diff --git a/templates/404.php b/templates/404.php index 8909db29a40..b287571d166 100644 --- a/templates/404.php +++ b/templates/404.php @@ -12,7 +12,7 @@ if(!isset($_)){//also provide standalone error page " alt="ownCloud" />
    • - Error 404, Cloud not found
      + t( 'Error 404, Cloud not found' ); ?>

    diff --git a/templates/installation.php b/templates/installation.php index 880beb9a89e..93c00547ab9 100644 --- a/templates/installation.php +++ b/templates/installation.php @@ -3,8 +3,8 @@

    - Welcome to ownCloud, your personnal cloud.
    - To finish the installation, please follow the steps below. + t( 'Welcome to ownCloud, your personnal cloud.' ); ?>
    + t( 'To finish the installation, please follow the steps below.' ); ?>

    0): ?> @@ -23,48 +23,48 @@
    - Create an admin account. -

    -

    + t( 'Create an admin account.' ); ?> +

    +

    - Advanced '> + t( 'Advanced' ); ?> '>
    - Set where to store the data. -

    + t( 'Set where to store the data.' ); ?> +

    - Configure your database. + t( 'Configure your database.' ); ?> -

    I will use a SQLite database. You have nothing to do !

    +

    t( 'I will use a SQLite database. You have nothing to do!' ); ?>

    -

    />

    +

    />

    -

    I will use a MySQL database.

    +

    t( 'I will use a MySQL database.' ); ?>

    />

    -

    -

    -

    -

    -

    +

    +

    +

    +

    +

    -

    +

    diff --git a/templates/layout.admin.php b/templates/layout.admin.php index 36b824639d3..66fb3ccc60b 100644 --- a/templates/layout.admin.php +++ b/templates/layout.admin.php @@ -7,6 +7,9 @@ + diff --git a/templates/layout.guest.php b/templates/layout.guest.php index c9575530820..ce99b00b9f6 100644 --- a/templates/layout.guest.php +++ b/templates/layout.guest.php @@ -7,6 +7,9 @@ + @@ -14,6 +17,6 @@ -

    ownCloud is a personal cloud which runs on your own server.

    +

    t( 'ownCloud is a personal cloud which runs on your own server.

    ' ); ?> diff --git a/templates/layout.user.php b/templates/layout.user.php index da30df294f2..f21db202a83 100644 --- a/templates/layout.user.php +++ b/templates/layout.user.php @@ -7,6 +7,9 @@ + diff --git a/templates/login.php b/templates/login.php index 845ae831a40..e0f6ce23e2e 100644 --- a/templates/login.php +++ b/templates/login.php @@ -3,7 +3,7 @@
    - Login failed! + t( 'Login failed!' ); ?> diff --git a/templates/logout.php b/templates/logout.php index 4a15998a5c0..8cbbdd9cc8d 100644 --- a/templates/logout.php +++ b/templates/logout.php @@ -1 +1 @@ -You are logged out. +t( 'You are logged out.' ); ?> \ No newline at end of file diff --git a/templates/part.pagenavi.php b/templates/part.pagenavi.php index d48d0cada32..0602b793882 100644 --- a/templates/part.pagenavi.php +++ b/templates/part.pagenavi.php @@ -3,7 +3,7 @@
    0):?> - prev   + t( 'prev' ); ?>   @@ -23,7 +23,7 @@ - next + t( 'next' ); ?>
    - - - + + + '> - + - + diff --git a/apps/files_publiclink/templates/index.php b/apps/files_publiclink/templates/index.php index 9e238452603..759f3ad8772 100644 --- a/apps/files_publiclink/templates/index.php +++ b/apps/files_publiclink/templates/index.php @@ -5,9 +5,9 @@ - - - + + + -- cgit v1.2.3 From 76b12c4ae0ea9941b030f0a13786d0ac3fc32f76 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 20 Jun 2011 14:33:02 +0200 Subject: add settings option for language --- lib/l10n.php | 37 +++++++++++++++++++++------------ settings/ajax/setlanguage.php | 24 ++++++++++++++++++++++ settings/index.php | 7 +++++++ settings/js/main.js | 14 +++++++++++++ settings/templates/index.php | 48 +++++++++++++++++++++++++++---------------- 5 files changed, 99 insertions(+), 31 deletions(-) create mode 100644 settings/ajax/setlanguage.php diff --git a/lib/l10n.php b/lib/l10n.php index f760d78c72b..729310825dd 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -198,19 +198,7 @@ class OC_L10N{ $available = $app; } else{ - $dir = self::findI18nDir( $app ); - if( file_exists($dir)){ - $dh = opendir($dir); - while(( $file = readdir( $dh )) !== false ){ - if( substr( $file, -4, 4 ) == '.php' ){ - $i = substr( $file, 0, -4 ); - if( $i != '' ){ - $available[] = $i; - } - } - } - closedir($dh); - } + $available=self::findAvailableLanguages( $app ); } if( isset($_SESSION['user_id']) && $_SESSION['user_id'] && OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' )){ $lang = OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' ); @@ -255,4 +243,27 @@ class OC_L10N{ } return $i18ndir; } + + /** + * @brief find all available languages for an app + * @param $app App that needs to be translated + * @returns array an array of available languages + */ + public static function findAvailableLanguages( $app=null ){ + $available=array('en');//english is always available + $dir = self::findI18nDir( $app ); + if( file_exists($dir)){ + $dh = opendir($dir); + while(( $file = readdir( $dh )) !== false ){ + if( substr( $file, -4, 4 ) == '.php' and strlen($file)==6 ){ + $i = substr( $file, 0, -4 ); + if( $i != '' ){ + $available[] = $i; + } + } + } + closedir($dh); + } + return $available; + } } \ No newline at end of file diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php new file mode 100644 index 00000000000..672836afe0f --- /dev/null +++ b/settings/ajax/setlanguage.php @@ -0,0 +1,24 @@ + "error", "data" => array( "message" => "Authentication error" ))); + exit(); +} + +// Get data +if( isset( $_POST['lang'] ) ){ + $lang=$_POST['lang']; + OC_PREFERENCES::setValue( $_SESSION['user_id'], 'core', 'lang', $lang ); + echo json_encode( array( "status" => "success", "data" => array( "message" => "Language changed" ))); +}else{ + echo json_encode( array( "status" => "error", "data" => array( "message" => "Invalid request" ))); +} + +?> diff --git a/settings/index.php b/settings/index.php index 1a442eca811..e2a73a5d9f3 100644 --- a/settings/index.php +++ b/settings/index.php @@ -18,11 +18,18 @@ $free=OC_FILESYSTEM::free_space(); $total=$free+$used; $relative=round(($used/$total)*100); +$lang=OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang', 'en' ); +$languages=OC_L10N::findAvailableLanguages(); +//put the current language in the front +unset($languages[array_search($lang,$languages)]); +array_unshift($languages,$lang); + // Return template $tmpl = new OC_TEMPLATE( "settings", "index", "admin"); $tmpl->assign('usage',OC_HELPER::humanFileSize($used)); $tmpl->assign('total_space',OC_HELPER::humanFileSize($total)); $tmpl->assign('usage_relative',$relative); +$tmpl->assign('languages',$languages); $tmpl->printPage(); ?> diff --git a/settings/js/main.js b/settings/js/main.js index e05fc68743c..010225bcb27 100644 --- a/settings/js/main.js +++ b/settings/js/main.js @@ -18,4 +18,18 @@ $(document).ready(function(){ }); return false; }); + + $("#languageinput").change( function(){ + // Serialize the data + var post = $( "#languageinput" ).serialize(); + // Ajax foo + $.post( 'ajax/setlanguage.php', post, function(data){ + if( data.status == "success" ){ + } + else{ + $('#passworderror').html( data.data.message ); + } + }); + return false; + }); } ); diff --git a/settings/templates/index.php b/settings/templates/index.php index 2d5e9d9140f..f8ef9faf1d7 100644 --- a/settings/templates/index.php +++ b/settings/templates/index.php @@ -8,23 +8,35 @@
    - Change Password -
    You're password got changed
    -
    -

    - - -

    -

    - - -

    -

    - - -

    - + Change Password +
    You're password got changed
    +
    +

    + + +

    +

    + + +

    +

    + + +

    + +
    + + +
    +
    + Language + +
    -- cgit v1.2.3 From 4c1d3155a3ee4ddb48a0bb4281fe74391db1f016 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 20 Jun 2011 14:51:33 +0200 Subject: make personal settings translatable --- settings/ajax/changepassword.php | 12 +++--- settings/ajax/setlanguage.php | 8 ++-- settings/l10n/messages.pot | 86 ++++++++++++++++++++++++++++++++++++++++ settings/l10n/xgettextfiles | 3 ++ settings/templates/index.php | 16 ++++---- 5 files changed, 109 insertions(+), 16 deletions(-) create mode 100644 settings/l10n/messages.pot create mode 100644 settings/l10n/xgettextfiles diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index 1a9ad73610e..f568d3ef876 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -3,33 +3,35 @@ // Init owncloud require_once('../../lib/base.php'); +$l=new OC_L10N('settings'); + // We send json data header( "Content-Type: application/jsonrequest" ); // Check if we are a user if( !OC_USER::isLoggedIn()){ - echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); + echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t( "Authentication error" ) ))); exit(); } // Get data if( !isset( $_POST["password"] ) && !isset( $_POST["oldpassword"] )){ - echo json_encode( array( "status" => "error", "data" => array( "message" => "You have to enter the old and the new password!" ))); + echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t( "You have to enter the old and the new password!" ) ))); exit(); } // Check if the old password is correct if( !OC_USER::checkPassword( $_SESSION["user_id"], $_POST["oldpassword"] )){ - echo json_encode( array( "status" => "error", "data" => array( "message" => "Your old password is wrong!" ))); + echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Your old password is wrong!") ))); exit(); } // Change password if( OC_USER::setPassword( $_SESSION["user_id"], $_POST["password"] )){ - echo json_encode( array( "status" => "success", "data" => array( "message" => "Password changed" ))); + echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("Password changed") ))); } else{ - echo json_encode( array( "status" => "error", "data" => array( "message" => "Unable to change password" ))); + echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Unable to change password") ))); } ?> diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index 672836afe0f..f971806f4c6 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -3,12 +3,14 @@ // Init owncloud require_once('../../lib/base.php'); +$l=new OC_L10N('settings'); + // We send json data header( "Content-Type: application/jsonrequest" ); // Check if we are a user if( !OC_USER::isLoggedIn()){ - echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); + echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Authentication error") ))); exit(); } @@ -16,9 +18,9 @@ if( !OC_USER::isLoggedIn()){ if( isset( $_POST['lang'] ) ){ $lang=$_POST['lang']; OC_PREFERENCES::setValue( $_SESSION['user_id'], 'core', 'lang', $lang ); - echo json_encode( array( "status" => "success", "data" => array( "message" => "Language changed" ))); + echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("Language changed") ))); }else{ - echo json_encode( array( "status" => "error", "data" => array( "message" => "Invalid request" ))); + echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Invalid request") ))); } ?> diff --git a/settings/l10n/messages.pot b/settings/l10n/messages.pot new file mode 100644 index 00000000000..705d583ee76 --- /dev/null +++ b/settings/l10n/messages.pot @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 14:47+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:3 +msgid "Account information" +msgstr "" + +#: ../templates/index.php:5 +msgid "You're currently using" +msgstr "" + +#: ../templates/index.php:5 +msgid "of your" +msgstr "" + +#: ../templates/index.php:5 +msgid "space" +msgstr "" + +#: ../templates/index.php:11 +msgid "Change Password" +msgstr "" + +#: ../templates/index.php:12 +msgid "Your password got changed" +msgstr "" + +#: ../templates/index.php:15 +msgid "Old password:" +msgstr "" + +#: ../templates/index.php:19 +msgid "New password" +msgstr "" + +#: ../templates/index.php:24 +msgid "Show new password" +msgstr "" + +#: ../templates/index.php:34 +msgid "Language" +msgstr "" + +#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 +msgid "Authentication error" +msgstr "" + +#: ../ajax/changepassword.php:19 +msgid "You have to enter the old and the new password!" +msgstr "" + +#: ../ajax/changepassword.php:25 +msgid "Your old password is wrong!" +msgstr "" + +#: ../ajax/changepassword.php:31 +msgid "Password changed" +msgstr "" + +#: ../ajax/changepassword.php:34 +msgid "Unable to change password" +msgstr "" + +#: ../ajax/setlanguage.php:21 +msgid "Language changed" +msgstr "" + +#: ../ajax/setlanguage.php:23 +msgid "Invalid request" +msgstr "" diff --git a/settings/l10n/xgettextfiles b/settings/l10n/xgettextfiles new file mode 100644 index 00000000000..8a2f185f230 --- /dev/null +++ b/settings/l10n/xgettextfiles @@ -0,0 +1,3 @@ +../templates/index.php +../ajax/changepassword.php +../ajax/setlanguage.php \ No newline at end of file diff --git a/settings/templates/index.php b/settings/templates/index.php index f8ef9faf1d7..761289acefa 100644 --- a/settings/templates/index.php +++ b/settings/templates/index.php @@ -1,27 +1,27 @@
    - Account information + t( 'Account information' );?>
     
    -

    You're currently using % () of your space.

    +

    t( 'You\'re currently using' );?> % () t( 'of your' );?> t( 'space' );?>.

    - Change Password -
    You're password got changed
    + t( 'Change Password' );?> +
    t( 'Your password got changed');?>

    - +

    - +

    - +

    - Language + t( 'Language' );?> '/>
    + t( 'Maximum upload size' ); ?> '/>
    - Allow public folders
    + t( 'Allow public folders' ); ?>
    - (if public is enabled)
    - separated from webdav storage
    - let the user decide
    - folder "/public" in webdav storage
    - (endif)
    + t( '(if public is enabled)' ); ?>
    + t( 'separated from webdav storage' ); ?>
    + t( 'let the user decide' ); ?>
    + t( 'folder "/public" in webdav storage' ); ?>
    + t( '(endif)' ); ?>
    - Allow downloading shared files
    - Allow uploading in shared directory
    + t( 'Allow downloading shared files' ); ?>
    + t( 'Allow uploading in shared directory' ); ?>
    diff --git a/files/templates/index.php b/files/templates/index.php index d2d0a237d7b..0f24a00f077 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -15,9 +15,9 @@   - Download - - Delete + t( 'Download' ); ?> + + t( 'Delete' ); ?>
    @@ -31,9 +31,9 @@
    - - - + + + -- cgit v1.2.3 From 317b18bef8fbaa412b20e29b1fde8ddc6425cda2 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Mon, 20 Jun 2011 17:13:18 +0200 Subject: make help translateable --- help/templates/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/help/templates/index.php b/help/templates/index.php index a117c3d5fb4..ac7e12b757a 100644 --- a/help/templates/index.php +++ b/help/templates/index.php @@ -1,5 +1,5 @@ -

    Questions and Answers

    +

    t( 'Questions and Answers' ); ?>

    @@ -18,6 +18,6 @@ $pageNavi=OC_UTIL::getPageNavi($_['pagecount'],$_['page'],$url); $pageNavi->printPage(); ?> -ASK A QUESTION +t( 'ASK A QUESTION' ); ?> -- cgit v1.2.3 From 7ac7a6801ce867a20c4b36950d5929e577915871 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Mon, 20 Jun 2011 18:16:24 +0200 Subject: added basic "installed apps" page --- admin/appinfo/app.php | 2 +- admin/apps.php | 95 ++++++++++++++++++++++++-------------------- admin/css/apps.css | 18 +++++++++ admin/templates/appsinst.php | 27 +++++++++++++ 4 files changed, 98 insertions(+), 44 deletions(-) create mode 100644 admin/templates/appsinst.php diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php index 775575e22a8..d01b7d5d624 100644 --- a/admin/appinfo/app.php +++ b/admin/appinfo/app.php @@ -7,6 +7,6 @@ OC_APP::addAdminPage( array( "id" => "core_users", "order" => 2, "href" => OC_HE OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps", "icon" => OC_HELPER::imagePath( "admin", "apps.png" ))); // Add subentries for App installer -OC_APP::addNavigationSubEntry( "core_apps", array( "id" => "core_apps_installed", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php?add=some¶meters=here" ), "name" => "Installed apps", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); +OC_APP::addNavigationSubEntry( "core_apps", array( "id" => "core_apps_installed", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php?installed" ), "name" => "Installed apps", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); ?> diff --git a/admin/apps.php b/admin/apps.php index 5b4e65e340e..725128a7523 100644 --- a/admin/apps.php +++ b/admin/apps.php @@ -34,65 +34,74 @@ OC_UTIL::addStyle( "admin", "apps" ); if(isset($_GET['id'])) $id=$_GET['id']; else $id=0; if(isset($_GET['cat'])) $cat=$_GET['cat']; else $cat=0; +if(isset($_GET['installed'])) $installed=true; else $installed=false; + +if($installed){ + global $SERVERROOT; + $apps = OC_APPCONFIG::getApps(); + $records = array(); + + OC_APP::setActiveNavigationEntry( "core_apps_installed" ); + echo count($apps); + foreach($apps as $app){ + $info=OC_APP::getAppInfo("$SERVERROOT/apps/$app/appinfo/info.xml"); + $record = array( 'id' => $app, + 'name' => $info['name'], + 'version' => $info['version'], + 'author' => $info['author'], + 'enabled' => OC_APP::isEnabled( $app )); + $records[]=$record; + } -$categories=OC_OCSCLIENT::getCategories(); -if($categories==NULL){ - OC_APP::setActiveNavigationEntry( "core_apps" ); - - $tmpl = new OC_TEMPLATE( "admin", "app_noconn", "admin" ); + $tmpl = new OC_TEMPLATE( "admin", "appsinst", "admin" ); + $tmpl->assign( "apps", $records ); $tmpl->printPage(); unset($tmpl); exit(); -} -/* - -All -Installed Apps - +}else{ + $categories=OC_OCSCLIENT::getCategories(); + if($categories==NULL){ + OC_APP::setActiveNavigationEntry( "core_apps" ); -foreach($categories as $key=>$value) { -print_r($value); -} + $tmpl = new OC_TEMPLATE( "admin", "app_noconn", "admin" ); + $tmpl->printPage(); + unset($tmpl); + exit(); + } -*/ + if($id==0) { + OC_APP::setActiveNavigationEntry( "core_apps" ); -// OC_APP::setActiveNavigationEntry( "core_apps_installed" ); + if($cat==0){ + $numcats=array(); + foreach($categories as $key=>$value) $numcats[]=$key; + $apps=OC_OCSCLIENT::getApplications($numcats); + }else{ + $apps=OC_OCSCLIENT::getApplications($cat); + } + // return template + $tmpl = new OC_TEMPLATE( "admin", "apps", "admin" ); -if($id==0) { - OC_APP::setActiveNavigationEntry( "core_apps" ); + $tmpl->assign( "categories", $categories ); + $tmpl->assign( "apps", $apps ); + $tmpl->printPage(); + unset($tmpl); - if($cat==0){ - $numcats=array(); - foreach($categories as $key=>$value) $numcats[]=$key; - $apps=OC_OCSCLIENT::getApplications($numcats); }else{ - $apps=OC_OCSCLIENT::getApplications($cat); - } + OC_APP::setActiveNavigationEntry( "core_apps" ); - // return template - $tmpl = new OC_TEMPLATE( "admin", "apps", "admin" ); + $app=OC_OCSCLIENT::getApplication($id); - $tmpl->assign( "categories", $categories ); - $tmpl->assign( "apps", $apps ); - $tmpl->printPage(); - unset($tmpl); - -}else{ - OC_APP::setActiveNavigationEntry( "core_apps" ); - - $app=OC_OCSCLIENT::getApplication($id); - - $tmpl = new OC_TEMPLATE( "admin", "app", "admin" ); - $tmpl->assign( "categories", $categories ); - $tmpl->assign( "app", $app ); - $tmpl->printPage(); - unset($tmpl); + $tmpl = new OC_TEMPLATE( "admin", "app", "admin" ); + $tmpl->assign( "categories", $categories ); + $tmpl->assign( "app", $app ); + $tmpl->printPage(); + unset($tmpl); + } } - ?> - diff --git a/admin/css/apps.css b/admin/css/apps.css index 7063762204a..fbbd4fce4b5 100644 --- a/admin/css/apps.css +++ b/admin/css/apps.css @@ -7,6 +7,24 @@ table td.date text-align: right; } +table td.version, table td.enabled, table td.disabled +{ + padding: 0.5em 1em; + text-align: center; +} + +table td.enabled +{ + color: #006600; + font-weight: bold; +} + +table td.disabled +{ + color: #660000; + font-weight: bold; +} + .preview { padding: 3px; diff --git a/admin/templates/appsinst.php b/admin/templates/appsinst.php new file mode 100644 index 00000000000..c1acc09d5d3 --- /dev/null +++ b/admin/templates/appsinst.php @@ -0,0 +1,27 @@ + +

    t( 'Installed Applications' ); ?>

    + +
    + + + + + + + + + + + + + + + + + + +
    t( 'Name' ); ?>t( 'Version' ); ?>t( 'Author' ); ?>t( 'Status' ); ?>
    t( $app['enabled'] ? 'enabled' : 'disabled' ); ?>
    \ No newline at end of file -- cgit v1.2.3 From 05637416529606d1aa9c19a3f988c386c17b1352 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 20 Jun 2011 19:04:31 +0200 Subject: fix sqlite3 driver for php<5.3 --- lib/MDB2/Driver/sqlite3.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MDB2/Driver/sqlite3.php b/lib/MDB2/Driver/sqlite3.php index a569da187aa..3b74afed146 100644 --- a/lib/MDB2/Driver/sqlite3.php +++ b/lib/MDB2/Driver/sqlite3.php @@ -412,7 +412,9 @@ class MDB2_Driver_sqlite3 extends MDB2_Driver_Common $php_errormsg = ''; $this->connection = new SQLite3($database_file); - $this->connection->busyTimeout(100); + if(is_callable(array($this->connection,'busyTimeout'))){//busy timout is only available in php>=5.3 + $this->connection->busyTimeout(100); + } $this->_lasterror = $this->connection->lastErrorMsg(); if (!$this->connection) { return $this->raiseError(MDB2_ERROR_CONNECT_FAILED, null, null, -- cgit v1.2.3 From 272fc252fb71422db2101a76fc541f20924808cd Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 19:50:25 +0200 Subject: Activate "active" for subentries --- lib/app.php | 81 +++++++++++++++++++++++++--------------------- templates/layout.admin.php | 4 +-- 2 files changed, 47 insertions(+), 38 deletions(-) diff --git a/lib/app.php b/lib/app.php index 544c57c1d6f..64704f09bbd 100644 --- a/lib/app.php +++ b/lib/app.php @@ -29,7 +29,7 @@ class OC_APP{ static private $init = false; static private $apps = array(); - static private $activeapp = ""; + static private $activeapp = ''; static private $adminpages = array(); static private $settingspages = array(); static private $navigation = array(); @@ -52,16 +52,16 @@ class OC_APP{ } // Our very own core apps are hardcoded - foreach( array( "admin", "files", "log", "help", "settings" ) as $app ){ - require( "$app/appinfo/app.php" ); + foreach( array( 'admin', 'files', 'log', 'help', 'settings' ) as $app ){ + require( $app.'/appinfo/app.php' ); } // The rest comes here $apps = OC_APPCONFIG::getApps(); foreach( $apps as $app ){ if( self::isEnabled( $app )){ - if(is_file($SERVERROOT."/apps/$app/appinfo/app.php")){ - require( "apps/$app/appinfo/app.php" ); + if(is_file($SERVERROOT.'/apps/'.$app.'/appinfo/app.php')){ + require( 'apps/'.$app.'/appinfo/app.php' ); } } } @@ -116,8 +116,8 @@ class OC_APP{ * * This function registers the application. $data is an associative array. * The following keys are required: - * - id: id of the application, has to be unique ("addressbook") - * - name: Human readable name ("Addressbook") + * - id: id of the application, has to be unique ('addressbook') + * - name: Human readable name ('Addressbook') * - version: array with Version (major, minor, bugfix) ( array(1, 0, 2)) * * The following keys are optional: @@ -148,9 +148,9 @@ class OC_APP{ * This function adds a new entry to the navigation visible to users. $data * is an associative array. * The following keys are required: - * - id: unique id for this entry ("addressbook_index") + * - id: unique id for this entry ('addressbook_index') * - href: link to the page - * - name: Human readable name ("Addressbook") + * - name: Human readable name ('Addressbook') * * The following keys are optional: * - icon: path to the icon of the app @@ -174,9 +174,9 @@ class OC_APP{ * as being active (see activateNavigationEntry()). $data is an associative * array. * The following keys are required: - * - id: unique id for this entry ("addressbook_index") + * - id: unique id for this entry ('addressbook_index') * - href: link to the page - * - name: Human readable name ("Addressbook") + * - name: Human readable name ('Addressbook') * * The following keys are optional: * - icon: path to the icon of the app @@ -196,7 +196,7 @@ class OC_APP{ * @param $id id of the entry * @returns true/false * - * This function sets a navigation entry as active and removes the "active" + * This function sets a navigation entry as active and removes the 'active' * property from all other entries. The templates can use this for * highlighting the current position of the user. */ @@ -224,9 +224,9 @@ class OC_APP{ * This function registers a admin page that will be shown in the admin * menu. $data is an associative array. * The following keys are required: - * - id: unique id for this entry ("files_admin") + * - id: unique id for this entry ('files_admin') * - href: link to the admin page - * - name: Human readable name ("Files Administration") + * - name: Human readable name ('Files Administration') * * The following keys are optional: * - order: integer, that influences the position of your application in @@ -245,16 +245,16 @@ class OC_APP{ * * This function registers a settings page. $data is an associative array. * The following keys are required: - * - app: app the settings belong to ("files") - * - id: unique id for this entry ("files_public") + * - app: app the settings belong to ('files') + * - id: unique id for this entry ('files_public') * - href: link to the admin page - * - name: Human readable name ("Public files") + * - name: Human readable name ('Public files') * * The following keys are optional: * - order: integer, that influences the position of your application in * the list. Lower values come first. * - * For the main settings page of an app, the keys "app" and "id" have to be + * For the main settings page of an app, the keys 'app' and 'id' have to be * the same. */ public static function addSettingsPage( $data = array()){ @@ -268,11 +268,11 @@ class OC_APP{ * @returns associative array * * This function returns an array containing all entries added. The - * entries are sorted by the key "order" ascending. Additional to the keys + * entries are sorted by the key 'order' ascending. Additional to the keys * given for each app the following keys exist: * - active: boolean, signals if the user is on this navigation entry - * - children: array that is empty if the key "active" is false or - * contains the subentries if the key "active" is true + * - children: array that is empty if the key 'active' is false or + * contains the subentries if the key 'active' is true */ public static function getNavigation(){ $navigation = self::proceedNavigation( self::$navigation ); @@ -285,7 +285,7 @@ class OC_APP{ * @returns associative array * * This function returns an array containing all settings pages added. The - * entries are sorted by the key "order" ascending. + * entries are sorted by the key 'order' ascending. */ public static function getSettingsNavigation(){ $navigation = self::proceedNavigation( self::$settingspages ); @@ -299,7 +299,7 @@ class OC_APP{ * @returns associative array * * This function returns an array containing all admin pages added. The - * entries are sorted by the key "order" ascending. + * entries are sorted by the key 'order' ascending. */ public static function getAdminNavigation(){ $navigation = self::proceedNavigation( self::$adminpages ); @@ -313,38 +313,47 @@ class OC_APP{ $found = false; foreach( self::$subnavigation as $parent => $selection ){ foreach( $selection as $subentry ){ - if( $subentry["id"] == self::$activeapp ){ + if( $subentry['id'] == self::$activeapp ){ foreach( $list as &$naventry ){ - if( $naventry["id"] == $parent ){ - $naventry["active"] = true; - $naventry["subnavigation"] = $selection; + if( $naventry['id'] == $parent ){ + $naventry['active'] = true; + $naventry['subnavigation'] = $selection; } else{ - $naventry["active"] = false; + $naventry['active'] = false; } - } + } unset( $naventry ); $found = true; } } } + // Mark subentry as active + foreach( $list as &$naventry ){ + if( $naventry['active'] ){ + foreach( $naventry['subnavigation'] as &$subnaventry ){ + $subnaventry['active'] = $subnaventry['id'] == self::$activeapp? true : false; + } unset( $subnaventry ); + } + } unset( $naventry ); + return $list; } /// This is private as well. It simply works, so don't ask for more details private static function proceedNavigation( $list ){ foreach( $list as &$naventry ){ - $naventry["subnavigation"] = array(); - if( $naventry["id"] == self::$activeapp ){ - $naventry["active"] = true; - if( array_key_exists( $naventry["id"], self::$subnavigation )){ - $naventry["subnavigation"] = self::$subnavigation[$naventry["id"]]; + $naventry['subnavigation'] = array(); + if( $naventry['id'] == self::$activeapp ){ + $naventry['active'] = true; + if( array_key_exists( $naventry['id'], self::$subnavigation )){ + $naventry['subnavigation'] = self::$subnavigation[$naventry['id']]; } } else{ - $naventry["active"] = false; + $naventry['active'] = false; } - } + } unset( $naventry ); usort( $list, create_function( '$a, $b', 'if( $a["order"] == $b["order"] ){return 0;}elseif( $a["order"] < $b["order"] ){return -1;}else{return 1;}' )); diff --git a/templates/layout.admin.php b/templates/layout.admin.php index 66fb3ccc60b..1fcd4568f8c 100644 --- a/templates/layout.admin.php +++ b/templates/layout.admin.php @@ -32,7 +32,7 @@
  • class="active">
  • -
  • +
  • class="active">
  • @@ -41,7 +41,7 @@
  • class="active">
  • -
  • +
  • active
  • -- cgit v1.2.3 From 91c37bbb7642b996e4c386b3033cca02831371ef Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 20:29:30 +0200 Subject: moved core stuff to /core --- core/css/images/no.png | Bin 0 -> 1300 bytes .../ui-bg_diagonals-thick_90_eeeeee_40x40.png | Bin 0 -> 251 bytes core/css/images/ui-bg_flat_15_cd0a0a_40x100.png | Bin 0 -> 181 bytes core/css/images/ui-bg_glass_100_e4f1fb_1x400.png | Bin 0 -> 119 bytes core/css/images/ui-bg_glass_50_3baae3_1x400.png | Bin 0 -> 131 bytes core/css/images/ui-bg_glass_80_d7ebf9_1x400.png | Bin 0 -> 124 bytes .../ui-bg_highlight-hard_100_f2f5f7_1x100.png | Bin 0 -> 103 bytes .../ui-bg_highlight-hard_70_000000_1x100.png | Bin 0 -> 118 bytes .../ui-bg_highlight-soft_100_deedf7_1x100.png | Bin 0 -> 104 bytes .../ui-bg_highlight-soft_25_ffef8f_1x100.png | Bin 0 -> 153 bytes core/css/images/ui-icons_2694e8_256x240.png | Bin 0 -> 5355 bytes core/css/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes core/css/images/ui-icons_3d80b3_256x240.png | Bin 0 -> 5355 bytes core/css/images/ui-icons_72a7cf_256x240.png | Bin 0 -> 4369 bytes core/css/images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes core/css/jquery-ui-1.8.10.custom.css | 573 +++++++++++++++ core/css/styles.css | 278 ++++++++ core/img/actions/arrow-down.png | Bin 0 -> 525 bytes core/img/actions/arrow-left.png | Bin 0 -> 512 bytes core/img/actions/arrow-right.png | Bin 0 -> 527 bytes core/img/actions/arrow-up.png | Bin 0 -> 484 bytes core/img/actions/go-home.png | Bin 0 -> 397 bytes core/img/body_background.jpg | Bin 0 -> 305 bytes core/img/drop-arrow.png | Bin 0 -> 2899 bytes core/img/favicon-touch.png | Bin 0 -> 7272 bytes core/img/favicon.png | Bin 0 -> 565 bytes core/img/header-a.png | Bin 0 -> 2951 bytes core/img/header-login.png | Bin 0 -> 2402 bytes core/img/header-settings-a.png | Bin 0 -> 2885 bytes core/img/header-settings.png | Bin 0 -> 2887 bytes core/img/header.png | Bin 0 -> 2953 bytes core/img/layout/back.png | Bin 0 -> 396 bytes core/img/layout/logout.png | Bin 0 -> 657 bytes core/img/layout/settings.png | Bin 0 -> 695 bytes core/img/mimetypes/file.png | Bin 0 -> 391 bytes core/img/owncloud-logo-medium-white.png | Bin 0 -> 15478 bytes core/img/owncloud-logo-small-white.png | Bin 0 -> 5444 bytes core/img/places/folder.png | Bin 0 -> 386 bytes core/img/weather-clear.png | Bin 0 -> 21917 bytes core/js/jquery-1.5.min.js | 16 + core/js/jquery-ui-1.8.10.custom.min.js | 782 +++++++++++++++++++++ core/js/js.js | 23 + core/js/setup.js | 26 + core/l10n/de.php | 11 + core/l10n/de.po | 120 ++++ core/l10n/javascript.php | 34 + core/l10n/l10n-de.php | 5 + core/l10n/messages.pot | 120 ++++ core/l10n/nl.php | 27 + core/l10n/nl.po | 125 ++++ core/l10n/xgettextfiles | 7 + core/templates/404.php | 19 + core/templates/error.php | 17 + core/templates/installation.php | 70 ++ core/templates/layout.admin.php | 57 ++ core/templates/layout.guest.php | 22 + core/templates/layout.user.php | 42 ++ core/templates/login.php | 14 + core/templates/logout.php | 1 + core/templates/part.pagenavi.php | 31 + core/templates/part.searchbox.php | 4 + css/images/no.png | Bin 1300 -> 0 bytes .../ui-bg_diagonals-thick_90_eeeeee_40x40.png | Bin 251 -> 0 bytes css/images/ui-bg_flat_15_cd0a0a_40x100.png | Bin 181 -> 0 bytes css/images/ui-bg_glass_100_e4f1fb_1x400.png | Bin 119 -> 0 bytes css/images/ui-bg_glass_50_3baae3_1x400.png | Bin 131 -> 0 bytes css/images/ui-bg_glass_80_d7ebf9_1x400.png | Bin 124 -> 0 bytes .../ui-bg_highlight-hard_100_f2f5f7_1x100.png | Bin 103 -> 0 bytes .../ui-bg_highlight-hard_70_000000_1x100.png | Bin 118 -> 0 bytes .../ui-bg_highlight-soft_100_deedf7_1x100.png | Bin 104 -> 0 bytes .../ui-bg_highlight-soft_25_ffef8f_1x100.png | Bin 153 -> 0 bytes css/images/ui-icons_2694e8_256x240.png | Bin 5355 -> 0 bytes css/images/ui-icons_2e83ff_256x240.png | Bin 4369 -> 0 bytes css/images/ui-icons_3d80b3_256x240.png | Bin 5355 -> 0 bytes css/images/ui-icons_72a7cf_256x240.png | Bin 4369 -> 0 bytes css/images/ui-icons_ffffff_256x240.png | Bin 4369 -> 0 bytes css/jquery-ui-1.8.10.custom.css | 573 --------------- css/styles.css | 278 -------- files/css/files.css | 2 +- files/img/drop-arrow.png | Bin 0 -> 2899 bytes img/actions/arrow-down.png | Bin 525 -> 0 bytes img/actions/arrow-left.png | Bin 512 -> 0 bytes img/actions/arrow-right.png | Bin 527 -> 0 bytes img/actions/arrow-up.png | Bin 484 -> 0 bytes img/actions/go-home.png | Bin 397 -> 0 bytes img/body_background.jpg | Bin 305 -> 0 bytes img/drop-arrow.png | Bin 2899 -> 0 bytes img/favicon-touch.png | Bin 7272 -> 0 bytes img/favicon.png | Bin 565 -> 0 bytes img/header-a.png | Bin 2951 -> 0 bytes img/header-login.png | Bin 2402 -> 0 bytes img/header-settings-a.png | Bin 2885 -> 0 bytes img/header-settings.png | Bin 2887 -> 0 bytes img/header.png | Bin 2953 -> 0 bytes img/layout/back.png | Bin 396 -> 0 bytes img/layout/logout.png | Bin 657 -> 0 bytes img/layout/settings.png | Bin 695 -> 0 bytes img/mimetypes/file.png | Bin 391 -> 0 bytes img/owncloud-logo-medium-white.png | Bin 15478 -> 0 bytes img/owncloud-logo-small-white.png | Bin 5444 -> 0 bytes img/places/folder.png | Bin 386 -> 0 bytes img/weather-clear.png | Bin 21917 -> 0 bytes js/jquery-1.5.min.js | 16 - js/jquery-ui-1.8.10.custom.min.js | 782 --------------------- js/js.js | 23 - js/setup.js | 26 - l10n/de.php | 11 - l10n/de.po | 120 ---- l10n/javascript.php | 34 - l10n/l10n-de.php | 5 - l10n/messages.pot | 120 ---- l10n/nl.php | 27 - l10n/nl.po | 125 ---- l10n/xgettextfiles | 7 - lib/helper.php | 19 +- lib/template.php | 16 +- templates/404.php | 19 - templates/error.php | 17 - templates/installation.php | 70 -- templates/layout.admin.php | 57 -- templates/layout.guest.php | 22 - templates/layout.user.php | 42 -- templates/login.php | 14 - templates/logout.php | 1 - templates/part.pagenavi.php | 31 - templates/part.searchbox.php | 4 - 126 files changed, 2449 insertions(+), 2436 deletions(-) create mode 100644 core/css/images/no.png create mode 100644 core/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png create mode 100644 core/css/images/ui-bg_flat_15_cd0a0a_40x100.png create mode 100644 core/css/images/ui-bg_glass_100_e4f1fb_1x400.png create mode 100644 core/css/images/ui-bg_glass_50_3baae3_1x400.png create mode 100644 core/css/images/ui-bg_glass_80_d7ebf9_1x400.png create mode 100644 core/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png create mode 100644 core/css/images/ui-bg_highlight-hard_70_000000_1x100.png create mode 100644 core/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png create mode 100644 core/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png create mode 100644 core/css/images/ui-icons_2694e8_256x240.png create mode 100644 core/css/images/ui-icons_2e83ff_256x240.png create mode 100644 core/css/images/ui-icons_3d80b3_256x240.png create mode 100644 core/css/images/ui-icons_72a7cf_256x240.png create mode 100644 core/css/images/ui-icons_ffffff_256x240.png create mode 100644 core/css/jquery-ui-1.8.10.custom.css create mode 100644 core/css/styles.css create mode 100644 core/img/actions/arrow-down.png create mode 100644 core/img/actions/arrow-left.png create mode 100644 core/img/actions/arrow-right.png create mode 100644 core/img/actions/arrow-up.png create mode 100644 core/img/actions/go-home.png create mode 100644 core/img/body_background.jpg create mode 100644 core/img/drop-arrow.png create mode 100644 core/img/favicon-touch.png create mode 100644 core/img/favicon.png create mode 100644 core/img/header-a.png create mode 100644 core/img/header-login.png create mode 100644 core/img/header-settings-a.png create mode 100644 core/img/header-settings.png create mode 100644 core/img/header.png create mode 100644 core/img/layout/back.png create mode 100644 core/img/layout/logout.png create mode 100644 core/img/layout/settings.png create mode 100644 core/img/mimetypes/file.png create mode 100644 core/img/owncloud-logo-medium-white.png create mode 100644 core/img/owncloud-logo-small-white.png create mode 100644 core/img/places/folder.png create mode 100644 core/img/weather-clear.png create mode 100644 core/js/jquery-1.5.min.js create mode 100644 core/js/jquery-ui-1.8.10.custom.min.js create mode 100644 core/js/js.js create mode 100644 core/js/setup.js create mode 100644 core/l10n/de.php create mode 100644 core/l10n/de.po create mode 100644 core/l10n/javascript.php create mode 100644 core/l10n/l10n-de.php create mode 100644 core/l10n/messages.pot create mode 100644 core/l10n/nl.php create mode 100644 core/l10n/nl.po create mode 100644 core/l10n/xgettextfiles create mode 100644 core/templates/404.php create mode 100644 core/templates/error.php create mode 100644 core/templates/installation.php create mode 100644 core/templates/layout.admin.php create mode 100644 core/templates/layout.guest.php create mode 100644 core/templates/layout.user.php create mode 100644 core/templates/login.php create mode 100644 core/templates/logout.php create mode 100644 core/templates/part.pagenavi.php create mode 100644 core/templates/part.searchbox.php delete mode 100644 css/images/no.png delete mode 100644 css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png delete mode 100644 css/images/ui-bg_flat_15_cd0a0a_40x100.png delete mode 100644 css/images/ui-bg_glass_100_e4f1fb_1x400.png delete mode 100644 css/images/ui-bg_glass_50_3baae3_1x400.png delete mode 100644 css/images/ui-bg_glass_80_d7ebf9_1x400.png delete mode 100644 css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png delete mode 100644 css/images/ui-bg_highlight-hard_70_000000_1x100.png delete mode 100644 css/images/ui-bg_highlight-soft_100_deedf7_1x100.png delete mode 100644 css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png delete mode 100644 css/images/ui-icons_2694e8_256x240.png delete mode 100644 css/images/ui-icons_2e83ff_256x240.png delete mode 100644 css/images/ui-icons_3d80b3_256x240.png delete mode 100644 css/images/ui-icons_72a7cf_256x240.png delete mode 100644 css/images/ui-icons_ffffff_256x240.png delete mode 100644 css/jquery-ui-1.8.10.custom.css delete mode 100644 css/styles.css create mode 100644 files/img/drop-arrow.png delete mode 100644 img/actions/arrow-down.png delete mode 100644 img/actions/arrow-left.png delete mode 100644 img/actions/arrow-right.png delete mode 100644 img/actions/arrow-up.png delete mode 100644 img/actions/go-home.png delete mode 100644 img/body_background.jpg delete mode 100644 img/drop-arrow.png delete mode 100644 img/favicon-touch.png delete mode 100644 img/favicon.png delete mode 100644 img/header-a.png delete mode 100644 img/header-login.png delete mode 100644 img/header-settings-a.png delete mode 100644 img/header-settings.png delete mode 100644 img/header.png delete mode 100644 img/layout/back.png delete mode 100644 img/layout/logout.png delete mode 100644 img/layout/settings.png delete mode 100644 img/mimetypes/file.png delete mode 100644 img/owncloud-logo-medium-white.png delete mode 100644 img/owncloud-logo-small-white.png delete mode 100644 img/places/folder.png delete mode 100644 img/weather-clear.png delete mode 100644 js/jquery-1.5.min.js delete mode 100644 js/jquery-ui-1.8.10.custom.min.js delete mode 100644 js/js.js delete mode 100644 js/setup.js delete mode 100644 l10n/de.php delete mode 100644 l10n/de.po delete mode 100644 l10n/javascript.php delete mode 100644 l10n/l10n-de.php delete mode 100644 l10n/messages.pot delete mode 100644 l10n/nl.php delete mode 100644 l10n/nl.po delete mode 100644 l10n/xgettextfiles delete mode 100644 templates/404.php delete mode 100644 templates/error.php delete mode 100644 templates/installation.php delete mode 100644 templates/layout.admin.php delete mode 100644 templates/layout.guest.php delete mode 100644 templates/layout.user.php delete mode 100644 templates/login.php delete mode 100644 templates/logout.php delete mode 100644 templates/part.pagenavi.php delete mode 100644 templates/part.searchbox.php diff --git a/core/css/images/no.png b/core/css/images/no.png new file mode 100644 index 00000000000..fdc0f421255 Binary files /dev/null and b/core/css/images/no.png differ diff --git a/core/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png b/core/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png new file mode 100644 index 00000000000..6348115e6be Binary files /dev/null and b/core/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png differ diff --git a/core/css/images/ui-bg_flat_15_cd0a0a_40x100.png b/core/css/images/ui-bg_flat_15_cd0a0a_40x100.png new file mode 100644 index 00000000000..7680b5437cf Binary files /dev/null and b/core/css/images/ui-bg_flat_15_cd0a0a_40x100.png differ diff --git a/core/css/images/ui-bg_glass_100_e4f1fb_1x400.png b/core/css/images/ui-bg_glass_100_e4f1fb_1x400.png new file mode 100644 index 00000000000..705a32ea35d Binary files /dev/null and b/core/css/images/ui-bg_glass_100_e4f1fb_1x400.png differ diff --git a/core/css/images/ui-bg_glass_50_3baae3_1x400.png b/core/css/images/ui-bg_glass_50_3baae3_1x400.png new file mode 100644 index 00000000000..baabca6baaf Binary files /dev/null and b/core/css/images/ui-bg_glass_50_3baae3_1x400.png differ diff --git a/core/css/images/ui-bg_glass_80_d7ebf9_1x400.png b/core/css/images/ui-bg_glass_80_d7ebf9_1x400.png new file mode 100644 index 00000000000..d9387e9507e Binary files /dev/null and b/core/css/images/ui-bg_glass_80_d7ebf9_1x400.png differ diff --git a/core/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png b/core/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png new file mode 100644 index 00000000000..28b566c2c29 Binary files /dev/null and b/core/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png differ diff --git a/core/css/images/ui-bg_highlight-hard_70_000000_1x100.png b/core/css/images/ui-bg_highlight-hard_70_000000_1x100.png new file mode 100644 index 00000000000..d5882978043 Binary files /dev/null and b/core/css/images/ui-bg_highlight-hard_70_000000_1x100.png differ diff --git a/core/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png b/core/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png new file mode 100644 index 00000000000..2289d3c7d7b Binary files /dev/null and b/core/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png differ diff --git a/core/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png b/core/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png new file mode 100644 index 00000000000..54aff0cb974 Binary files /dev/null and b/core/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png differ diff --git a/core/css/images/ui-icons_2694e8_256x240.png b/core/css/images/ui-icons_2694e8_256x240.png new file mode 100644 index 00000000000..9d192c2f659 Binary files /dev/null and b/core/css/images/ui-icons_2694e8_256x240.png differ diff --git a/core/css/images/ui-icons_2e83ff_256x240.png b/core/css/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 00000000000..09d1cdc856c Binary files /dev/null and b/core/css/images/ui-icons_2e83ff_256x240.png differ diff --git a/core/css/images/ui-icons_3d80b3_256x240.png b/core/css/images/ui-icons_3d80b3_256x240.png new file mode 100644 index 00000000000..f13b206645b Binary files /dev/null and b/core/css/images/ui-icons_3d80b3_256x240.png differ diff --git a/core/css/images/ui-icons_72a7cf_256x240.png b/core/css/images/ui-icons_72a7cf_256x240.png new file mode 100644 index 00000000000..0d20b730833 Binary files /dev/null and b/core/css/images/ui-icons_72a7cf_256x240.png differ diff --git a/core/css/images/ui-icons_ffffff_256x240.png b/core/css/images/ui-icons_ffffff_256x240.png new file mode 100644 index 00000000000..42f8f992c72 Binary files /dev/null and b/core/css/images/ui-icons_ffffff_256x240.png differ diff --git a/core/css/jquery-ui-1.8.10.custom.css b/core/css/jquery-ui-1.8.10.custom.css new file mode 100644 index 00000000000..1f376ca99d3 --- /dev/null +++ b/core/css/jquery-ui-1.8.10.custom.css @@ -0,0 +1,573 @@ +/* + * jQuery UI CSS Framework 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; } +.ui-widget-content a { color: #362b36; } +.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_highlight-soft_100_deedf7_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } +.ui-widget-header a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_glass_80_d7ebf9_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_glass_100_e4f1fb_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; } +.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_glass_50_3baae3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; } +.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } +.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } +.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } +.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } +.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } +.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; } + +/* Overlays */ +.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); } +.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* + * jQuery UI Resizable 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* + * jQuery UI Selectable 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +/* + * jQuery UI Accordion 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } +/* + * jQuery UI Autocomplete 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.10 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +/* + * jQuery UI Button 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ +/* + * jQuery UI Dialog 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* + * jQuery UI Slider 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* + * jQuery UI Tabs 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } +/* + * jQuery UI Datepicker 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* + * jQuery UI Progressbar 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/core/css/styles.css b/core/css/styles.css new file mode 100644 index 00000000000..5027a6b6fe9 --- /dev/null +++ b/core/css/styles.css @@ -0,0 +1,278 @@ +* { margin:0; padding:0; border:0; } +body { background:#fefefe url('../img/body_background.jpg') repeat-y left top; font:normal 80%/1.6em "Lucida Grande", Arial, Verdana, sans-serif; color:#000; } +#header { position:fixed; top:0; z-index:100; width:100%; height:5.5em; padding:0.5em 1.5em; background:url('../img/header-a.png') repeat-x left top; } +#body-settings #header { background-image:url('../img/header-settings-a.png'); } +#owncloud { float:left; margin:0 0 0 2em; } +h1 { margin:1em 3em 1em 0; border-bottom:1px solid #666; text-transform:uppercase; font-weight:normal; font-style:italic; color:#666; } +p.center { text-align:center; } + +form { margin:2em 2em 2em 3em; } +form#quota { max-width:600px; } +form#user_settings { max-width:600px; } +form#user_settings p label { display:block; float:left; width:35%; padding:0.4em 0.5em 0 0; text-align:right; } +form p { padding:0.5em 4em 0.5em 0.5em; text-align:left; } +form p.form_footer { margin:1em 0 0 0; text-align:right; } +form label { cursor:pointer; } +form input { padding:0.2em; border:1px solid #ddd; font-size:1.2em; } +form input[type="submit"] { padding:0.1em 1em; border:1px solid #999; font-weight:bold; font-size:0.9em; cursor:pointer; } +form input[type="submit"]:hover, form input[type="submit"]:focus { border:1px solid #999; background-color:#999; outline:0; } +form input[type="submit"]:active { outline:0; } +fieldset { padding:1em; background-color:#f7f7f7; border:1px solid #ddd; } +legend { padding:0 0.5em; font-size:1.2em; } + +div.controls { width:91%; margin:1em 1em 1em 2em; padding:0.5em 0; background-color:#f7f7f7; border:1px solid #eee; } + +/* LOG IN & INSTALLATION ------------------------------------------------------------ */ +#body-login { width:100%; background-image:none; background-color:#ddd; } +#body-login p.info { width:16em; margin:4em auto; padding:1em; background-color:#eee; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; } + +#login +{ + margin: 0 auto 0 auto; + padding: 2em 0 0 0; + background-image: url(../img/header-login.png); + background-position: left 0; + background-repeat: repeat-x; + background-color: #EEE; + border-bottom: 1px solid #FFF; + text-align: center; +} + +#login_form +{ + width: 20em; + margin: 4em auto; + padding: 0; +} + +#login_form fieldset +{ + background-color: transparent; + border: 0; +} + +#login_form fieldset p +{ + margin: 0.5em 0 0 0; + padding: 0; + text-align: left; +} + +#login_form fieldset p.submit +{ + margin: 2em 0 0 0; + padding: 1em 0 0 0; + border-top: 1px solid #DDD; + text-align: right; +} + +#login_form label +{ + font-size: 1em; + color: #666; +} + +#login_form input +{ + width: 100%; + margin: 0 0 0.5em 0; + padding: 0.5em; + border: 1px solid #DDD; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + font-size: 1.5em; + color: #333; + text-align: center; +} + +#login_form input[type=submit] +{ + width: auto; + margin: 1em 0 0 0.5em; + text-align: center; + border: 1px solid #DDD; + background-color: #FFF; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + border-radius: 15px; + font-size: 1.5em +} + +#login_form input[type=submit]:hover +{ + border: 1px solid #666; + background-color: #666; + color: #FFF; +} + + +#setup_form { + margin: 3em auto; + text-align: left; + width: 720px; +} + +#setup_form #use_mysql { + font-size: 0.9em; + margin: 0 0 0 1em; +} + +#setup_form p.intro { + color: #666; + font-size: 1.3em; + margin: 4em 0 3em 0; + padding: 0; + text-align: center; +} + +#setup_form ul.errors { + background-image: url(images/no.png); + background-position: 1em 1em; + background-repeat: no-repeat; + background-color: #FED7D7; + border: 1px solid #F00; + font-size: 1.2em; + list-style-indent: inside; + margin: 0 0 4em 0; + padding: 1em 1em 1em 5em; +} + +#setup_form fieldset { + margin: 0 0 3em 0; +} + +#setup_form p { + line-height: 1.8em; +} + +#setup_form legend { + font-weight: normal; +} + +#setup_form label { + cursor: pointer; + display: block; + float: left; + margin: 0 0 0.2em 0; + text-align: right; + width: 40%; +} + +#setup_form input[type='text'], +#setup_form input[type='password'] { + font-size: 1em; + margin: 0 0 0 0.5em; + padding: 0.3em; +} + +#setup_form input[type='radio'] { + margin: 0 0 0 1em; +} + +#setup_form input[type='submit'] { + background-color: #DDD; + border: 1px solid #999; + color: #666; + font-size: 1.2em; +} + +#setup_form input[type='submit']:hover { + border-color: #000; + color: #000; +} + +#setup_form p.submit { + padding: 0 0 1em 0; + text-align: center; +} + + + +.prettybutton { margin:0.1em; padding:0.2em 0.5em; border:1px solid #ddd; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:1.5em; text-decoration:none; color:#666; background-color:#fff; } +.prettybutton:hover, .prettybutton:focus { background-color:#ccc; outline:0; } + +/* META NAVIGATION (Settings, Log out) ---------------------------------------------------------------- */ +#metanav { float:right; position:relative; top:1.5em; right:2.5em; list-style:none; margin:0; padding:0; } +#metanav li { display:inline; } +#metanav li a { margin:.1em; padding:1em; } +#metanav li a:hover, #metanav li a:focus { background:rgba(0,0,0,.5); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; outline:0; box-shadow:#555 0 1px 0; -moz-box-shadow:#555 0 1px 0; -webkit-box-shadow:#555 0 1px 0; } +#metanav li a img { vertical-align:middle; } + +/* NAVIGATION ------------------------------------------------------------- */ +#plugins { position:fixed; top:7em; float:left; width:15.7em; padding:0; } +#plugins ul { list-style-type:none; border-top:1px solid #ccc; } +#plugins a { display:block; padding:0.5em 0.5em 0.5em 3em; background-position:1.5em center; background-repeat:no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; } +#plugins a.active, #plugins a:hover, #plugins a:focus, #plugins a.selected { background-color:#ccc; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; outline:0; } +#plugins a:active { outline:0; } + +/* CONTENT ------------------------------------------------------------------ */ +#content { margin:7em 0 0 16em; } +table { margin:1em 5em 2em 3em; } +table tr.mouseOver td { background-color:#eee; } +table th, table td { padding:0; border-bottom:1px solid #ddd; text-align:left; font-style:italic; } +table th { padding:0.5em; } +table td { border-bottom:1px solid #eee; font-style:normal; } +table td.filesize, table td.date { width:5em; padding:0.5em 1em; text-align:right; } +table td.date { width:11em; } +table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; } +table td.filename a { display:block; background-image:url('../img/file.png'); text-decoration:none; } +table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:0.5em 0.5em 0.5em 3em; background-position:1em center; background-repeat:no-repeat; } +table td.filename a:hover, table td.filename a:focus { text-decoration:underline; outline:0; } +table td.filename a:active { outline:0; } +table em { font-weight:bold; } +table td.filename a.folder-up { background-image:url('../img/back.png'); font-style:italic; } +table td.filename a.folder { background-image:url('../img/folder.png'); } +table td.filename a.folder-home { background-image:url('../img/home.png'); } +table td.filename a.folder-music { background-image:url('../img/folder-music.png'); } +table td.filename a.folder-videos { background-image:url('../img/folder-video.png'); } +table td.filename a.folder-shared { background-image:url('../img/folder-shared.png'); } +table td.filename a.folder-images { background-image:url('../img/folder-image.png'); } +table td.filename a.file-txt { background-image:url('../img/file-txt.png'); } +table td.filename a.file-python { background-image:url('../img/file-python.png'); } +table td.filename a.file-php { background-image:url('../img/file.png'); } +table td.login { background-image:url('../img/login.png'); } +table td.logout { background-image:url('../img/logout.png'); } +table td.download { background-image:url('../img/download.png'); } +table td.upload { background-image:url('../img/upload.png'); } +table td.create { background-image:url('../img/folder-new.png'); } +table td.delete { background-image:url('../img/delete.png'); } +#fileList tr input[type=checkbox] { display:none; } +#fileList tr input[type=checkbox]:checked { display:inline; } +#fileList tr:hover input[type=checkbox] { display:inline; } + +/* NAVIGATION BAR */ +p.nav { margin:1em 0 0 2em; padding:0.8em; line-height:16px; font-weight:bold; } +p.nav a { padding:0.5em 1.5em 0.5em 0.5em; background-position:right center; background-repeat:no-repeat; background-image:url('../img/arrow.png'); text-decoration:none; } +p.nav a img { height:16px; vertical-align:text-top; } + +/* ACTIONS BAR */ +p.actions, div.actions { padding:0; } +p.actions a, div.actions a { padding:0.5em 0.5em 0.5em 3em; background-position:1em center; background-repeat:no-repeat; background-image:url('../img/action.png'); border-right:1px solid #eee; text-decoration:none; color:#333; } +p.actions a:hover, p.actions a:focus, div.actions a:hover, div.actions a:focus { background-color:#eee; color:#000; outline:0; } +p.actions a:active, div.actions a:active { outline:0; } +p.actions a.new-dir, div.actions a.new-dir { background-image:url('../img/folder-new.png'); } +p.actions a.download, div.actions a.download { background-image:url('../img/download.png'); } +p.actions a.delete, div.actions a.delete { background-image:url('../img/delete.png'); } + +/* USER SETTINGS ------------------------------------------------------------ */ +#quota_indicator { margin:0 4em 1em 0; padding:0; border:1px solid #ddd; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; } +#quota_indicator div { background-color:#76A9EA; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; } + +/* PAGER ------------------------------------------------------------ */ +.pager tr td { border-bottom:0px; } +.pager tr td a { text-decoration:none; color:#666666; font-size:0.9em; text-align:center; } + +/* LOGS --------------------------------------------------------------------- */ +#logs_options { width:auto; margin:0; } +#logs_options p { padding:0.5em; text-align:left; } +#logs_options span { margin:0 2em 0 0.5em; font-weight:bold; } +#logs_options label { margin:0 1em 0 0; } +#logs_options input[type="submit"] { float:right; margin:0 2em 0 0; } +#logs_options input[type="submit"].nofloat { float:none; margin:0 2em 0 0; } +#logs_options input[type="text"] { margin:0; padding:0; border:1px solid #ccc; text-align:right; } +li.error{ list-style:none; width:640px; margin:4em auto; padding:1em 1em 1em 4em; background-color:#fee; background-image:url('../img/task-attention.png'); background-position:0.8em 0.8em; background-repeat:no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; } + +/* SEARCH --------------------------------------------------------------------- */ +form.searchbox{display:inline; position:fixed; top:1.5em; right:9em; margin:0; padding:0;}; +form.searchbox .prettybutton{font-size:1.5em !important}; \ No newline at end of file diff --git a/core/img/actions/arrow-down.png b/core/img/actions/arrow-down.png new file mode 100644 index 00000000000..03f201428ad Binary files /dev/null and b/core/img/actions/arrow-down.png differ diff --git a/core/img/actions/arrow-left.png b/core/img/actions/arrow-left.png new file mode 100644 index 00000000000..b56cfee03df Binary files /dev/null and b/core/img/actions/arrow-left.png differ diff --git a/core/img/actions/arrow-right.png b/core/img/actions/arrow-right.png new file mode 100644 index 00000000000..0acee70bcdd Binary files /dev/null and b/core/img/actions/arrow-right.png differ diff --git a/core/img/actions/arrow-up.png b/core/img/actions/arrow-up.png new file mode 100644 index 00000000000..5e423213fbd Binary files /dev/null and b/core/img/actions/arrow-up.png differ diff --git a/core/img/actions/go-home.png b/core/img/actions/go-home.png new file mode 100644 index 00000000000..3802c98fc46 Binary files /dev/null and b/core/img/actions/go-home.png differ diff --git a/core/img/body_background.jpg b/core/img/body_background.jpg new file mode 100644 index 00000000000..c3d0102f711 Binary files /dev/null and b/core/img/body_background.jpg differ diff --git a/core/img/drop-arrow.png b/core/img/drop-arrow.png new file mode 100644 index 00000000000..315395d5d42 Binary files /dev/null and b/core/img/drop-arrow.png differ diff --git a/core/img/favicon-touch.png b/core/img/favicon-touch.png new file mode 100644 index 00000000000..20af826523c Binary files /dev/null and b/core/img/favicon-touch.png differ diff --git a/core/img/favicon.png b/core/img/favicon.png new file mode 100644 index 00000000000..a7ee766dfa8 Binary files /dev/null and b/core/img/favicon.png differ diff --git a/core/img/header-a.png b/core/img/header-a.png new file mode 100644 index 00000000000..46fb0977ee2 Binary files /dev/null and b/core/img/header-a.png differ diff --git a/core/img/header-login.png b/core/img/header-login.png new file mode 100644 index 00000000000..b0160e02d1f Binary files /dev/null and b/core/img/header-login.png differ diff --git a/core/img/header-settings-a.png b/core/img/header-settings-a.png new file mode 100644 index 00000000000..a72271be6a4 Binary files /dev/null and b/core/img/header-settings-a.png differ diff --git a/core/img/header-settings.png b/core/img/header-settings.png new file mode 100644 index 00000000000..7e6b70b5903 Binary files /dev/null and b/core/img/header-settings.png differ diff --git a/core/img/header.png b/core/img/header.png new file mode 100644 index 00000000000..d377f65186d Binary files /dev/null and b/core/img/header.png differ diff --git a/core/img/layout/back.png b/core/img/layout/back.png new file mode 100644 index 00000000000..86abbe0cabe Binary files /dev/null and b/core/img/layout/back.png differ diff --git a/core/img/layout/logout.png b/core/img/layout/logout.png new file mode 100644 index 00000000000..74dcd33bee7 Binary files /dev/null and b/core/img/layout/logout.png differ diff --git a/core/img/layout/settings.png b/core/img/layout/settings.png new file mode 100644 index 00000000000..ff650ecb0b0 Binary files /dev/null and b/core/img/layout/settings.png differ diff --git a/core/img/mimetypes/file.png b/core/img/mimetypes/file.png new file mode 100644 index 00000000000..49790448897 Binary files /dev/null and b/core/img/mimetypes/file.png differ diff --git a/core/img/owncloud-logo-medium-white.png b/core/img/owncloud-logo-medium-white.png new file mode 100644 index 00000000000..d4d06fdd62d Binary files /dev/null and b/core/img/owncloud-logo-medium-white.png differ diff --git a/core/img/owncloud-logo-small-white.png b/core/img/owncloud-logo-small-white.png new file mode 100644 index 00000000000..397ddf91341 Binary files /dev/null and b/core/img/owncloud-logo-small-white.png differ diff --git a/core/img/places/folder.png b/core/img/places/folder.png new file mode 100644 index 00000000000..3edbe257a34 Binary files /dev/null and b/core/img/places/folder.png differ diff --git a/core/img/weather-clear.png b/core/img/weather-clear.png new file mode 100644 index 00000000000..0acf7a9b2af Binary files /dev/null and b/core/img/weather-clear.png differ diff --git a/core/js/jquery-1.5.min.js b/core/js/jquery-1.5.min.js new file mode 100644 index 00000000000..9144b8ae98c --- /dev/null +++ b/core/js/jquery-1.5.min.js @@ -0,0 +1,16 @@ +/*! + * jQuery JavaScript Library v1.5 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Jan 31 08:31:29 2011 -0500 + */ +(function(a,b){function b$(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function bX(a){if(!bR[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bR[a]=c}return bR[a]}function bW(a,b){var c={};d.each(bV.concat.apply([],bV.slice(0,b)),function(){c[this]=a});return c}function bJ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f=a.converters,g,h=e.length,i,j=e[0],k,l,m,n,o;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(q,"`").replace(r,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,p,q=[],r=[],s=d._data(this,u);typeof s==="function"&&(s=s.events);if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,p=f.handleObj.origHandler.apply(f.elem,arguments);if(p===!1||a.isPropagationStopped()){c=f.level,p===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,b,c){c[0].type=a;return d.event.handle.apply(b,c)}function w(){return!0}function v(){return!1}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");e.type="text/javascript",d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?(g=Array(c),d.each(b,function(a,b){d.when(b).then(function(b){g[a]=arguments.length>1?E.call(arguments,0):b,--c||e.resolveWith(f,g)},e.reject)})):e!==a&&e.resolve(a);return f},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return a.jQuery=a.$=d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="
    a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option"));if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:b.getElementsByTagName("input")[0].value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,_scriptEval:null,noCloneEvent:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},g.disabled=!0,d.support.optDisabled=!h.disabled,d.support.scriptEval=function(){if(d.support._scriptEval===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();e.type="text/javascript";try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(d.support._scriptEval=!0,delete a[f]):d.support._scriptEval=!1,b.removeChild(e),b=e=f=null}return d.support._scriptEval};try{delete b.test}catch(i){d.support.deleteExpando=!1}b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function j(){d.support.noCloneEvent=!1,b.detachEvent("onclick",j)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var k=c.createDocumentFragment();k.appendChild(b.firstChild),d.support.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
    ",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
    t
    ";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var l=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=l("submit"),d.support.changeBubbles=l("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!d.isEmptyObject(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={}),typeof c==="object"&&(f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c)),i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,i=g?b[d.expando]:d.expando;if(!h[i])return;if(c){var j=e?h[i][f]:h[i];if(j){delete j[c];if(!d.isEmptyObject(j))return}}if(e){delete h[i][f];if(!d.isEmptyObject(h[i]))return}var k=h[i][f];d.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},h[i][f]=k):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,j=c.type==="select-one";if(f<0)return null;for(var k=j?f:0,l=j?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=j.test(c);if(c==="selected"&&!d.support.optSelected){var n=a.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&k.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:l.test(a.nodeName)||m.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var o=/\.(.*)$/,p=/^(?:textarea|input|select)$/i,q=/\./g,r=/ /g,s=/[^\w\s.|`]/g,t=function(a){return a.replace(s,"\\$&")},u="events";d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a);if(f===!1)f=v;else if(!f)return;var h,i;f.handler&&(h=f,f=h.handler),f.guid||(f.guid=d.guid++);var j=d._data(c);if(!j)return;var k=j[u],l=j.handle;typeof k==="function"?(l=k.handle,k=k.events):k||(c.nodeType||(j[u]=j=function(){}),j.events=k={}),l||(j.handle=l=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(l.elem,arguments):b}),l.elem=c,e=e.split(" ");var m,n=0,o;while(m=e[n++]){i=h?d.extend({},h):{handler:f,data:g},m.indexOf(".")>-1?(o=m.split("."),m=o.shift(),i.namespace=o.slice(0).sort().join(".")):(o=[],i.namespace=""),i.type=m,i.guid||(i.guid=f.guid);var p=k[m],q=d.event.special[m]||{};if(!p){p=k[m]=[];if(!q.setup||q.setup.call(c,g,o,l)===!1)c.addEventListener?c.addEventListener(m,l,!1):c.attachEvent&&c.attachEvent("on"+m,l)}q.add&&(q.add.call(c,i),i.handler.guid||(i.handler.guid=f.guid)),p.push(i),d.event.global[m]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),w=s&&s[u];if(!s||!w)return;typeof w==="function"&&(s=w,w=w.events),c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in w)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),t).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=w[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=e.nodeType?d._data(e,"handle"):(d._data(e,u)||{}).handle;h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(o,""),n=d.nodeName(l,"a")&&m==="click",p=d.event.special[m]||{};if((!p._default||p._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,u),typeof i==="function"&&(i=i.events),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(p.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f){a.type="change",a.liveFired=b;return d.event.trigger(a,arguments[1],c)}}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;if(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")return B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")return B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return p.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return p.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function s(a,b,c,d,e,f){for(var g=0,h=d.length;g0){k=j;break}}j=j[a]}d[g]=k}}}function r(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0;[0,0].sort(function(){h=!1;return 0});var i=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var l,m,o,p,q,r,s,u,v=!0,w=i.isXML(d),x=[],y=b;do{a.exec(""),l=a.exec(y);if(l){y=l[3],x.push(l[1]);if(l[2]){p=l[3];break}}}while(l);if(x.length>1&&k.exec(b))if(x.length===2&&j.relative[x[0]])m=t(x[0]+x[1],d);else{m=j.relative[x[0]]?[d]:i(x.shift(),d);while(x.length)b=x.shift(),j.relative[b]&&(b+=x.shift()),m=t(b,m)}else{!g&&x.length>1&&d.nodeType===9&&!w&&j.match.ID.test(x[0])&&!j.match.ID.test(x[x.length-1])&&(q=i.find(x.shift(),d,w),d=q.expr?i.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:n(g)}:i.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),m=q.expr?i.filter(q.expr,q.set):q.set,x.length>0?o=n(m):v=!1;while(x.length)r=x.pop(),s=r,j.relative[r]?s=x.pop():r="",s==null&&(s=d),j.relative[r](o,s,w)}else o=x=[]}o||(o=m),o||i.error(r||b);if(f.call(o)==="[object Array]")if(v)if(d&&d.nodeType===1)for(u=0;o[u]!=null;u++)o[u]&&(o[u]===!0||o[u].nodeType===1&&i.contains(d,o[u]))&&e.push(m[u]);else for(u=0;o[u]!=null;u++)o[u]&&o[u].nodeType===1&&e.push(m[u]);else e.push.apply(e,o);else n(o,e);p&&(i(p,h,e,g),i.uniqueSort(e));return e};i.uniqueSort=function(a){if(p){g=h,a.sort(p);if(g)for(var b=1;b0},i.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=j.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!/\W/.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||i.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&i.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(/\\/g,"");!f&&j.attrMap[g]&&(a[1]=j.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(/\\/g,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=i(b[3],null,null,c);else{var g=i.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(j.match.POS.test(b[0])||j.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!i(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=j.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||i.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,k=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=j.attrHandle[c]?j.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=j.setFilters[e];if(f)return f(a,c,b,d)}}},k=j.match.POS,l=function(a,b){return"\\"+(b-0+1)};for(var m in j.match)j.match[m]=new RegExp(j.match[m].source+/(?![^\[]*\])(?![^\(]*\))/.source),j.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+j.match[m].source.replace(/\\(\d+)/g,l));var n=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(o){n=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(j.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},j.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(j.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(j.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=i,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){i=function(b,e,f,g){e=e||c;if(!g&&!i.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return n(e.getElementsByTagName(b),f);if(h[2]&&j.find.CLASS&&e.getElementsByClassName)return n(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return n([e.body],f);if(h&&h[3]){var k=e.getElementById(h[3]);if(!k||!k.parentNode)return n([],f);if(k.id===h[3])return n([k],f)}try{return n(e.querySelectorAll(b),f)}catch(l){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return n(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(r){}finally{m||e.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)i[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(i.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!i.isXML(a))try{if(d||!j.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return i(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;j.order.splice(1,0,"CLASS"),j.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?i.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?i.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains=function(){return!1},i.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var t=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=j.match.PSEUDO.exec(a))e+=c[0],a=a.replace(j.match.PSEUDO,"");a=j.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div
    ","
    "]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!0:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if(!d.support.noCloneEvent&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");for(h=0;f[h];++h)$(f[h],g[h]);$(a,e)}if(b){Z(a,e);if(c&&"getElementsByTagName"in a){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");if(f.length)for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var ba=/alpha\([^)]*\)/i,bb=/opacity=([^)]*)/,bc=/-([a-z])/ig,bd=/([A-Z])/g,be=/^-?\d+(?:px)?$/i,bf=/^-?\d/,bg={position:"absolute",visibility:"hidden",display:"block"},bh=["Left","Right"],bi=["Top","Bottom"],bj,bk,bl,bm=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bj(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bj)return bj(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bc,bm)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bn(a,b,e):d.swap(a,bg,function(){f=bn(a,b,e)});if(f<=0){f=bj(a,b,b),f==="0px"&&bl&&(f=bl(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!be.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=ba.test(f)?f.replace(ba,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bk=function(a,c,e){var f,g,h;e=e.replace(bd,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bl=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!be.test(d)&&bf.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bj=bk||bl,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bo=/%20/g,bp=/\[\]$/,bq=/\r?\n/g,br=/#.*$/,bs=/^(.*?):\s*(.*?)\r?$/mg,bt=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bu=/^(?:GET|HEAD)$/,bv=/^\/\//,bw=/\?/,bx=/)<[^<]*)*<\/script>/gi,by=/^(?:select|textarea)/i,bz=/\s+/,bA=/([?&])_=[^&]*/,bB=/^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,bC=d.fn.load,bD={},bE={};d.fn.extend({load:function(a,b,c){if(typeof a!=="string"&&bC)return bC.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}var g="GET";b&&(d.isFunction(b)?(c=b,b=null):typeof b==="object"&&(b=d.param(b,d.ajaxSettings.traditional),g="POST"));var h=this;d.ajax({url:a,type:g,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText,a.isResolved()&&(a.done(function(a){e=a}),h.html(f?d("
    ").append(e.replace(bx,"")).find(f):e)),c&&h.each(c,[e,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||by.test(this.nodeName)||bt.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bq,"\r\n")}}):{name:b.name,value:c.replace(bq,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,b){d[b]=function(a,c,e,f){d.isFunction(c)&&(f=f||e,e=c,c=null);return d.ajax({type:b,url:a,data:c,success:e,dataType:f})}}),d.extend({getScript:function(a,b){return d.get(a,null,b,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a){d.extend(!0,d.ajaxSettings,a),a.context&&(d.ajaxSettings.context=a.context)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bF(bD),ajaxTransport:bF(bE),ajax:function(a,e){function w(a,c,e,l){if(t!==2){t=2,p&&clearTimeout(p),o=b,m=l||"",v.readyState=a?4:0;var n,q,r,s=e?bI(f,v,e):b,u,w;if(a>=200&&a<300||a===304){if(f.ifModified){if(u=v.getResponseHeader("Last-Modified"))d.lastModified[f.url]=u;if(w=v.getResponseHeader("Etag"))d.etag[f.url]=w}if(a===304)c="notmodified",n=!0;else try{q=bJ(f,s),c="success",n=!0}catch(x){c="parsererror",r=x}}else r=c,a&&(c="error",a<0&&(a=0));v.status=a,v.statusText=c,n?i.resolveWith(g,[q,c,v]):i.rejectWith(g,[v,c,r]),v.statusCode(k),k=b,f.global&&h.trigger("ajax"+(n?"Success":"Error"),[v,f,n?q:r]),j.resolveWith(g,[v,c]),f.global&&(h.trigger("ajaxComplete",[v,f]),--d.active||d.event.trigger("ajaxStop"))}}typeof e!=="object"&&(e=a,a=b),e=e||{};var f=d.extend(!0,{},d.ajaxSettings,e),g=(f.context=("context"in e?e:d.ajaxSettings).context)||f,h=g===f?d.event:d(g),i=d.Deferred(),j=d._Deferred(),k=f.statusCode||{},l={},m,n,o,p,q=c.location,r=q.protocol||"http:",s,t=0,u,v={readyState:0,setRequestHeader:function(a,b){t===0&&(l[a.toLowerCase()]=b);return this},getAllResponseHeaders:function(){return t===2?m:null},getResponseHeader:function(a){var b;if(t===2){if(!n){n={};while(b=bs.exec(m))n[b[1].toLowerCase()]=b[2]}b=n[a.toLowerCase()]}return b||null},abort:function(a){a=a||"abort",o&&o.abort(a),w(0,a);return this}};i.promise(v),v.success=v.done,v.error=v.fail,v.complete=j.done,v.statusCode=function(a){if(a){var b;if(t<2)for(b in a)k[b]=[k[b],a[b]];else b=a[v.status],v.then(b,b)}return this},f.url=(""+(a||f.url)).replace(br,"").replace(bv,r+"//"),f.dataTypes=d.trim(f.dataType||"*").toLowerCase().split(bz),f.crossDomain||(s=bB.exec(f.url.toLowerCase()),f.crossDomain=s&&(s[1]!=r||s[2]!=q.hostname||(s[3]||(s[1]==="http:"?80:443))!=(q.port||(r==="http:"?80:443)))),f.data&&f.processData&&typeof f.data!=="string"&&(f.data=d.param(f.data,f.traditional)),bG(bD,f,e,v),f.type=f.type.toUpperCase(),f.hasContent=!bu.test(f.type),f.global&&d.active++===0&&d.event.trigger("ajaxStart");if(!f.hasContent){f.data&&(f.url+=(bw.test(f.url)?"&":"?")+f.data);if(f.cache===!1){var x=d.now(),y=f.url.replace(bA,"$1_="+x);f.url=y+(y===f.url?(bw.test(f.url)?"&":"?")+"_="+x:"")}}if(f.data&&f.hasContent&&f.contentType!==!1||e.contentType)l["content-type"]=f.contentType;f.ifModified&&(d.lastModified[f.url]&&(l["if-modified-since"]=d.lastModified[f.url]),d.etag[f.url]&&(l["if-none-match"]=d.etag[f.url])),l.accept=f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", */*; q=0.01":""):f.accepts["*"];for(u in f.headers)l[u.toLowerCase()]=f.headers[u];if(!f.beforeSend||f.beforeSend.call(g,v,f)!==!1&&t!==2){for(u in {success:1,error:1,complete:1})v[u](f[u]);o=bG(bE,f,e,v);if(o){t=v.readyState=1,f.global&&h.trigger("ajaxSend",[v,f]),f.async&&f.timeout>0&&(p=setTimeout(function(){v.abort("timeout")},f.timeout));try{o.send(l,w)}catch(z){status<2?w(-1,z):d.error(z)}}else w(-1,"No Transport")}else w(0,"abort"),v=!1;return v},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery)d.each(a,function(){f(this.name,this.value)});else for(var g in a)bH(g,a[g],c,f);return e.join("&").replace(bo,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bK=d.now(),bL=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bK++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){e=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bL.test(b.url)||e&&bL.test(b.data))){var f,g=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[g],i=b.url,j=b.data,k="$1"+g+"$2";b.jsonp!==!1&&(i=i.replace(bL,k),b.url===i&&(e&&(j=j.replace(bL,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+g))),b.url=i,b.data=j,a[g]=function(a){f=[a]},b.complete=[function(){a[g]=h;if(h)f&&d.isFunction(h)&&a[g](f[0]);else try{delete a[g]}catch(b){}},b.complete],b.converters["script json"]=function(){f||d.error(g+" was not called");return f[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript"},contents:{script:/javascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bM=d.now(),bN={},bO,bP;d.ajaxSettings.xhr=a.ActiveXObject?function(){if(a.location.protocol!=="file:")try{return new a.XMLHttpRequest}catch(b){}try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}:function(){return new a.XMLHttpRequest};try{bP=d.ajaxSettings.xhr()}catch(bQ){}d.support.ajax=!!bP,d.support.cors=bP&&"withCredentials"in bP,bP=b,d.support.ajax&&d.ajaxTransport(function(b){if(!b.crossDomain||d.support.cors){var c;return{send:function(e,f){bO||(bO=1,d(a).bind("unload",function(){d.each(bN,function(a,b){b.onreadystatechange&&b.onreadystatechange(1)})}));var g=b.xhr(),h;b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async),(!b.crossDomain||b.hasContent)&&!e["x-requested-with"]&&(e["x-requested-with"]="XMLHttpRequest");try{d.each(e,function(a,b){g.setRequestHeader(a,b)})}catch(i){}g.send(b.hasContent&&b.data||null),c=function(a,e){if(c&&(e||g.readyState===4)){c=0,h&&(g.onreadystatechange=d.noop,delete bN[h]);if(e)g.readyState!==4&&g.abort();else{var i=g.status,j,k=g.getAllResponseHeaders(),l={},m=g.responseXML;m&&m.documentElement&&(l.xml=m),l.text=g.responseText;try{j=g.statusText}catch(n){j=""}i=i===0?!b.crossDomain||j?k?304:0:302:i==1223?204:i,f(i,j,l,k)}}},b.async&&g.readyState!==4?(h=bM++,bN[h]=g,g.onreadystatechange=c):c()},abort:function(){c&&c(0,1)}}}});var bR={},bS=/^(?:toggle|show|hide)$/,bT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,bU,bV=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(bW("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:bW("show",1),slideUp:bW("hide",1),slideToggle:bW("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(d.css(this.elem,this.prop));return a||0},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||"px",this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!bU&&(bU=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
    ";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=bZ.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!bZ.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=b$(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=b$(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}})})(window); diff --git a/core/js/jquery-ui-1.8.10.custom.min.js b/core/js/jquery-ui-1.8.10.custom.min.js new file mode 100644 index 00000000000..7d4ff1cec10 --- /dev/null +++ b/core/js/jquery-ui-1.8.10.custom.min.js @@ -0,0 +1,782 @@ +/*! + * jQuery UI 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.10",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106, +NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this, +"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position"); +if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f, +"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h, +d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}}); +c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a); +return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent", +true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Position 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Position + */ +(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, +left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= +k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= +m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= +d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= +a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), +g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); +;/* + * jQuery UI Draggable 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= +this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top- +this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions(); +d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis|| +this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&& +this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== +a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]|| +0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0], +this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top- +(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment== +"parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"? +0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"), +10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor== +Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop(): +f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY; +if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.leftthis.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/ +b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?e:!(e-this.offset.click.left
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})}, +stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!= +document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e=j&&f<=l||h>=j&&h<=l||fl)&&(e>= +i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), +top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= +this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", +nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== +String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); +this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}; +if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(), +d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset= +this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio: +this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize", +b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height; +f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing"); +this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top= +null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidthb.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+ +this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b, +a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a, +c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize, +originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.10"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize= +b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width", +"height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})}; +if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height- +g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width, +height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d= +e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options, +d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper? +d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height= +a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&& +/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable"); +b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/ +(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery); +;/* + * jQuery UI Selectable 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), +selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("
    ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, +c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting", +c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= +this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.righti||a.bottomb&&a.rightg&&a.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable"); +this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this, +arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem= +c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset, +{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment(); +if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start", +a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute"); +if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a, +c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]== +document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length- +1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null}); +this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&& +a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h= +d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)}); +return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g= +d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top= +e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; +if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder); +c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length=== +1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top< +this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0], +this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out", +g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); +a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); +if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", +function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=this.options;if(a.icons){c("").addClass("ui-icon "+ +a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex"); +this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); +b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target); +a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ +c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options; +if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); +if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(), +e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight|| +e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false", +tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.10",animations:{slide:function(a,b){a= +c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);f[i]={value:j[1], +unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",paddingTop:"hide", +paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery); +;/* + * jQuery UI Autocomplete 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.position.js + */ +(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g=false;var f=d.ui.keyCode; +switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=a.element.val()){a.selectedItem= +null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=d("
      ").addClass("ui-autocomplete").appendTo(d(this.options.appendTo|| +"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"), +i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"); +this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source=== +"string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b); +else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); +(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.attr("scrollTop"),c=this.element.height();if(b<0)this.element.attr("scrollTop",g+b);else b>=c&&this.element.attr("scrollTop",g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})}, +deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0); +e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e, +g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first")); +this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,f=d.primary&&d.secondary,e=[];if(d.primary||d.secondary){e.push("ui-button-text-icon"+(f?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("");d.secondary&&b.append("");if(!this.options.text){e.push(f?"ui-button-icons-only":"ui-button-icon-only"); +b.removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");this.hasTitle||b.attr("title",c)}}else e.push("ui-button-text-only");b.addClass(e.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this, +arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); +a.Widget.prototype.destroy.call(this)}})})(jQuery); +;/* + * jQuery UI Dialog 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + * jquery.ui.draggable.js + * jquery.ui.mouse.js + * jquery.ui.position.js + * jquery.ui.resizable.js + */ +(function(c,j){var k={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},l={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&& +c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
      ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex", +-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
      ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", +"button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose= +b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&& +a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0]){e=c(this).css("z-index"); +isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ); +d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===f[0]&&e.shiftKey){g.focus(1);return false}}}); +c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
      ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(f, +h){h=c.isFunction(h)?{click:h,text:f}:h;f=c('').attr(h,true).unbind("click").click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&f.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g= +d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize, +position:f.position,size:f.size}}a=a===j?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f, +h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length=== +1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);if(g in k)e=true;if(g in +l)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled"); +break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=this.options,b,d,e= +this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-b,0));this.uiDialog.is(":data(resizable)")&& +this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.10",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length=== +0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(), +height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight); +b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("
      ");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("").appendTo(this.element).addClass("ui-slider-handle"); +if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur(); +else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e= +false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h=== +b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); +this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b, +g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true}, +_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a; +if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value= +this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max}, +_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate); +if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1, +1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.10"})})(jQuery); +;/* + * jQuery UI Tabs 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
      ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
    • #{label}
    • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& +e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= +d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| +(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ +g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", +function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; +this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= +-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= +d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, +e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); +j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); +if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, +this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, +load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, +"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, +url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.10"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k')}function E(a,b){d.extend(a,b);for(var c in b)if(b[c]== +null||b[c]==G)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.10"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase(); +f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('
      ')}}, +_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&& +b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f== +""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a, +c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b), +true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{}); +b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass); +this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup", +this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs, +function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null: +f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true}, +_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos= +d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b, +c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&& +d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout", +function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!= +-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a, +"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))), +parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left, +b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b); +this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, +_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"): +0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear= +false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay= +d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a); +else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b= +a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort, +g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l)throw"Invalid date";return w},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y", +RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+112?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay= +a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(), +b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n= +this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+r+"":f?"":''+r+"";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
      '+(c?h:"")+(this._isInRange(a,r)?'":"")+(c?"":h)+"
      ":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z= +this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",C=0;C1)switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]- +1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='
      '+(/all|left/.test(t)&&C==0?c?f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,C>0||D>0,z,w)+'
      ';var A=j?'":"";for(t=0;t<7;t++){var q= +(t+h)%7;A+="=5?' class="ui-datepicker-week-end"':"")+'>'+s[q]+""}x+=A+"";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,A);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O";var P=!j?"":'";for(t=0;t<7;t++){var F= +p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,J=B&&!H||!F[0]||k&&qo;P+='";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+= +P+""}g++;if(g>11){g=0;m++}x+="
      '+this._get(a,"weekHeader")+"
      '+this._get(a,"calculateWeek")(q)+""+(B&&!v?" ":J?''+q.getDate()+"":''+q.getDate()+"")+"
      "+(l?""+(i[0]>0&&D==i[1]-1?'
      ':""):"");M+=x}I+=M}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
      ', +o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&& +l)?" ":""));a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";if(d.browser.mozilla)k+='";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
      ";return k},_adjustInstDate:function(a,b,c){var e= +a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a, +"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a); +c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a, +"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker= +function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker, +[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.10";window["DP_jQuery_"+y]=d})(jQuery); +;/* + * jQuery UI Progressbar 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
      ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery); +;/* + * jQuery UI Effects 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0]; +h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c, +a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.10",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent", +border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c); +return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments); +else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c), +b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c, +a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c, +a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a== +e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ +e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); +;/* + * jQuery UI Effects Fade 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Fold 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], +10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); +;/* + * jQuery UI Effects Highlight 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Pulsate 1.8.10 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); +b.dequeue()})})}})(jQuery); +; \ No newline at end of file diff --git a/core/js/js.js b/core/js/js.js new file mode 100644 index 00000000000..7e44b7ce6d5 --- /dev/null +++ b/core/js/js.js @@ -0,0 +1,23 @@ +var _l10ncache = {}; +function t(app,text){ + if( !( app in _l10ncache )){ + $.post( oc_webroot+'/l10n/javascript.php', {'app': app}, function(jsondata){ + _l10ncache[app] = jsondata.data; + }); + + // Bad answer ... + if( !( app in _l10ncache )){ + _l10ncache[app] = []; + } + } + if( typeof( _l10ncache[app][text] ) !== 'undefined' ){ + return _l10ncache[app][text]; + } + else{ + return text; + } +} + +$(document).ready(function(){ + // Put fancy stuff in here +}); diff --git a/core/js/setup.js b/core/js/setup.js new file mode 100644 index 00000000000..b4616b8b14c --- /dev/null +++ b/core/js/setup.js @@ -0,0 +1,26 @@ +$(document).ready(function() { + // Hide the MySQL config div if needed : + if(!$('#mysql').is(':checked') && $('#hasSQLite').val()=='true') { + $('#use_mysql').hide(); + } + + $('#datadirField').hide(250); + if($('#hasSQLite').val()=='true'){ + $('#databaseField').hide(250); + } + + $('#sqlite').click(function() { + $('#use_mysql').slideUp(250); + }); + + $('#mysql').click(function() { + $('#use_mysql').slideDown(250); + }); + + $('#showAdvanced').click(function() { + $('#datadirField').slideToggle(250); + if($('#hasSQLite').val()=='true'){ + $('#databaseField').slideToggle(250); + } + }); +}); diff --git a/core/l10n/de.php b/core/l10n/de.php new file mode 100644 index 00000000000..fb00345e69d --- /dev/null +++ b/core/l10n/de.php @@ -0,0 +1,11 @@ + "Sie wurden abgemeldet.", +"Set where to store the data." => "Speicherort der Daten", +"Advanced" => "Erweitert", +"prev" => "zurück", +"Login:" => "Benutzername:", +"Login failed!" => "Anmeldung Fehlgeschlagen!", +"next" => "weiter", +"Password:" => "Passwort:", +"Search" => "Suchen" +); diff --git a/core/l10n/de.po b/core/l10n/de.po new file mode 100644 index 00000000000..19b12ca4aac --- /dev/null +++ b/core/l10n/de.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "" + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "" + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "" + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "" + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "Benutzername:" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "Passwort:" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "Erweitert" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "Speicherort der Daten" + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "" + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "" + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "" + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "" + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "" + +#: ../templates/layout.guest.php:17 ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

      " +msgstr "" + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "Anmeldung Fehlgeschlagen!" + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "Sie wurden abgemeldet." + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "zurück" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "weiter" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "Suchen" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "" diff --git a/core/l10n/javascript.php b/core/l10n/javascript.php new file mode 100644 index 00000000000..a1e84487f63 --- /dev/null +++ b/core/l10n/javascript.php @@ -0,0 +1,34 @@ +. +* +*/ + +// Init owncloud +require_once('../lib/base.php'); + +$app = $_POST["app"]; + +// We send json data +header( "Content-Type: application/jsonrequest" ); +$l = new OC_L10N( $app ); + +echo json_encode( array( 'status' => 'success', 'data' => $l->getTranslations())); +?> diff --git a/core/l10n/l10n-de.php b/core/l10n/l10n-de.php new file mode 100644 index 00000000000..f3084b05df8 --- /dev/null +++ b/core/l10n/l10n-de.php @@ -0,0 +1,5 @@ + 'd.m.Y', + 'datetime' => 'd.m.Y H:i:s', + 'time' => 'H:i:s' ); diff --git a/core/l10n/messages.pot b/core/l10n/messages.pot new file mode 100644 index 00000000000..591a1c724e3 --- /dev/null +++ b/core/l10n/messages.pot @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "" + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "" + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "" + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "" + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "" + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "" + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "" + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "" + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "" + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "" + +#: ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

      " +msgstr "" + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "" + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "" + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "" diff --git a/core/l10n/nl.php b/core/l10n/nl.php new file mode 100644 index 00000000000..712444c8006 --- /dev/null +++ b/core/l10n/nl.php @@ -0,0 +1,27 @@ +admin account." => "Maak een administrator account. aan", +"Welcome to ownCloud, your personnal cloud." => "Welkom by ownCloud, jouw persoonlijke cloud", +"You are logged out." => "Je bent afgemend.", +"MySQL user password:" => "MySQL wachtwoord", +"Error 404, Cloud not found" => "Fout 404, Cloud niet gevonden.", +"Database name:" => "Database naam:", +"Set where to store the data." => "Bepaal waar de gegevens opgeslagen moeten woorden.", +"Advanced" => "Geavanceerd", +"To finish the installation, please follow the steps below." => "Volg de volgende stappen om de instalatie af te ronden.", +"Host:" => "Host:", +"Table prefix:" => "Voorvoegsel voor tabelnaamen:", +"prev" => "vorige", +"Login:" => "Gebruikersnaam:", +"Login failed!" => "Aanmelden mislukt.", +"I will use a MySQL database." => "Er zal een MySQL database gebruikt woorden.", +"next" => "volgende", +"Password:" => "Wachtwoord:", +"SQLite" => "SQLite", +"MySQL user login:" => "MySQL gebruikers naam.", +"ownCloud is a personal cloud which runs on your own server.

      " => "ownCloud is een persoonlijke cloud die op je eigen server draait.

      ", +"Search" => "Zoeken", +"Data directory:" => "Gegevens map:", +"Finish setup" => "Instalatie afronden", +"Configure your database." => "Stel de database in.", +"I will use a SQLite database. You have nothing to do!" => "Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." +); diff --git a/core/l10n/nl.po b/core/l10n/nl.po new file mode 100644 index 00000000000..7a819e81dd8 --- /dev/null +++ b/core/l10n/nl.po @@ -0,0 +1,125 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Robin Appelman , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: 2011-06-20 14:19+0200\n" +"Last-Translator: Robin Appelman \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "Fout 404, Cloud niet gevonden." + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "Welkom by ownCloud, jouw persoonlijke cloud" + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "Volg de volgende stappen om de instalatie af te ronden." + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "Maak een administrator account. aan" + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "Gebruikersnaam:" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "Wachtwoord:" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "Geavanceerd" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "Bepaal waar de gegevens opgeslagen moeten woorden." + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "Gegevens map:" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "Stel de database in." + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "" +"Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "SQLite" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "Er zal een MySQL database gebruikt woorden." + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "Host:" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "Database naam:" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "Voorvoegsel voor tabelnaamen:" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "MySQL gebruikers naam." + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "MySQL wachtwoord" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "Instalatie afronden" + +#: ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

      " +msgstr "" +"ownCloud is een persoonlijke cloud die " +"op je eigen server draait.

      " + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "Aanmelden mislukt." + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "Je bent afgemend." + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "vorige" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "volgende" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "Zoeken" + + diff --git a/core/l10n/xgettextfiles b/core/l10n/xgettextfiles new file mode 100644 index 00000000000..b5d83a880d4 --- /dev/null +++ b/core/l10n/xgettextfiles @@ -0,0 +1,7 @@ +../templates/404.php +../templates/installation.php +../templates/layout.guest.php +../templates/login.php +../templates/logout.php +../templates/part.pagenavi.php +../templates/part.searchbox.php diff --git a/core/templates/404.php b/core/templates/404.php new file mode 100644 index 00000000000..b287571d166 --- /dev/null +++ b/core/templates/404.php @@ -0,0 +1,19 @@ +printPage(); + exit; +} +?> +
      + " alt="ownCloud" /> +
        +
      • + t( 'Error 404, Cloud not found' ); ?>
        +

        +
      • +
      +
      \ No newline at end of file diff --git a/core/templates/error.php b/core/templates/error.php new file mode 100644 index 00000000000..ae3f029708f --- /dev/null +++ b/core/templates/error.php @@ -0,0 +1,17 @@ + +
      + " alt="ownCloud" /> +
        + +
      • +
        +

        +
      • + +
      +
      + diff --git a/core/templates/installation.php b/core/templates/installation.php new file mode 100644 index 00000000000..93c00547ab9 --- /dev/null +++ b/core/templates/installation.php @@ -0,0 +1,70 @@ +
      + ownCloud +
      + +

      + t( 'Welcome to ownCloud, your personnal cloud.' ); ?>
      + t( 'To finish the installation, please follow the steps below.' ); ?> +

      + + 0): ?> +
        + +
      • + + +

        + + + +
      • + +
      + + +
      + t( 'Create an admin account.' ); ?> +

      +

      +
      + + t( 'Advanced' ); ?> '> + +
      + t( 'Set where to store the data.' ); ?> +

      +
      + +
      + t( 'Configure your database.' ); ?> + + + +

      t( 'I will use a SQLite database. You have nothing to do!' ); ?>

      + + +

      />

      + + + + + + +

      t( 'I will use a MySQL database.' ); ?>

      + + +

      />

      + +
      +

      +

      +

      +

      +

      +
      + +
      + +

      +
      +
      diff --git a/core/templates/layout.admin.php b/core/templates/layout.admin.php new file mode 100644 index 00000000000..1fcd4568f8c --- /dev/null +++ b/core/templates/layout.admin.php @@ -0,0 +1,57 @@ + + + + ownCloud + + + + + + + + + + + + + + +
      +
      + +
      + +
      + +
      +
      + + diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php new file mode 100644 index 00000000000..ce99b00b9f6 --- /dev/null +++ b/core/templates/layout.guest.php @@ -0,0 +1,22 @@ + + + + ownCloud + + + + + + + + + + + + + +

      t( 'ownCloud is a personal cloud which runs on your own server.

      ' ); ?> + + diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php new file mode 100644 index 00000000000..f21db202a83 --- /dev/null +++ b/core/templates/layout.user.php @@ -0,0 +1,42 @@ + + + + ownCloud + + + + + + + + + + + + + + +
      +
      + +
      + +
      + +
      +
      + + diff --git a/core/templates/login.php b/core/templates/login.php new file mode 100644 index 00000000000..e0f6ce23e2e --- /dev/null +++ b/core/templates/login.php @@ -0,0 +1,14 @@ +
      + ownCloud +
      +
      + + t( 'Login failed!' ); ?> + + + + +
      +
      +
      + diff --git a/core/templates/logout.php b/core/templates/logout.php new file mode 100644 index 00000000000..8cbbdd9cc8d --- /dev/null +++ b/core/templates/logout.php @@ -0,0 +1 @@ +t( 'You are logged out.' ); ?> \ No newline at end of file diff --git a/core/templates/part.pagenavi.php b/core/templates/part.pagenavi.php new file mode 100644 index 00000000000..0602b793882 --- /dev/null +++ b/core/templates/part.pagenavi.php @@ -0,0 +1,31 @@ +
      + + + + + + +
      + 0):?> + t( 'prev' ); ?>   + + + 0):?> + ... + + + +   + +   + + + + ... + + + + t( 'next' ); ?> + +
      +
      \ No newline at end of file diff --git a/core/templates/part.searchbox.php b/core/templates/part.searchbox.php new file mode 100644 index 00000000000..7465a7326ee --- /dev/null +++ b/core/templates/part.searchbox.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/css/images/no.png b/css/images/no.png deleted file mode 100644 index fdc0f421255..00000000000 Binary files a/css/images/no.png and /dev/null differ diff --git a/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png b/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png deleted file mode 100644 index 6348115e6be..00000000000 Binary files a/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png and /dev/null differ diff --git a/css/images/ui-bg_flat_15_cd0a0a_40x100.png b/css/images/ui-bg_flat_15_cd0a0a_40x100.png deleted file mode 100644 index 7680b5437cf..00000000000 Binary files a/css/images/ui-bg_flat_15_cd0a0a_40x100.png and /dev/null differ diff --git a/css/images/ui-bg_glass_100_e4f1fb_1x400.png b/css/images/ui-bg_glass_100_e4f1fb_1x400.png deleted file mode 100644 index 705a32ea35d..00000000000 Binary files a/css/images/ui-bg_glass_100_e4f1fb_1x400.png and /dev/null differ diff --git a/css/images/ui-bg_glass_50_3baae3_1x400.png b/css/images/ui-bg_glass_50_3baae3_1x400.png deleted file mode 100644 index baabca6baaf..00000000000 Binary files a/css/images/ui-bg_glass_50_3baae3_1x400.png and /dev/null differ diff --git a/css/images/ui-bg_glass_80_d7ebf9_1x400.png b/css/images/ui-bg_glass_80_d7ebf9_1x400.png deleted file mode 100644 index d9387e9507e..00000000000 Binary files a/css/images/ui-bg_glass_80_d7ebf9_1x400.png and /dev/null differ diff --git a/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png b/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png deleted file mode 100644 index 28b566c2c29..00000000000 Binary files a/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png and /dev/null differ diff --git a/css/images/ui-bg_highlight-hard_70_000000_1x100.png b/css/images/ui-bg_highlight-hard_70_000000_1x100.png deleted file mode 100644 index d5882978043..00000000000 Binary files a/css/images/ui-bg_highlight-hard_70_000000_1x100.png and /dev/null differ diff --git a/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png b/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png deleted file mode 100644 index 2289d3c7d7b..00000000000 Binary files a/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png and /dev/null differ diff --git a/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png b/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png deleted file mode 100644 index 54aff0cb974..00000000000 Binary files a/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png and /dev/null differ diff --git a/css/images/ui-icons_2694e8_256x240.png b/css/images/ui-icons_2694e8_256x240.png deleted file mode 100644 index 9d192c2f659..00000000000 Binary files a/css/images/ui-icons_2694e8_256x240.png and /dev/null differ diff --git a/css/images/ui-icons_2e83ff_256x240.png b/css/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 09d1cdc856c..00000000000 Binary files a/css/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/css/images/ui-icons_3d80b3_256x240.png b/css/images/ui-icons_3d80b3_256x240.png deleted file mode 100644 index f13b206645b..00000000000 Binary files a/css/images/ui-icons_3d80b3_256x240.png and /dev/null differ diff --git a/css/images/ui-icons_72a7cf_256x240.png b/css/images/ui-icons_72a7cf_256x240.png deleted file mode 100644 index 0d20b730833..00000000000 Binary files a/css/images/ui-icons_72a7cf_256x240.png and /dev/null differ diff --git a/css/images/ui-icons_ffffff_256x240.png b/css/images/ui-icons_ffffff_256x240.png deleted file mode 100644 index 42f8f992c72..00000000000 Binary files a/css/images/ui-icons_ffffff_256x240.png and /dev/null differ diff --git a/css/jquery-ui-1.8.10.custom.css b/css/jquery-ui-1.8.10.custom.css deleted file mode 100644 index 1f376ca99d3..00000000000 --- a/css/jquery-ui-1.8.10.custom.css +++ /dev/null @@ -1,573 +0,0 @@ -/* - * jQuery UI CSS Framework 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/* - * jQuery UI CSS Framework 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; } -.ui-widget-content a { color: #362b36; } -.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_highlight-soft_100_deedf7_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } -.ui-widget-header a { color: #222222; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_glass_80_d7ebf9_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_glass_100_e4f1fb_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; } -.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_glass_50_3baae3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; } -.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } -.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } -.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } -.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; } -.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; } -.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; } - -/* Overlays */ -.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); } -.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* - * jQuery UI Resizable 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizable#theming - */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* - * jQuery UI Selectable 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectable#theming - */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } -/* - * jQuery UI Accordion 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Accordion#theming - */ -/* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; } -/* - * jQuery UI Autocomplete 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.10 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -/* - * jQuery UI Button 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Button#theming - */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ -/* - * jQuery UI Dialog 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog#theming - */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/* - * jQuery UI Slider 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider#theming - */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* - * jQuery UI Tabs 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs#theming - */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/* - * jQuery UI Datepicker 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker#theming - */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - display: none; /*sorry for IE5*/ - display/**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/* - * jQuery UI Progressbar 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar#theming - */ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/css/styles.css b/css/styles.css deleted file mode 100644 index 5027a6b6fe9..00000000000 --- a/css/styles.css +++ /dev/null @@ -1,278 +0,0 @@ -* { margin:0; padding:0; border:0; } -body { background:#fefefe url('../img/body_background.jpg') repeat-y left top; font:normal 80%/1.6em "Lucida Grande", Arial, Verdana, sans-serif; color:#000; } -#header { position:fixed; top:0; z-index:100; width:100%; height:5.5em; padding:0.5em 1.5em; background:url('../img/header-a.png') repeat-x left top; } -#body-settings #header { background-image:url('../img/header-settings-a.png'); } -#owncloud { float:left; margin:0 0 0 2em; } -h1 { margin:1em 3em 1em 0; border-bottom:1px solid #666; text-transform:uppercase; font-weight:normal; font-style:italic; color:#666; } -p.center { text-align:center; } - -form { margin:2em 2em 2em 3em; } -form#quota { max-width:600px; } -form#user_settings { max-width:600px; } -form#user_settings p label { display:block; float:left; width:35%; padding:0.4em 0.5em 0 0; text-align:right; } -form p { padding:0.5em 4em 0.5em 0.5em; text-align:left; } -form p.form_footer { margin:1em 0 0 0; text-align:right; } -form label { cursor:pointer; } -form input { padding:0.2em; border:1px solid #ddd; font-size:1.2em; } -form input[type="submit"] { padding:0.1em 1em; border:1px solid #999; font-weight:bold; font-size:0.9em; cursor:pointer; } -form input[type="submit"]:hover, form input[type="submit"]:focus { border:1px solid #999; background-color:#999; outline:0; } -form input[type="submit"]:active { outline:0; } -fieldset { padding:1em; background-color:#f7f7f7; border:1px solid #ddd; } -legend { padding:0 0.5em; font-size:1.2em; } - -div.controls { width:91%; margin:1em 1em 1em 2em; padding:0.5em 0; background-color:#f7f7f7; border:1px solid #eee; } - -/* LOG IN & INSTALLATION ------------------------------------------------------------ */ -#body-login { width:100%; background-image:none; background-color:#ddd; } -#body-login p.info { width:16em; margin:4em auto; padding:1em; background-color:#eee; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; } - -#login -{ - margin: 0 auto 0 auto; - padding: 2em 0 0 0; - background-image: url(../img/header-login.png); - background-position: left 0; - background-repeat: repeat-x; - background-color: #EEE; - border-bottom: 1px solid #FFF; - text-align: center; -} - -#login_form -{ - width: 20em; - margin: 4em auto; - padding: 0; -} - -#login_form fieldset -{ - background-color: transparent; - border: 0; -} - -#login_form fieldset p -{ - margin: 0.5em 0 0 0; - padding: 0; - text-align: left; -} - -#login_form fieldset p.submit -{ - margin: 2em 0 0 0; - padding: 1em 0 0 0; - border-top: 1px solid #DDD; - text-align: right; -} - -#login_form label -{ - font-size: 1em; - color: #666; -} - -#login_form input -{ - width: 100%; - margin: 0 0 0.5em 0; - padding: 0.5em; - border: 1px solid #DDD; - -moz-border-radius: 15px; - -webkit-border-radius: 15px; - border-radius: 15px; - font-size: 1.5em; - color: #333; - text-align: center; -} - -#login_form input[type=submit] -{ - width: auto; - margin: 1em 0 0 0.5em; - text-align: center; - border: 1px solid #DDD; - background-color: #FFF; - -moz-border-radius: 15px; - -webkit-border-radius: 15px; - border-radius: 15px; - font-size: 1.5em -} - -#login_form input[type=submit]:hover -{ - border: 1px solid #666; - background-color: #666; - color: #FFF; -} - - -#setup_form { - margin: 3em auto; - text-align: left; - width: 720px; -} - -#setup_form #use_mysql { - font-size: 0.9em; - margin: 0 0 0 1em; -} - -#setup_form p.intro { - color: #666; - font-size: 1.3em; - margin: 4em 0 3em 0; - padding: 0; - text-align: center; -} - -#setup_form ul.errors { - background-image: url(images/no.png); - background-position: 1em 1em; - background-repeat: no-repeat; - background-color: #FED7D7; - border: 1px solid #F00; - font-size: 1.2em; - list-style-indent: inside; - margin: 0 0 4em 0; - padding: 1em 1em 1em 5em; -} - -#setup_form fieldset { - margin: 0 0 3em 0; -} - -#setup_form p { - line-height: 1.8em; -} - -#setup_form legend { - font-weight: normal; -} - -#setup_form label { - cursor: pointer; - display: block; - float: left; - margin: 0 0 0.2em 0; - text-align: right; - width: 40%; -} - -#setup_form input[type='text'], -#setup_form input[type='password'] { - font-size: 1em; - margin: 0 0 0 0.5em; - padding: 0.3em; -} - -#setup_form input[type='radio'] { - margin: 0 0 0 1em; -} - -#setup_form input[type='submit'] { - background-color: #DDD; - border: 1px solid #999; - color: #666; - font-size: 1.2em; -} - -#setup_form input[type='submit']:hover { - border-color: #000; - color: #000; -} - -#setup_form p.submit { - padding: 0 0 1em 0; - text-align: center; -} - - - -.prettybutton { margin:0.1em; padding:0.2em 0.5em; border:1px solid #ddd; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:1.5em; text-decoration:none; color:#666; background-color:#fff; } -.prettybutton:hover, .prettybutton:focus { background-color:#ccc; outline:0; } - -/* META NAVIGATION (Settings, Log out) ---------------------------------------------------------------- */ -#metanav { float:right; position:relative; top:1.5em; right:2.5em; list-style:none; margin:0; padding:0; } -#metanav li { display:inline; } -#metanav li a { margin:.1em; padding:1em; } -#metanav li a:hover, #metanav li a:focus { background:rgba(0,0,0,.5); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; outline:0; box-shadow:#555 0 1px 0; -moz-box-shadow:#555 0 1px 0; -webkit-box-shadow:#555 0 1px 0; } -#metanav li a img { vertical-align:middle; } - -/* NAVIGATION ------------------------------------------------------------- */ -#plugins { position:fixed; top:7em; float:left; width:15.7em; padding:0; } -#plugins ul { list-style-type:none; border-top:1px solid #ccc; } -#plugins a { display:block; padding:0.5em 0.5em 0.5em 3em; background-position:1.5em center; background-repeat:no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; } -#plugins a.active, #plugins a:hover, #plugins a:focus, #plugins a.selected { background-color:#ccc; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; outline:0; } -#plugins a:active { outline:0; } - -/* CONTENT ------------------------------------------------------------------ */ -#content { margin:7em 0 0 16em; } -table { margin:1em 5em 2em 3em; } -table tr.mouseOver td { background-color:#eee; } -table th, table td { padding:0; border-bottom:1px solid #ddd; text-align:left; font-style:italic; } -table th { padding:0.5em; } -table td { border-bottom:1px solid #eee; font-style:normal; } -table td.filesize, table td.date { width:5em; padding:0.5em 1em; text-align:right; } -table td.date { width:11em; } -table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; } -table td.filename a { display:block; background-image:url('../img/file.png'); text-decoration:none; } -table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:0.5em 0.5em 0.5em 3em; background-position:1em center; background-repeat:no-repeat; } -table td.filename a:hover, table td.filename a:focus { text-decoration:underline; outline:0; } -table td.filename a:active { outline:0; } -table em { font-weight:bold; } -table td.filename a.folder-up { background-image:url('../img/back.png'); font-style:italic; } -table td.filename a.folder { background-image:url('../img/folder.png'); } -table td.filename a.folder-home { background-image:url('../img/home.png'); } -table td.filename a.folder-music { background-image:url('../img/folder-music.png'); } -table td.filename a.folder-videos { background-image:url('../img/folder-video.png'); } -table td.filename a.folder-shared { background-image:url('../img/folder-shared.png'); } -table td.filename a.folder-images { background-image:url('../img/folder-image.png'); } -table td.filename a.file-txt { background-image:url('../img/file-txt.png'); } -table td.filename a.file-python { background-image:url('../img/file-python.png'); } -table td.filename a.file-php { background-image:url('../img/file.png'); } -table td.login { background-image:url('../img/login.png'); } -table td.logout { background-image:url('../img/logout.png'); } -table td.download { background-image:url('../img/download.png'); } -table td.upload { background-image:url('../img/upload.png'); } -table td.create { background-image:url('../img/folder-new.png'); } -table td.delete { background-image:url('../img/delete.png'); } -#fileList tr input[type=checkbox] { display:none; } -#fileList tr input[type=checkbox]:checked { display:inline; } -#fileList tr:hover input[type=checkbox] { display:inline; } - -/* NAVIGATION BAR */ -p.nav { margin:1em 0 0 2em; padding:0.8em; line-height:16px; font-weight:bold; } -p.nav a { padding:0.5em 1.5em 0.5em 0.5em; background-position:right center; background-repeat:no-repeat; background-image:url('../img/arrow.png'); text-decoration:none; } -p.nav a img { height:16px; vertical-align:text-top; } - -/* ACTIONS BAR */ -p.actions, div.actions { padding:0; } -p.actions a, div.actions a { padding:0.5em 0.5em 0.5em 3em; background-position:1em center; background-repeat:no-repeat; background-image:url('../img/action.png'); border-right:1px solid #eee; text-decoration:none; color:#333; } -p.actions a:hover, p.actions a:focus, div.actions a:hover, div.actions a:focus { background-color:#eee; color:#000; outline:0; } -p.actions a:active, div.actions a:active { outline:0; } -p.actions a.new-dir, div.actions a.new-dir { background-image:url('../img/folder-new.png'); } -p.actions a.download, div.actions a.download { background-image:url('../img/download.png'); } -p.actions a.delete, div.actions a.delete { background-image:url('../img/delete.png'); } - -/* USER SETTINGS ------------------------------------------------------------ */ -#quota_indicator { margin:0 4em 1em 0; padding:0; border:1px solid #ddd; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; } -#quota_indicator div { background-color:#76A9EA; border-radius:10px; -webkit-border-radius:10px; -moz-border-radius:10px; } - -/* PAGER ------------------------------------------------------------ */ -.pager tr td { border-bottom:0px; } -.pager tr td a { text-decoration:none; color:#666666; font-size:0.9em; text-align:center; } - -/* LOGS --------------------------------------------------------------------- */ -#logs_options { width:auto; margin:0; } -#logs_options p { padding:0.5em; text-align:left; } -#logs_options span { margin:0 2em 0 0.5em; font-weight:bold; } -#logs_options label { margin:0 1em 0 0; } -#logs_options input[type="submit"] { float:right; margin:0 2em 0 0; } -#logs_options input[type="submit"].nofloat { float:none; margin:0 2em 0 0; } -#logs_options input[type="text"] { margin:0; padding:0; border:1px solid #ccc; text-align:right; } -li.error{ list-style:none; width:640px; margin:4em auto; padding:1em 1em 1em 4em; background-color:#fee; background-image:url('../img/task-attention.png'); background-position:0.8em 0.8em; background-repeat:no-repeat; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; } - -/* SEARCH --------------------------------------------------------------------- */ -form.searchbox{display:inline; position:fixed; top:1.5em; right:9em; margin:0; padding:0;}; -form.searchbox .prettybutton{font-size:1.5em !important}; \ No newline at end of file diff --git a/files/css/files.css b/files/css/files.css index 7c7965ab847..702ddefc19c 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -110,5 +110,5 @@ table td.filename a width:16px; display: -moz-inline-box; /* fallback for older firefox versions*/ display: inline-block; - background-image:url('../../img/drop-arrow.png'); + background-image:url('../img/drop-arrow.png'); } \ No newline at end of file diff --git a/files/img/drop-arrow.png b/files/img/drop-arrow.png new file mode 100644 index 00000000000..315395d5d42 Binary files /dev/null and b/files/img/drop-arrow.png differ diff --git a/img/actions/arrow-down.png b/img/actions/arrow-down.png deleted file mode 100644 index 03f201428ad..00000000000 Binary files a/img/actions/arrow-down.png and /dev/null differ diff --git a/img/actions/arrow-left.png b/img/actions/arrow-left.png deleted file mode 100644 index b56cfee03df..00000000000 Binary files a/img/actions/arrow-left.png and /dev/null differ diff --git a/img/actions/arrow-right.png b/img/actions/arrow-right.png deleted file mode 100644 index 0acee70bcdd..00000000000 Binary files a/img/actions/arrow-right.png and /dev/null differ diff --git a/img/actions/arrow-up.png b/img/actions/arrow-up.png deleted file mode 100644 index 5e423213fbd..00000000000 Binary files a/img/actions/arrow-up.png and /dev/null differ diff --git a/img/actions/go-home.png b/img/actions/go-home.png deleted file mode 100644 index 3802c98fc46..00000000000 Binary files a/img/actions/go-home.png and /dev/null differ diff --git a/img/body_background.jpg b/img/body_background.jpg deleted file mode 100644 index c3d0102f711..00000000000 Binary files a/img/body_background.jpg and /dev/null differ diff --git a/img/drop-arrow.png b/img/drop-arrow.png deleted file mode 100644 index 315395d5d42..00000000000 Binary files a/img/drop-arrow.png and /dev/null differ diff --git a/img/favicon-touch.png b/img/favicon-touch.png deleted file mode 100644 index 20af826523c..00000000000 Binary files a/img/favicon-touch.png and /dev/null differ diff --git a/img/favicon.png b/img/favicon.png deleted file mode 100644 index a7ee766dfa8..00000000000 Binary files a/img/favicon.png and /dev/null differ diff --git a/img/header-a.png b/img/header-a.png deleted file mode 100644 index 46fb0977ee2..00000000000 Binary files a/img/header-a.png and /dev/null differ diff --git a/img/header-login.png b/img/header-login.png deleted file mode 100644 index b0160e02d1f..00000000000 Binary files a/img/header-login.png and /dev/null differ diff --git a/img/header-settings-a.png b/img/header-settings-a.png deleted file mode 100644 index a72271be6a4..00000000000 Binary files a/img/header-settings-a.png and /dev/null differ diff --git a/img/header-settings.png b/img/header-settings.png deleted file mode 100644 index 7e6b70b5903..00000000000 Binary files a/img/header-settings.png and /dev/null differ diff --git a/img/header.png b/img/header.png deleted file mode 100644 index d377f65186d..00000000000 Binary files a/img/header.png and /dev/null differ diff --git a/img/layout/back.png b/img/layout/back.png deleted file mode 100644 index 86abbe0cabe..00000000000 Binary files a/img/layout/back.png and /dev/null differ diff --git a/img/layout/logout.png b/img/layout/logout.png deleted file mode 100644 index 74dcd33bee7..00000000000 Binary files a/img/layout/logout.png and /dev/null differ diff --git a/img/layout/settings.png b/img/layout/settings.png deleted file mode 100644 index ff650ecb0b0..00000000000 Binary files a/img/layout/settings.png and /dev/null differ diff --git a/img/mimetypes/file.png b/img/mimetypes/file.png deleted file mode 100644 index 49790448897..00000000000 Binary files a/img/mimetypes/file.png and /dev/null differ diff --git a/img/owncloud-logo-medium-white.png b/img/owncloud-logo-medium-white.png deleted file mode 100644 index d4d06fdd62d..00000000000 Binary files a/img/owncloud-logo-medium-white.png and /dev/null differ diff --git a/img/owncloud-logo-small-white.png b/img/owncloud-logo-small-white.png deleted file mode 100644 index 397ddf91341..00000000000 Binary files a/img/owncloud-logo-small-white.png and /dev/null differ diff --git a/img/places/folder.png b/img/places/folder.png deleted file mode 100644 index 3edbe257a34..00000000000 Binary files a/img/places/folder.png and /dev/null differ diff --git a/img/weather-clear.png b/img/weather-clear.png deleted file mode 100644 index 0acf7a9b2af..00000000000 Binary files a/img/weather-clear.png and /dev/null differ diff --git a/js/jquery-1.5.min.js b/js/jquery-1.5.min.js deleted file mode 100644 index 9144b8ae98c..00000000000 --- a/js/jquery-1.5.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * jQuery JavaScript Library v1.5 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Jan 31 08:31:29 2011 -0500 - */ -(function(a,b){function b$(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function bX(a){if(!bR[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bR[a]=c}return bR[a]}function bW(a,b){var c={};d.each(bV.concat.apply([],bV.slice(0,b)),function(){c[this]=a});return c}function bJ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f=a.converters,g,h=e.length,i,j=e[0],k,l,m,n,o;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(q,"`").replace(r,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,p,q=[],r=[],s=d._data(this,u);typeof s==="function"&&(s=s.events);if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,p=f.handleObj.origHandler.apply(f.elem,arguments);if(p===!1||a.isPropagationStopped()){c=f.level,p===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,b,c){c[0].type=a;return d.event.handle.apply(b,c)}function w(){return!0}function v(){return!1}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");e.type="text/javascript",d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?(g=Array(c),d.each(b,function(a,b){d.when(b).then(function(b){g[a]=arguments.length>1?E.call(arguments,0):b,--c||e.resolveWith(f,g)},e.reject)})):e!==a&&e.resolve(a);return f},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return a.jQuery=a.$=d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="
      a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option"));if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:b.getElementsByTagName("input")[0].value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,_scriptEval:null,noCloneEvent:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},g.disabled=!0,d.support.optDisabled=!h.disabled,d.support.scriptEval=function(){if(d.support._scriptEval===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();e.type="text/javascript";try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(d.support._scriptEval=!0,delete a[f]):d.support._scriptEval=!1,b.removeChild(e),b=e=f=null}return d.support._scriptEval};try{delete b.test}catch(i){d.support.deleteExpando=!1}b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function j(){d.support.noCloneEvent=!1,b.detachEvent("onclick",j)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var k=c.createDocumentFragment();k.appendChild(b.firstChild),d.support.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
      ",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
      t
      ";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var l=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=l("submit"),d.support.changeBubbles=l("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!d.isEmptyObject(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={}),typeof c==="object"&&(f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c)),i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,i=g?b[d.expando]:d.expando;if(!h[i])return;if(c){var j=e?h[i][f]:h[i];if(j){delete j[c];if(!d.isEmptyObject(j))return}}if(e){delete h[i][f];if(!d.isEmptyObject(h[i]))return}var k=h[i][f];d.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},h[i][f]=k):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,j=c.type==="select-one";if(f<0)return null;for(var k=j?f:0,l=j?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=j.test(c);if(c==="selected"&&!d.support.optSelected){var n=a.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&k.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:l.test(a.nodeName)||m.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var o=/\.(.*)$/,p=/^(?:textarea|input|select)$/i,q=/\./g,r=/ /g,s=/[^\w\s.|`]/g,t=function(a){return a.replace(s,"\\$&")},u="events";d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a);if(f===!1)f=v;else if(!f)return;var h,i;f.handler&&(h=f,f=h.handler),f.guid||(f.guid=d.guid++);var j=d._data(c);if(!j)return;var k=j[u],l=j.handle;typeof k==="function"?(l=k.handle,k=k.events):k||(c.nodeType||(j[u]=j=function(){}),j.events=k={}),l||(j.handle=l=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(l.elem,arguments):b}),l.elem=c,e=e.split(" ");var m,n=0,o;while(m=e[n++]){i=h?d.extend({},h):{handler:f,data:g},m.indexOf(".")>-1?(o=m.split("."),m=o.shift(),i.namespace=o.slice(0).sort().join(".")):(o=[],i.namespace=""),i.type=m,i.guid||(i.guid=f.guid);var p=k[m],q=d.event.special[m]||{};if(!p){p=k[m]=[];if(!q.setup||q.setup.call(c,g,o,l)===!1)c.addEventListener?c.addEventListener(m,l,!1):c.attachEvent&&c.attachEvent("on"+m,l)}q.add&&(q.add.call(c,i),i.handler.guid||(i.handler.guid=f.guid)),p.push(i),d.event.global[m]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),w=s&&s[u];if(!s||!w)return;typeof w==="function"&&(s=w,w=w.events),c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in w)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),t).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=w[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=e.nodeType?d._data(e,"handle"):(d._data(e,u)||{}).handle;h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(o,""),n=d.nodeName(l,"a")&&m==="click",p=d.event.special[m]||{};if((!p._default||p._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,u),typeof i==="function"&&(i=i.events),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(p.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f){a.type="change",a.liveFired=b;return d.event.trigger(a,arguments[1],c)}}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;if(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")return B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")return B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return p.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return p.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function s(a,b,c,d,e,f){for(var g=0,h=d.length;g0){k=j;break}}j=j[a]}d[g]=k}}}function r(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0;[0,0].sort(function(){h=!1;return 0});var i=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var l,m,o,p,q,r,s,u,v=!0,w=i.isXML(d),x=[],y=b;do{a.exec(""),l=a.exec(y);if(l){y=l[3],x.push(l[1]);if(l[2]){p=l[3];break}}}while(l);if(x.length>1&&k.exec(b))if(x.length===2&&j.relative[x[0]])m=t(x[0]+x[1],d);else{m=j.relative[x[0]]?[d]:i(x.shift(),d);while(x.length)b=x.shift(),j.relative[b]&&(b+=x.shift()),m=t(b,m)}else{!g&&x.length>1&&d.nodeType===9&&!w&&j.match.ID.test(x[0])&&!j.match.ID.test(x[x.length-1])&&(q=i.find(x.shift(),d,w),d=q.expr?i.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:n(g)}:i.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),m=q.expr?i.filter(q.expr,q.set):q.set,x.length>0?o=n(m):v=!1;while(x.length)r=x.pop(),s=r,j.relative[r]?s=x.pop():r="",s==null&&(s=d),j.relative[r](o,s,w)}else o=x=[]}o||(o=m),o||i.error(r||b);if(f.call(o)==="[object Array]")if(v)if(d&&d.nodeType===1)for(u=0;o[u]!=null;u++)o[u]&&(o[u]===!0||o[u].nodeType===1&&i.contains(d,o[u]))&&e.push(m[u]);else for(u=0;o[u]!=null;u++)o[u]&&o[u].nodeType===1&&e.push(m[u]);else e.push.apply(e,o);else n(o,e);p&&(i(p,h,e,g),i.uniqueSort(e));return e};i.uniqueSort=function(a){if(p){g=h,a.sort(p);if(g)for(var b=1;b0},i.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=j.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!/\W/.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||i.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&i.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(/\\/g,"");!f&&j.attrMap[g]&&(a[1]=j.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(/\\/g,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=i(b[3],null,null,c);else{var g=i.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(j.match.POS.test(b[0])||j.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!i(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=j.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||i.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,k=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=j.attrHandle[c]?j.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=j.setFilters[e];if(f)return f(a,c,b,d)}}},k=j.match.POS,l=function(a,b){return"\\"+(b-0+1)};for(var m in j.match)j.match[m]=new RegExp(j.match[m].source+/(?![^\[]*\])(?![^\(]*\))/.source),j.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+j.match[m].source.replace(/\\(\d+)/g,l));var n=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(o){n=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(j.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},j.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(j.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(j.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=i,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

      ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){i=function(b,e,f,g){e=e||c;if(!g&&!i.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return n(e.getElementsByTagName(b),f);if(h[2]&&j.find.CLASS&&e.getElementsByClassName)return n(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return n([e.body],f);if(h&&h[3]){var k=e.getElementById(h[3]);if(!k||!k.parentNode)return n([],f);if(k.id===h[3])return n([k],f)}try{return n(e.querySelectorAll(b),f)}catch(l){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return n(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(r){}finally{m||e.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)i[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(i.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!i.isXML(a))try{if(d||!j.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return i(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="
      ";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;j.order.splice(1,0,"CLASS"),j.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?i.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?i.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains=function(){return!1},i.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var t=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=j.match.PSEUDO.exec(a))e+=c[0],a=a.replace(j.match.PSEUDO,"");a=j.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,"
      ","
      "],thead:[1,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],col:[2,"","
      "],area:[1,"",""],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div
      ","
      "]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!0:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if(!d.support.noCloneEvent&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");for(h=0;f[h];++h)$(f[h],g[h]);$(a,e)}if(b){Z(a,e);if(c&&"getElementsByTagName"in a){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");if(f.length)for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var ba=/alpha\([^)]*\)/i,bb=/opacity=([^)]*)/,bc=/-([a-z])/ig,bd=/([A-Z])/g,be=/^-?\d+(?:px)?$/i,bf=/^-?\d/,bg={position:"absolute",visibility:"hidden",display:"block"},bh=["Left","Right"],bi=["Top","Bottom"],bj,bk,bl,bm=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bj(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bj)return bj(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bc,bm)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bn(a,b,e):d.swap(a,bg,function(){f=bn(a,b,e)});if(f<=0){f=bj(a,b,b),f==="0px"&&bl&&(f=bl(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!be.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=ba.test(f)?f.replace(ba,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bk=function(a,c,e){var f,g,h;e=e.replace(bd,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bl=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!be.test(d)&&bf.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bj=bk||bl,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bo=/%20/g,bp=/\[\]$/,bq=/\r?\n/g,br=/#.*$/,bs=/^(.*?):\s*(.*?)\r?$/mg,bt=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bu=/^(?:GET|HEAD)$/,bv=/^\/\//,bw=/\?/,bx=/)<[^<]*)*<\/script>/gi,by=/^(?:select|textarea)/i,bz=/\s+/,bA=/([?&])_=[^&]*/,bB=/^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,bC=d.fn.load,bD={},bE={};d.fn.extend({load:function(a,b,c){if(typeof a!=="string"&&bC)return bC.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}var g="GET";b&&(d.isFunction(b)?(c=b,b=null):typeof b==="object"&&(b=d.param(b,d.ajaxSettings.traditional),g="POST"));var h=this;d.ajax({url:a,type:g,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText,a.isResolved()&&(a.done(function(a){e=a}),h.html(f?d("
      ").append(e.replace(bx,"")).find(f):e)),c&&h.each(c,[e,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||by.test(this.nodeName)||bt.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bq,"\r\n")}}):{name:b.name,value:c.replace(bq,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,b){d[b]=function(a,c,e,f){d.isFunction(c)&&(f=f||e,e=c,c=null);return d.ajax({type:b,url:a,data:c,success:e,dataType:f})}}),d.extend({getScript:function(a,b){return d.get(a,null,b,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a){d.extend(!0,d.ajaxSettings,a),a.context&&(d.ajaxSettings.context=a.context)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bF(bD),ajaxTransport:bF(bE),ajax:function(a,e){function w(a,c,e,l){if(t!==2){t=2,p&&clearTimeout(p),o=b,m=l||"",v.readyState=a?4:0;var n,q,r,s=e?bI(f,v,e):b,u,w;if(a>=200&&a<300||a===304){if(f.ifModified){if(u=v.getResponseHeader("Last-Modified"))d.lastModified[f.url]=u;if(w=v.getResponseHeader("Etag"))d.etag[f.url]=w}if(a===304)c="notmodified",n=!0;else try{q=bJ(f,s),c="success",n=!0}catch(x){c="parsererror",r=x}}else r=c,a&&(c="error",a<0&&(a=0));v.status=a,v.statusText=c,n?i.resolveWith(g,[q,c,v]):i.rejectWith(g,[v,c,r]),v.statusCode(k),k=b,f.global&&h.trigger("ajax"+(n?"Success":"Error"),[v,f,n?q:r]),j.resolveWith(g,[v,c]),f.global&&(h.trigger("ajaxComplete",[v,f]),--d.active||d.event.trigger("ajaxStop"))}}typeof e!=="object"&&(e=a,a=b),e=e||{};var f=d.extend(!0,{},d.ajaxSettings,e),g=(f.context=("context"in e?e:d.ajaxSettings).context)||f,h=g===f?d.event:d(g),i=d.Deferred(),j=d._Deferred(),k=f.statusCode||{},l={},m,n,o,p,q=c.location,r=q.protocol||"http:",s,t=0,u,v={readyState:0,setRequestHeader:function(a,b){t===0&&(l[a.toLowerCase()]=b);return this},getAllResponseHeaders:function(){return t===2?m:null},getResponseHeader:function(a){var b;if(t===2){if(!n){n={};while(b=bs.exec(m))n[b[1].toLowerCase()]=b[2]}b=n[a.toLowerCase()]}return b||null},abort:function(a){a=a||"abort",o&&o.abort(a),w(0,a);return this}};i.promise(v),v.success=v.done,v.error=v.fail,v.complete=j.done,v.statusCode=function(a){if(a){var b;if(t<2)for(b in a)k[b]=[k[b],a[b]];else b=a[v.status],v.then(b,b)}return this},f.url=(""+(a||f.url)).replace(br,"").replace(bv,r+"//"),f.dataTypes=d.trim(f.dataType||"*").toLowerCase().split(bz),f.crossDomain||(s=bB.exec(f.url.toLowerCase()),f.crossDomain=s&&(s[1]!=r||s[2]!=q.hostname||(s[3]||(s[1]==="http:"?80:443))!=(q.port||(r==="http:"?80:443)))),f.data&&f.processData&&typeof f.data!=="string"&&(f.data=d.param(f.data,f.traditional)),bG(bD,f,e,v),f.type=f.type.toUpperCase(),f.hasContent=!bu.test(f.type),f.global&&d.active++===0&&d.event.trigger("ajaxStart");if(!f.hasContent){f.data&&(f.url+=(bw.test(f.url)?"&":"?")+f.data);if(f.cache===!1){var x=d.now(),y=f.url.replace(bA,"$1_="+x);f.url=y+(y===f.url?(bw.test(f.url)?"&":"?")+"_="+x:"")}}if(f.data&&f.hasContent&&f.contentType!==!1||e.contentType)l["content-type"]=f.contentType;f.ifModified&&(d.lastModified[f.url]&&(l["if-modified-since"]=d.lastModified[f.url]),d.etag[f.url]&&(l["if-none-match"]=d.etag[f.url])),l.accept=f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", */*; q=0.01":""):f.accepts["*"];for(u in f.headers)l[u.toLowerCase()]=f.headers[u];if(!f.beforeSend||f.beforeSend.call(g,v,f)!==!1&&t!==2){for(u in {success:1,error:1,complete:1})v[u](f[u]);o=bG(bE,f,e,v);if(o){t=v.readyState=1,f.global&&h.trigger("ajaxSend",[v,f]),f.async&&f.timeout>0&&(p=setTimeout(function(){v.abort("timeout")},f.timeout));try{o.send(l,w)}catch(z){status<2?w(-1,z):d.error(z)}}else w(-1,"No Transport")}else w(0,"abort"),v=!1;return v},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery)d.each(a,function(){f(this.name,this.value)});else for(var g in a)bH(g,a[g],c,f);return e.join("&").replace(bo,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bK=d.now(),bL=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bK++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){e=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bL.test(b.url)||e&&bL.test(b.data))){var f,g=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[g],i=b.url,j=b.data,k="$1"+g+"$2";b.jsonp!==!1&&(i=i.replace(bL,k),b.url===i&&(e&&(j=j.replace(bL,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+g))),b.url=i,b.data=j,a[g]=function(a){f=[a]},b.complete=[function(){a[g]=h;if(h)f&&d.isFunction(h)&&a[g](f[0]);else try{delete a[g]}catch(b){}},b.complete],b.converters["script json"]=function(){f||d.error(g+" was not called");return f[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript"},contents:{script:/javascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bM=d.now(),bN={},bO,bP;d.ajaxSettings.xhr=a.ActiveXObject?function(){if(a.location.protocol!=="file:")try{return new a.XMLHttpRequest}catch(b){}try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}:function(){return new a.XMLHttpRequest};try{bP=d.ajaxSettings.xhr()}catch(bQ){}d.support.ajax=!!bP,d.support.cors=bP&&"withCredentials"in bP,bP=b,d.support.ajax&&d.ajaxTransport(function(b){if(!b.crossDomain||d.support.cors){var c;return{send:function(e,f){bO||(bO=1,d(a).bind("unload",function(){d.each(bN,function(a,b){b.onreadystatechange&&b.onreadystatechange(1)})}));var g=b.xhr(),h;b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async),(!b.crossDomain||b.hasContent)&&!e["x-requested-with"]&&(e["x-requested-with"]="XMLHttpRequest");try{d.each(e,function(a,b){g.setRequestHeader(a,b)})}catch(i){}g.send(b.hasContent&&b.data||null),c=function(a,e){if(c&&(e||g.readyState===4)){c=0,h&&(g.onreadystatechange=d.noop,delete bN[h]);if(e)g.readyState!==4&&g.abort();else{var i=g.status,j,k=g.getAllResponseHeaders(),l={},m=g.responseXML;m&&m.documentElement&&(l.xml=m),l.text=g.responseText;try{j=g.statusText}catch(n){j=""}i=i===0?!b.crossDomain||j?k?304:0:302:i==1223?204:i,f(i,j,l,k)}}},b.async&&g.readyState!==4?(h=bM++,bN[h]=g,g.onreadystatechange=c):c()},abort:function(){c&&c(0,1)}}}});var bR={},bS=/^(?:toggle|show|hide)$/,bT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,bU,bV=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(bW("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:bW("show",1),slideUp:bW("hide",1),slideToggle:bW("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(d.css(this.elem,this.prop));return a||0},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||"px",this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!bU&&(bU=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
      ";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=bZ.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!bZ.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=b$(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=b$(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}})})(window); diff --git a/js/jquery-ui-1.8.10.custom.min.js b/js/jquery-ui-1.8.10.custom.min.js deleted file mode 100644 index 7d4ff1cec10..00000000000 --- a/js/jquery-ui-1.8.10.custom.min.js +++ /dev/null @@ -1,782 +0,0 @@ -/*! - * jQuery UI 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.10",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106, -NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this, -"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position"); -if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f, -"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h, -d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}}); -c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a); -return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent", -true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); -;/* - * jQuery UI Position 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Position - */ -(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, -left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= -k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= -m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= -d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= -a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), -g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); -;/* - * jQuery UI Draggable 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Draggables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== -"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= -this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top- -this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions(); -d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis|| -this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&& -this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== -a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]|| -0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0], -this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top- -(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment== -"parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"? -0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"), -10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor== -Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop(): -f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY; -if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.leftthis.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/ -b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?e:!(e-this.offset.click.left').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})}, -stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!= -document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e=j&&f<=l||h>=j&&h<=l||fl)&&(e>= -i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), -top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= -this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", -nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== -String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); -this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}; -if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(), -d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset= -this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio: -this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize", -b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height; -f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing"); -this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top= -null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidthb.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+ -this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b, -a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a, -c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize, -originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.10"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize= -b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width", -"height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})}; -if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height- -g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width, -height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d= -e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options, -d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper? -d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height= -a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&& -/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable"); -b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/ -(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery); -;/* - * jQuery UI Selectable 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), -selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("
      ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, -c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting", -c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= -this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.righti||a.bottomb&&a.rightg&&a.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable"); -this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this, -arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem= -c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset, -{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment(); -if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start", -a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute"); -if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a, -c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]== -document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length- -1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null}); -this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&& -a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h= -d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)}); -return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g= -d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top= -e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; -if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder); -c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length=== -1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top< -this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0], -this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out", -g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); -a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); -if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", -function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=this.options;if(a.icons){c("").addClass("ui-icon "+ -a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex"); -this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); -b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target); -a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ -c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options; -if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); -if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(), -e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight|| -e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false", -tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.10",animations:{slide:function(a,b){a= -c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);f[i]={value:j[1], -unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",paddingTop:"hide", -paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery); -;/* - * jQuery UI Autocomplete 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.position.js - */ -(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g=false;var f=d.ui.keyCode; -switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=a.element.val()){a.selectedItem= -null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=d("
        ").addClass("ui-autocomplete").appendTo(d(this.options.appendTo|| -"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"), -i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"); -this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source=== -"string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b); -else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); -(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", --1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.attr("scrollTop"),c=this.element.height();if(b<0)this.element.attr("scrollTop",g+b);else b>=c&&this.element.attr("scrollTop",g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})}, -deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0); -e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e, -g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first")); -this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,f=d.primary&&d.secondary,e=[];if(d.primary||d.secondary){e.push("ui-button-text-icon"+(f?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("");d.secondary&&b.append("");if(!this.options.text){e.push(f?"ui-button-icons-only":"ui-button-icon-only"); -b.removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");this.hasTitle||b.attr("title",c)}}else e.push("ui-button-text-only");b.addClass(e.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this, -arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); -a.Widget.prototype.destroy.call(this)}})})(jQuery); -;/* - * jQuery UI Dialog 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.button.js - * jquery.ui.draggable.js - * jquery.ui.mouse.js - * jquery.ui.position.js - * jquery.ui.resizable.js - */ -(function(c,j){var k={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},l={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&& -c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
        ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex", --1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
        ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", -"button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose= -b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&& -a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0]){e=c(this).css("z-index"); -isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ); -d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===f[0]&&e.shiftKey){g.focus(1);return false}}}); -c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
        ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
        ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(f, -h){h=c.isFunction(h)?{click:h,text:f}:h;f=c('').attr(h,true).unbind("click").click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&f.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g= -d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize, -position:f.position,size:f.size}}a=a===j?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f, -h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length=== -1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);if(g in k)e=true;if(g in -l)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled"); -break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=this.options,b,d,e= -this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-b,0));this.uiDialog.is(":data(resizable)")&& -this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.10",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length=== -0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(), -height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight); -b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("
        ");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("").appendTo(this.element).addClass("ui-slider-handle"); -if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur(); -else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e= -false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h=== -b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); -this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b, -g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true}, -_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a; -if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value= -this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max}, -_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate); -if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1, -1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.10"})})(jQuery); -;/* - * jQuery UI Tabs 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
        ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
      • #{label}
      • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& -e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= -d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| -(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); -this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= -this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); -if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); -this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ -g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", -function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; -this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= --1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; -d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= -d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, -e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); -j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); -if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, -this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, -load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, -"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, -url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.10"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k')}function E(a,b){d.extend(a,b);for(var c in b)if(b[c]== -null||b[c]==G)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.10"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){E(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase(); -f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('
        ')}}, -_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&& -b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f== -""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a, -c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b), -true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}E(a.settings,e||{}); -b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass); -this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup", -this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs, -function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null: -f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true}, -_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos= -d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b, -c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&& -d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout", -function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!= --1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a, -"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))), -parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left, -b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b); -this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, -_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"): -0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear= -false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay= -d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a); -else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b= -a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort, -g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l)throw"Invalid date";return w},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y", -RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+112?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay= -a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(), -b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n= -this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+r+"":f?"":''+r+"";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
        '+(c?h:"")+(this._isInRange(a,r)?'":"")+(c?"":h)+"
        ":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z= -this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",C=0;C1)switch(D){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]- -1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='
        '+(/all|left/.test(t)&&C==0?c?f:n:"")+(/all|right/.test(t)&&C==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,C>0||D>0,z,w)+'
        ';var A=j?'":"";for(t=0;t<7;t++){var q= -(t+h)%7;A+="=5?' class="ui-datepicker-week-end"':"")+'>'+s[q]+""}x+=A+"";A=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,A);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;A=l?6:Math.ceil((t+A)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O";var P=!j?"":'";for(t=0;t<7;t++){var F= -p?p.apply(a.input?a.input[0]:null,[q]):[true,""],B=q.getMonth()!=g,J=B&&!H||!F[0]||k&&qo;P+='";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+= -P+""}g++;if(g>11){g=0;m++}x+="
        '+this._get(a,"weekHeader")+"
        '+this._get(a,"calculateWeek")(q)+""+(B&&!v?" ":J?''+q.getDate()+"":''+q.getDate()+"")+"
        "+(l?""+(i[0]>0&&D==i[1]-1?'
        ':""):"");M+=x}I+=M}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
        ', -o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&& -l)?" ":""));a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";if(d.browser.mozilla)k+='";else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
        ";return k},_adjustInstDate:function(a,b,c){var e= -a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a, -"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a); -c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a, -"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker= -function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker, -[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.10";window["DP_jQuery_"+y]=d})(jQuery); -;/* - * jQuery UI Progressbar 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
        ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); -this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* -this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery); -;/* - * jQuery UI Effects 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/ - */ -jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], -16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, -a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= -a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", -"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, -0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, -211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, -d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0]; -h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c, -a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.10",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent", -border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c); -return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments); -else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c), -b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c, -a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c, -a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a== -e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ -e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); -;/* - * jQuery UI Effects Fade 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fade - * - * Depends: - * jquery.effects.core.js - */ -(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); -;/* - * jQuery UI Effects Fold 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fold - * - * Depends: - * jquery.effects.core.js - */ -(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], -10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); -;/* - * jQuery UI Effects Highlight 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Highlight - * - * Depends: - * jquery.effects.core.js - */ -(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& -this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); -;/* - * jQuery UI Effects Pulsate 1.8.10 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Pulsate - * - * Depends: - * jquery.effects.core.js - */ -(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); -b.dequeue()})})}})(jQuery); -; \ No newline at end of file diff --git a/js/js.js b/js/js.js deleted file mode 100644 index 7e44b7ce6d5..00000000000 --- a/js/js.js +++ /dev/null @@ -1,23 +0,0 @@ -var _l10ncache = {}; -function t(app,text){ - if( !( app in _l10ncache )){ - $.post( oc_webroot+'/l10n/javascript.php', {'app': app}, function(jsondata){ - _l10ncache[app] = jsondata.data; - }); - - // Bad answer ... - if( !( app in _l10ncache )){ - _l10ncache[app] = []; - } - } - if( typeof( _l10ncache[app][text] ) !== 'undefined' ){ - return _l10ncache[app][text]; - } - else{ - return text; - } -} - -$(document).ready(function(){ - // Put fancy stuff in here -}); diff --git a/js/setup.js b/js/setup.js deleted file mode 100644 index b4616b8b14c..00000000000 --- a/js/setup.js +++ /dev/null @@ -1,26 +0,0 @@ -$(document).ready(function() { - // Hide the MySQL config div if needed : - if(!$('#mysql').is(':checked') && $('#hasSQLite').val()=='true') { - $('#use_mysql').hide(); - } - - $('#datadirField').hide(250); - if($('#hasSQLite').val()=='true'){ - $('#databaseField').hide(250); - } - - $('#sqlite').click(function() { - $('#use_mysql').slideUp(250); - }); - - $('#mysql').click(function() { - $('#use_mysql').slideDown(250); - }); - - $('#showAdvanced').click(function() { - $('#datadirField').slideToggle(250); - if($('#hasSQLite').val()=='true'){ - $('#databaseField').slideToggle(250); - } - }); -}); diff --git a/l10n/de.php b/l10n/de.php deleted file mode 100644 index fb00345e69d..00000000000 --- a/l10n/de.php +++ /dev/null @@ -1,11 +0,0 @@ - "Sie wurden abgemeldet.", -"Set where to store the data." => "Speicherort der Daten", -"Advanced" => "Erweitert", -"prev" => "zurück", -"Login:" => "Benutzername:", -"Login failed!" => "Anmeldung Fehlgeschlagen!", -"next" => "weiter", -"Password:" => "Passwort:", -"Search" => "Suchen" -); diff --git a/l10n/de.po b/l10n/de.po deleted file mode 100644 index 19b12ca4aac..00000000000 --- a/l10n/de.po +++ /dev/null @@ -1,120 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../templates/404.php:15 -msgid "Error 404, Cloud not found" -msgstr "" - -#: ../templates/installation.php:6 -msgid "Welcome to ownCloud, your personnal cloud." -msgstr "" - -#: ../templates/installation.php:7 -msgid "To finish the installation, please follow the steps below." -msgstr "" - -#: ../templates/installation.php:26 -msgid "Create an admin account." -msgstr "" - -#: ../templates/installation.php:27 -msgid "Login:" -msgstr "Benutzername:" - -#: ../templates/installation.php:28 -msgid "Password:" -msgstr "Passwort:" - -#: ../templates/installation.php:31 -msgid "Advanced" -msgstr "Erweitert" - -#: ../templates/installation.php:34 -msgid "Set where to store the data." -msgstr "Speicherort der Daten" - -#: ../templates/installation.php:35 -msgid "Data directory:" -msgstr "" - -#: ../templates/installation.php:39 -msgid "Configure your database." -msgstr "" - -#: ../templates/installation.php:43 -msgid "I will use a SQLite database. You have nothing to do!" -msgstr "" - -#: ../templates/installation.php:46 -msgid "SQLite" -msgstr "" - -#: ../templates/installation.php:53 -msgid "I will use a MySQL database." -msgstr "" - -#: ../templates/installation.php:59 -msgid "Host:" -msgstr "" - -#: ../templates/installation.php:60 -msgid "Database name:" -msgstr "" - -#: ../templates/installation.php:61 -msgid "Table prefix:" -msgstr "" - -#: ../templates/installation.php:62 -msgid "MySQL user login:" -msgstr "" - -#: ../templates/installation.php:63 -msgid "MySQL user password:" -msgstr "" - -#: ../templates/layout.guest.php:17 ../templates/layout.guest.php:20 -msgid "" -"ownCloud is a personal cloud which runs " -"on your own server.

        " -msgstr "" - -#: ../templates/login.php:6 -msgid "Login failed!" -msgstr "Anmeldung Fehlgeschlagen!" - -#: ../templates/logout.php:1 -msgid "You are logged out." -msgstr "Sie wurden abgemeldet." - -#: ../templates/part.pagenavi.php:6 -msgid "prev" -msgstr "zurück" - -#: ../templates/part.pagenavi.php:26 -msgid "next" -msgstr "weiter" - -#: ../templates/part.searchbox.php:3 -msgid "Search" -msgstr "Suchen" - -#: ../templates/installation.php:68 -msgid "Finish setup" -msgstr "" diff --git a/l10n/javascript.php b/l10n/javascript.php deleted file mode 100644 index a1e84487f63..00000000000 --- a/l10n/javascript.php +++ /dev/null @@ -1,34 +0,0 @@ -. -* -*/ - -// Init owncloud -require_once('../lib/base.php'); - -$app = $_POST["app"]; - -// We send json data -header( "Content-Type: application/jsonrequest" ); -$l = new OC_L10N( $app ); - -echo json_encode( array( 'status' => 'success', 'data' => $l->getTranslations())); -?> diff --git a/l10n/l10n-de.php b/l10n/l10n-de.php deleted file mode 100644 index f3084b05df8..00000000000 --- a/l10n/l10n-de.php +++ /dev/null @@ -1,5 +0,0 @@ - 'd.m.Y', - 'datetime' => 'd.m.Y H:i:s', - 'time' => 'H:i:s' ); diff --git a/l10n/messages.pot b/l10n/messages.pot deleted file mode 100644 index 591a1c724e3..00000000000 --- a/l10n/messages.pot +++ /dev/null @@ -1,120 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../templates/404.php:15 -msgid "Error 404, Cloud not found" -msgstr "" - -#: ../templates/installation.php:6 -msgid "Welcome to ownCloud, your personnal cloud." -msgstr "" - -#: ../templates/installation.php:7 -msgid "To finish the installation, please follow the steps below." -msgstr "" - -#: ../templates/installation.php:26 -msgid "Create an admin account." -msgstr "" - -#: ../templates/installation.php:27 -msgid "Login:" -msgstr "" - -#: ../templates/installation.php:28 -msgid "Password:" -msgstr "" - -#: ../templates/installation.php:31 -msgid "Advanced" -msgstr "" - -#: ../templates/installation.php:34 -msgid "Set where to store the data." -msgstr "" - -#: ../templates/installation.php:35 -msgid "Data directory:" -msgstr "" - -#: ../templates/installation.php:39 -msgid "Configure your database." -msgstr "" - -#: ../templates/installation.php:43 -msgid "I will use a SQLite database. You have nothing to do!" -msgstr "" - -#: ../templates/installation.php:46 -msgid "SQLite" -msgstr "" - -#: ../templates/installation.php:53 -msgid "I will use a MySQL database." -msgstr "" - -#: ../templates/installation.php:59 -msgid "Host:" -msgstr "" - -#: ../templates/installation.php:60 -msgid "Database name:" -msgstr "" - -#: ../templates/installation.php:61 -msgid "Table prefix:" -msgstr "" - -#: ../templates/installation.php:62 -msgid "MySQL user login:" -msgstr "" - -#: ../templates/installation.php:63 -msgid "MySQL user password:" -msgstr "" - -#: ../templates/installation.php:68 -msgid "Finish setup" -msgstr "" - -#: ../templates/layout.guest.php:20 -msgid "" -"ownCloud is a personal cloud which runs " -"on your own server.

        " -msgstr "" - -#: ../templates/login.php:6 -msgid "Login failed!" -msgstr "" - -#: ../templates/logout.php:1 -msgid "You are logged out." -msgstr "" - -#: ../templates/part.pagenavi.php:6 -msgid "prev" -msgstr "" - -#: ../templates/part.pagenavi.php:26 -msgid "next" -msgstr "" - -#: ../templates/part.searchbox.php:3 -msgid "Search" -msgstr "" diff --git a/l10n/nl.php b/l10n/nl.php deleted file mode 100644 index 712444c8006..00000000000 --- a/l10n/nl.php +++ /dev/null @@ -1,27 +0,0 @@ -admin account." => "Maak een administrator account. aan", -"Welcome to ownCloud, your personnal cloud." => "Welkom by ownCloud, jouw persoonlijke cloud", -"You are logged out." => "Je bent afgemend.", -"MySQL user password:" => "MySQL wachtwoord", -"Error 404, Cloud not found" => "Fout 404, Cloud niet gevonden.", -"Database name:" => "Database naam:", -"Set where to store the data." => "Bepaal waar de gegevens opgeslagen moeten woorden.", -"Advanced" => "Geavanceerd", -"To finish the installation, please follow the steps below." => "Volg de volgende stappen om de instalatie af te ronden.", -"Host:" => "Host:", -"Table prefix:" => "Voorvoegsel voor tabelnaamen:", -"prev" => "vorige", -"Login:" => "Gebruikersnaam:", -"Login failed!" => "Aanmelden mislukt.", -"I will use a MySQL database." => "Er zal een MySQL database gebruikt woorden.", -"next" => "volgende", -"Password:" => "Wachtwoord:", -"SQLite" => "SQLite", -"MySQL user login:" => "MySQL gebruikers naam.", -"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud is een persoonlijke cloud die op je eigen server draait.

        ", -"Search" => "Zoeken", -"Data directory:" => "Gegevens map:", -"Finish setup" => "Instalatie afronden", -"Configure your database." => "Stel de database in.", -"I will use a SQLite database. You have nothing to do!" => "Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." -); diff --git a/l10n/nl.po b/l10n/nl.po deleted file mode 100644 index 7a819e81dd8..00000000000 --- a/l10n/nl.po +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Robin Appelman , 2011. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" -"PO-Revision-Date: 2011-06-20 14:19+0200\n" -"Last-Translator: Robin Appelman \n" -"Language-Team: American English \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../templates/404.php:15 -msgid "Error 404, Cloud not found" -msgstr "Fout 404, Cloud niet gevonden." - -#: ../templates/installation.php:6 -msgid "Welcome to ownCloud, your personnal cloud." -msgstr "Welkom by ownCloud, jouw persoonlijke cloud" - -#: ../templates/installation.php:7 -msgid "To finish the installation, please follow the steps below." -msgstr "Volg de volgende stappen om de instalatie af te ronden." - -#: ../templates/installation.php:26 -msgid "Create an admin account." -msgstr "Maak een administrator account. aan" - -#: ../templates/installation.php:27 -msgid "Login:" -msgstr "Gebruikersnaam:" - -#: ../templates/installation.php:28 -msgid "Password:" -msgstr "Wachtwoord:" - -#: ../templates/installation.php:31 -msgid "Advanced" -msgstr "Geavanceerd" - -#: ../templates/installation.php:34 -msgid "Set where to store the data." -msgstr "Bepaal waar de gegevens opgeslagen moeten woorden." - -#: ../templates/installation.php:35 -msgid "Data directory:" -msgstr "Gegevens map:" - -#: ../templates/installation.php:39 -msgid "Configure your database." -msgstr "Stel de database in." - -#: ../templates/installation.php:43 -msgid "I will use a SQLite database. You have nothing to do!" -msgstr "" -"Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." - -#: ../templates/installation.php:46 -msgid "SQLite" -msgstr "SQLite" - -#: ../templates/installation.php:53 -msgid "I will use a MySQL database." -msgstr "Er zal een MySQL database gebruikt woorden." - -#: ../templates/installation.php:59 -msgid "Host:" -msgstr "Host:" - -#: ../templates/installation.php:60 -msgid "Database name:" -msgstr "Database naam:" - -#: ../templates/installation.php:61 -msgid "Table prefix:" -msgstr "Voorvoegsel voor tabelnaamen:" - -#: ../templates/installation.php:62 -msgid "MySQL user login:" -msgstr "MySQL gebruikers naam." - -#: ../templates/installation.php:63 -msgid "MySQL user password:" -msgstr "MySQL wachtwoord" - -#: ../templates/installation.php:68 -msgid "Finish setup" -msgstr "Instalatie afronden" - -#: ../templates/layout.guest.php:20 -msgid "" -"ownCloud is a personal cloud which runs " -"on your own server.

        " -msgstr "" -"ownCloud is een persoonlijke cloud die " -"op je eigen server draait.

        " - -#: ../templates/login.php:6 -msgid "Login failed!" -msgstr "Aanmelden mislukt." - -#: ../templates/logout.php:1 -msgid "You are logged out." -msgstr "Je bent afgemend." - -#: ../templates/part.pagenavi.php:6 -msgid "prev" -msgstr "vorige" - -#: ../templates/part.pagenavi.php:26 -msgid "next" -msgstr "volgende" - -#: ../templates/part.searchbox.php:3 -msgid "Search" -msgstr "Zoeken" - - diff --git a/l10n/xgettextfiles b/l10n/xgettextfiles deleted file mode 100644 index b5d83a880d4..00000000000 --- a/l10n/xgettextfiles +++ /dev/null @@ -1,7 +0,0 @@ -../templates/404.php -../templates/installation.php -../templates/layout.guest.php -../templates/login.php -../templates/logout.php -../templates/part.pagenavi.php -../templates/part.searchbox.php diff --git a/lib/helper.php b/lib/helper.php index 072607f742b..6f7d7ce251e 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -44,6 +44,9 @@ class OC_HELPER { return $WEBROOT . '/apps/' . $app . $file; } } + else{ + $app = 'core'; + } return $WEBROOT . '/' . $app . $file; } @@ -58,14 +61,16 @@ class OC_HELPER { public static function imagePath( $app, $image ){ global $SERVERROOT; global $WEBROOT; + // Check if the app is in the app folder if( file_exists( "$SERVERROOT/apps/$app/img/$image" )){ return "$WEBROOT/apps/$app/img/$image"; } - if( !empty( $app )){ + elseif( !empty( $app )){ return "$WEBROOT/$app/img/$image"; - }else{ - return "$WEBROOT/img/$image"; + } + else{ + return "$WEBROOT/core/img/$image"; } } @@ -84,15 +89,15 @@ class OC_HELPER { // Is it a dir? if( $mimetype == "dir" ){ - return "$WEBROOT/img/places/folder.png"; + return "$WEBROOT/core/img/places/folder.png"; } // Icon exists? - if( file_exists( "$SERVERROOT/img/mimetypes/$mimetype.png" )){ - return "$WEBROOT/img/mimetypes/$mimetype.png"; + if( file_exists( "$SERVERROOT/core/img/mimetypes/$mimetype.png" )){ + return "$WEBROOT/core/img/mimetypes/$mimetype.png"; } else{ - return "$WEBROOT/img/mimetypes/file.png"; + return "$WEBROOT/core/img/mimetypes/file.png"; } } diff --git a/lib/template.php b/lib/template.php index 6b9a1c38e11..69065e1ea16 100644 --- a/lib/template.php +++ b/lib/template.php @@ -95,8 +95,8 @@ class OC_TEMPLATE{ global $SERVERROOT; // Get the right template folder - $template = "$SERVERROOT/templates/"; - if( $app != "core" && $app != "" ){ + $template = "$SERVERROOT/core/templates/"; + if( $app != "" ){ // Check if the app is in the app folder if( file_exists( "$SERVERROOT/apps/$app/templates/" )){ $template = "$SERVERROOT/apps/$app/templates/"; @@ -222,16 +222,24 @@ class OC_TEMPLATE{ foreach(OC_UTIL::$scripts as $script){ if(is_file("$SERVERROOT/apps/$script.js" )){ $page->append( "jsfiles", "$WEBROOT/apps/$script.js" ); - }else{ + } + elseif(is_file("$SERVERROOT/$script.js" )){ $page->append( "jsfiles", "$WEBROOT/$script.js" ); } + else{ + $page->append( "jsfiles", "$WEBROOT/core/$script.js" ); + } } foreach(OC_UTIL::$styles as $style){ if(is_file("$SERVERROOT/apps/$style.css" )){ $page->append( "cssfiles", "$WEBROOT/apps/$style.css" ); - }else{ + } + elseif(is_file("$SERVERROOT/$style.css" )){ $page->append( "cssfiles", "$WEBROOT/$style.css" ); } + else{ + $page->append( "cssfiles", "$WEBROOT/core/$style.css" ); + } } // Add css files and js files diff --git a/templates/404.php b/templates/404.php deleted file mode 100644 index b287571d166..00000000000 --- a/templates/404.php +++ /dev/null @@ -1,19 +0,0 @@ -printPage(); - exit; -} -?> -
        - " alt="ownCloud" /> -
          -
        • - t( 'Error 404, Cloud not found' ); ?>
          -

          -
        • -
        -
        \ No newline at end of file diff --git a/templates/error.php b/templates/error.php deleted file mode 100644 index ae3f029708f..00000000000 --- a/templates/error.php +++ /dev/null @@ -1,17 +0,0 @@ - -
        - " alt="ownCloud" /> -
          - -
        • -
          -

          -
        • - -
        -
        - diff --git a/templates/installation.php b/templates/installation.php deleted file mode 100644 index 93c00547ab9..00000000000 --- a/templates/installation.php +++ /dev/null @@ -1,70 +0,0 @@ -
        - ownCloud -
        - -

        - t( 'Welcome to ownCloud, your personnal cloud.' ); ?>
        - t( 'To finish the installation, please follow the steps below.' ); ?> -

        - - 0): ?> -
          - -
        • - - -

          - - - -
        • - -
        - - -
        - t( 'Create an admin account.' ); ?> -

        -

        -
        - - t( 'Advanced' ); ?> '> - -
        - t( 'Set where to store the data.' ); ?> -

        -
        - -
        - t( 'Configure your database.' ); ?> - - - -

        t( 'I will use a SQLite database. You have nothing to do!' ); ?>

        - - -

        />

        - - - - - - -

        t( 'I will use a MySQL database.' ); ?>

        - - -

        />

        - -
        -

        -

        -

        -

        -

        -
        - -
        - -

        -
        -
        diff --git a/templates/layout.admin.php b/templates/layout.admin.php deleted file mode 100644 index 1fcd4568f8c..00000000000 --- a/templates/layout.admin.php +++ /dev/null @@ -1,57 +0,0 @@ - - - - ownCloud - - - - - - - - - - - - - - -
        -
        - -
        - -
        - -
        -
        - - diff --git a/templates/layout.guest.php b/templates/layout.guest.php deleted file mode 100644 index ce99b00b9f6..00000000000 --- a/templates/layout.guest.php +++ /dev/null @@ -1,22 +0,0 @@ - - - - ownCloud - - - - - - - - - - - - - -

        t( 'ownCloud is a personal cloud which runs on your own server.

        ' ); ?> - - diff --git a/templates/layout.user.php b/templates/layout.user.php deleted file mode 100644 index f21db202a83..00000000000 --- a/templates/layout.user.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - ownCloud - - - - - - - - - - - - - - -
        -
        - -
        - -
        - -
        -
        - - diff --git a/templates/login.php b/templates/login.php deleted file mode 100644 index e0f6ce23e2e..00000000000 --- a/templates/login.php +++ /dev/null @@ -1,14 +0,0 @@ -
        - ownCloud -
        -
        - - t( 'Login failed!' ); ?> - - - - -
        -
        -
        - diff --git a/templates/logout.php b/templates/logout.php deleted file mode 100644 index 8cbbdd9cc8d..00000000000 --- a/templates/logout.php +++ /dev/null @@ -1 +0,0 @@ -t( 'You are logged out.' ); ?> \ No newline at end of file diff --git a/templates/part.pagenavi.php b/templates/part.pagenavi.php deleted file mode 100644 index 0602b793882..00000000000 --- a/templates/part.pagenavi.php +++ /dev/null @@ -1,31 +0,0 @@ -
        - - - - - - -
        - 0):?> - t( 'prev' ); ?>   - - - 0):?> - ... - - - -   - -   - - - - ... - - - - t( 'next' ); ?> - -
        -
        \ No newline at end of file diff --git a/templates/part.searchbox.php b/templates/part.searchbox.php deleted file mode 100644 index 7465a7326ee..00000000000 --- a/templates/part.searchbox.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file -- cgit v1.2.3 From 0f0d37b85cfd3aea57c1d54ff005d881b55af304 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Mon, 20 Jun 2011 18:51:06 +0200 Subject: fixed minor string omission --- admin/templates/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/templates/users.php b/admin/templates/users.php index c6ee57a61d5..0c26fd3bdf4 100644 --- a/admin/templates/users.php +++ b/admin/templates/users.php @@ -4,7 +4,7 @@ t( 'Name' ); ?> - Groups + t( 'Groups' ); ?> -- cgit v1.2.3 From d38e958ada1390c36112ab2b0b4b28d1cae3e1df Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Mon, 20 Jun 2011 19:21:42 +0200 Subject: enable/disable apps by clicking their status --- admin/ajax/disableapp.php | 9 +++++++++ admin/ajax/enableapp.php | 9 +++++++++ admin/apps.php | 2 +- admin/js/apps.js | 17 +++++++++++++++++ admin/templates/appsinst.php | 4 ++-- 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 admin/ajax/disableapp.php create mode 100644 admin/ajax/enableapp.php create mode 100644 admin/js/apps.js diff --git a/admin/ajax/disableapp.php b/admin/ajax/disableapp.php new file mode 100644 index 00000000000..d23f8de7ef0 --- /dev/null +++ b/admin/ajax/disableapp.php @@ -0,0 +1,9 @@ + diff --git a/admin/ajax/enableapp.php b/admin/ajax/enableapp.php new file mode 100644 index 00000000000..d988d7fd2df --- /dev/null +++ b/admin/ajax/enableapp.php @@ -0,0 +1,9 @@ + diff --git a/admin/apps.php b/admin/apps.php index 725128a7523..5eec7e626d3 100644 --- a/admin/apps.php +++ b/admin/apps.php @@ -30,6 +30,7 @@ if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' // Load the files we need OC_UTIL::addStyle( "admin", "apps" ); +OC_UTIL::addScript( "admin", "apps" ); if(isset($_GET['id'])) $id=$_GET['id']; else $id=0; @@ -42,7 +43,6 @@ if($installed){ $records = array(); OC_APP::setActiveNavigationEntry( "core_apps_installed" ); - echo count($apps); foreach($apps as $app){ $info=OC_APP::getAppInfo("$SERVERROOT/apps/$app/appinfo/info.xml"); $record = array( 'id' => $app, diff --git a/admin/js/apps.js b/admin/js/apps.js new file mode 100644 index 00000000000..4d8c68171bd --- /dev/null +++ b/admin/js/apps.js @@ -0,0 +1,17 @@ +$("div[x-use='appenableddiv']").live( "click", function(){ + appid = $(this).parent().parent().attr("x-uid"); + + if($(this).text() == "enabled"){ + $(this).html( "disabled" ); + $(this).parent().removeClass( "enabled" ); + $(this).parent().addClass( "disabled" ); + //$.post( "ajax/disableapp.php", $(appid).serialize(), function(data){} ); + $.post( "ajax/disableapp.php", { appid: appid }, function(data){ alert(data.status);}); + } + else if($(this).text() == "disabled"){ + $(this).html( "enabled" ); + $(this).parent().removeClass( "disabled" ); + $(this).parent().addClass( "enabled" ); + $.post( "ajax/enableapp.php", { appid: appid }, function(data){ alert(data.status);} ); + } +}); \ No newline at end of file diff --git a/admin/templates/appsinst.php b/admin/templates/appsinst.php index c1acc09d5d3..482273da1df 100644 --- a/admin/templates/appsinst.php +++ b/admin/templates/appsinst.php @@ -16,11 +16,11 @@ - + - t( $app['enabled'] ? 'enabled' : 'disabled' ); ?> +
        t( $app['enabled'] ? 'enabled' : 'disabled' ); ?>
        -- cgit v1.2.3 From eb1ce7819a16e9b780e1272e405950817d1de6dc Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 21:01:34 +0200 Subject: Fix linkTo() --- lib/helper.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/helper.php b/lib/helper.php index 6f7d7ce251e..8cd6ebf75a5 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -37,17 +37,24 @@ class OC_HELPER { global $WEBROOT; global $SERVERROOT; - if(!empty($app)) { + if( $app != '' ){ $app .= '/'; // Check if the app is in the app folder - if( file_exists( $SERVERROOT . '/apps/'. $app )){ + if( file_exists( $SERVERROOT . '/apps/'. $app.$file )){ return $WEBROOT . '/apps/' . $app . $file; } + else{ + return $WEBROOT . '/' . $app . $file; + } } else{ - $app = 'core'; + if( file_exists( $SERVERROOT . '/core/'. $file )){ + return $WEBROOT . '/core/'.$file; + } + else{ + return $WEBROOT . '/'.$file; + } } - return $WEBROOT . '/' . $app . $file; } /** -- cgit v1.2.3 From 06033914050633d51c45d6b5e79884bcc66283f8 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Mon, 20 Jun 2011 21:09:34 +0200 Subject: fixed page reload after logout --- index.php | 2 +- lib/setup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 5aaa8fb89c0..d1726676c66 100644 --- a/index.php +++ b/index.php @@ -47,7 +47,7 @@ elseif($not_installed OR $install_called) { elseif(OC_USER::isLoggedIn()) { if(isset($_GET["logout"]) and ($_GET["logout"])) { OC_USER::logout(); - header("Location: $WEBROOT"); + header("Location: ".$WEBROOT.'/'); exit(); } else { diff --git a/lib/setup.php b/lib/setup.php index 5905261f18f..bdb5dcc4e24 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -23,7 +23,7 @@ if(isset($_POST['install']) AND $_POST['install']=='true') { OC_TEMPLATE::printGuestPage("", "installation", $options); } else { - header("Location: $WEBROOT$SUBURI"); + header("Location: ".$WEBROOT.'/'); exit(); } } -- cgit v1.2.3 From 61993419ecc16a7aa7046186e29e1dc92cf71cb7 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 21:54:21 +0200 Subject: New i18n-structure --- admin/l10n/messages.pot | 91 -------------------------------- core/ajax/translations.php | 34 ++++++++++++ core/l10n/de.po | 120 ------------------------------------------ core/l10n/javascript.php | 34 ------------ core/l10n/messages.pot | 120 ------------------------------------------ core/l10n/nl.po | 125 -------------------------------------------- l10n/da/log.po | 67 ++++++++++++++++++++++++ l10n/de/core.po | 120 ++++++++++++++++++++++++++++++++++++++++++ l10n/de/log.po | 68 ++++++++++++++++++++++++ l10n/l10n.pl | 104 ++++++++++++++++++++++++++++++++++++ l10n/nl/core.po | 125 ++++++++++++++++++++++++++++++++++++++++++++ l10n/nl/log.po | 66 +++++++++++++++++++++++ l10n/nl/settings.po | 87 ++++++++++++++++++++++++++++++ l10n/templates/admin.pot | 91 ++++++++++++++++++++++++++++++++ l10n/templates/core.pot | 120 ++++++++++++++++++++++++++++++++++++++++++ l10n/templates/log.pot | 66 +++++++++++++++++++++++ l10n/templates/settings.pot | 86 ++++++++++++++++++++++++++++++ lib/l10n.php | 8 +-- log/l10n/da.po | 67 ------------------------ log/l10n/de.po | 68 ------------------------ log/l10n/log | 4 -- log/l10n/messages.pot | 66 ----------------------- log/l10n/nl.po | 66 ----------------------- settings/l10n/messages.pot | 86 ------------------------------ settings/l10n/nl.po | 87 ------------------------------ 25 files changed, 1038 insertions(+), 938 deletions(-) delete mode 100644 admin/l10n/messages.pot create mode 100644 core/ajax/translations.php delete mode 100644 core/l10n/de.po delete mode 100644 core/l10n/javascript.php delete mode 100644 core/l10n/messages.pot delete mode 100644 core/l10n/nl.po create mode 100644 l10n/da/log.po create mode 100644 l10n/de/core.po create mode 100644 l10n/de/log.po create mode 100644 l10n/l10n.pl create mode 100644 l10n/nl/core.po create mode 100644 l10n/nl/log.po create mode 100644 l10n/nl/settings.po create mode 100644 l10n/templates/admin.pot create mode 100644 l10n/templates/core.pot create mode 100644 l10n/templates/log.pot create mode 100644 l10n/templates/settings.pot delete mode 100644 log/l10n/da.po delete mode 100644 log/l10n/de.po delete mode 100644 log/l10n/log delete mode 100644 log/l10n/messages.pot delete mode 100644 log/l10n/nl.po delete mode 100644 settings/l10n/messages.pot delete mode 100644 settings/l10n/nl.po diff --git a/admin/l10n/messages.pot b/admin/l10n/messages.pot deleted file mode 100644 index c30a4454311..00000000000 --- a/admin/l10n/messages.pot +++ /dev/null @@ -1,91 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:32+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../templates/app.php:22 -msgid "read more" -msgstr "" - -#: ../templates/app.php:24 -msgid "INSTALL" -msgstr "" - -#: ../templates/app_noconn.php:6 ../templates/apps.php:6 -msgid "Apps Repository" -msgstr "" - -#: ../templates/app_noconn.php:7 -msgid "Cannot connect to apps repository" -msgstr "" - -#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 -#: ../templates/users.php:50 -msgid "Name" -msgstr "" - -#: ../templates/apps.php:14 -msgid "Modified" -msgstr "" - -#: ../templates/system.php:6 -msgid "Administration" -msgstr "" - -#: ../templates/system.php:7 -msgid "System Settings" -msgstr "" - -#: ../templates/users.php:13 -msgid "Add user" -msgstr "" - -#: ../templates/users.php:21 -msgid "Password" -msgstr "" - -#: ../templates/users.php:30 -msgid "Create user" -msgstr "" - -#: ../templates/users.php:40 ../templates/users.php:68 -msgid "remove" -msgstr "" - -#: ../templates/users.php:46 -msgid "Groups" -msgstr "" - -#: ../templates/users.php:58 -msgid "Create group" -msgstr "" - -#: ../templates/users.php:94 -msgid "Force new password:" -msgstr "" - -#: ../templates/users.php:96 -msgid "Set" -msgstr "" - -#: ../templates/users.php:102 -msgid "Do you really want to delete user" -msgstr "" - -#: ../templates/users.php:109 -msgid "Do you really want to delete group" -msgstr "" diff --git a/core/ajax/translations.php b/core/ajax/translations.php new file mode 100644 index 00000000000..a1e84487f63 --- /dev/null +++ b/core/ajax/translations.php @@ -0,0 +1,34 @@ +. +* +*/ + +// Init owncloud +require_once('../lib/base.php'); + +$app = $_POST["app"]; + +// We send json data +header( "Content-Type: application/jsonrequest" ); +$l = new OC_L10N( $app ); + +echo json_encode( array( 'status' => 'success', 'data' => $l->getTranslations())); +?> diff --git a/core/l10n/de.po b/core/l10n/de.po deleted file mode 100644 index 19b12ca4aac..00000000000 --- a/core/l10n/de.po +++ /dev/null @@ -1,120 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../templates/404.php:15 -msgid "Error 404, Cloud not found" -msgstr "" - -#: ../templates/installation.php:6 -msgid "Welcome to ownCloud, your personnal cloud." -msgstr "" - -#: ../templates/installation.php:7 -msgid "To finish the installation, please follow the steps below." -msgstr "" - -#: ../templates/installation.php:26 -msgid "Create an admin account." -msgstr "" - -#: ../templates/installation.php:27 -msgid "Login:" -msgstr "Benutzername:" - -#: ../templates/installation.php:28 -msgid "Password:" -msgstr "Passwort:" - -#: ../templates/installation.php:31 -msgid "Advanced" -msgstr "Erweitert" - -#: ../templates/installation.php:34 -msgid "Set where to store the data." -msgstr "Speicherort der Daten" - -#: ../templates/installation.php:35 -msgid "Data directory:" -msgstr "" - -#: ../templates/installation.php:39 -msgid "Configure your database." -msgstr "" - -#: ../templates/installation.php:43 -msgid "I will use a SQLite database. You have nothing to do!" -msgstr "" - -#: ../templates/installation.php:46 -msgid "SQLite" -msgstr "" - -#: ../templates/installation.php:53 -msgid "I will use a MySQL database." -msgstr "" - -#: ../templates/installation.php:59 -msgid "Host:" -msgstr "" - -#: ../templates/installation.php:60 -msgid "Database name:" -msgstr "" - -#: ../templates/installation.php:61 -msgid "Table prefix:" -msgstr "" - -#: ../templates/installation.php:62 -msgid "MySQL user login:" -msgstr "" - -#: ../templates/installation.php:63 -msgid "MySQL user password:" -msgstr "" - -#: ../templates/layout.guest.php:17 ../templates/layout.guest.php:20 -msgid "" -"ownCloud is a personal cloud which runs " -"on your own server.

        " -msgstr "" - -#: ../templates/login.php:6 -msgid "Login failed!" -msgstr "Anmeldung Fehlgeschlagen!" - -#: ../templates/logout.php:1 -msgid "You are logged out." -msgstr "Sie wurden abgemeldet." - -#: ../templates/part.pagenavi.php:6 -msgid "prev" -msgstr "zurück" - -#: ../templates/part.pagenavi.php:26 -msgid "next" -msgstr "weiter" - -#: ../templates/part.searchbox.php:3 -msgid "Search" -msgstr "Suchen" - -#: ../templates/installation.php:68 -msgid "Finish setup" -msgstr "" diff --git a/core/l10n/javascript.php b/core/l10n/javascript.php deleted file mode 100644 index a1e84487f63..00000000000 --- a/core/l10n/javascript.php +++ /dev/null @@ -1,34 +0,0 @@ -. -* -*/ - -// Init owncloud -require_once('../lib/base.php'); - -$app = $_POST["app"]; - -// We send json data -header( "Content-Type: application/jsonrequest" ); -$l = new OC_L10N( $app ); - -echo json_encode( array( 'status' => 'success', 'data' => $l->getTranslations())); -?> diff --git a/core/l10n/messages.pot b/core/l10n/messages.pot deleted file mode 100644 index 591a1c724e3..00000000000 --- a/core/l10n/messages.pot +++ /dev/null @@ -1,120 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../templates/404.php:15 -msgid "Error 404, Cloud not found" -msgstr "" - -#: ../templates/installation.php:6 -msgid "Welcome to ownCloud, your personnal cloud." -msgstr "" - -#: ../templates/installation.php:7 -msgid "To finish the installation, please follow the steps below." -msgstr "" - -#: ../templates/installation.php:26 -msgid "Create an admin account." -msgstr "" - -#: ../templates/installation.php:27 -msgid "Login:" -msgstr "" - -#: ../templates/installation.php:28 -msgid "Password:" -msgstr "" - -#: ../templates/installation.php:31 -msgid "Advanced" -msgstr "" - -#: ../templates/installation.php:34 -msgid "Set where to store the data." -msgstr "" - -#: ../templates/installation.php:35 -msgid "Data directory:" -msgstr "" - -#: ../templates/installation.php:39 -msgid "Configure your database." -msgstr "" - -#: ../templates/installation.php:43 -msgid "I will use a SQLite database. You have nothing to do!" -msgstr "" - -#: ../templates/installation.php:46 -msgid "SQLite" -msgstr "" - -#: ../templates/installation.php:53 -msgid "I will use a MySQL database." -msgstr "" - -#: ../templates/installation.php:59 -msgid "Host:" -msgstr "" - -#: ../templates/installation.php:60 -msgid "Database name:" -msgstr "" - -#: ../templates/installation.php:61 -msgid "Table prefix:" -msgstr "" - -#: ../templates/installation.php:62 -msgid "MySQL user login:" -msgstr "" - -#: ../templates/installation.php:63 -msgid "MySQL user password:" -msgstr "" - -#: ../templates/installation.php:68 -msgid "Finish setup" -msgstr "" - -#: ../templates/layout.guest.php:20 -msgid "" -"ownCloud is a personal cloud which runs " -"on your own server.

        " -msgstr "" - -#: ../templates/login.php:6 -msgid "Login failed!" -msgstr "" - -#: ../templates/logout.php:1 -msgid "You are logged out." -msgstr "" - -#: ../templates/part.pagenavi.php:6 -msgid "prev" -msgstr "" - -#: ../templates/part.pagenavi.php:26 -msgid "next" -msgstr "" - -#: ../templates/part.searchbox.php:3 -msgid "Search" -msgstr "" diff --git a/core/l10n/nl.po b/core/l10n/nl.po deleted file mode 100644 index 7a819e81dd8..00000000000 --- a/core/l10n/nl.po +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Robin Appelman , 2011. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" -"PO-Revision-Date: 2011-06-20 14:19+0200\n" -"Last-Translator: Robin Appelman \n" -"Language-Team: American English \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../templates/404.php:15 -msgid "Error 404, Cloud not found" -msgstr "Fout 404, Cloud niet gevonden." - -#: ../templates/installation.php:6 -msgid "Welcome to ownCloud, your personnal cloud." -msgstr "Welkom by ownCloud, jouw persoonlijke cloud" - -#: ../templates/installation.php:7 -msgid "To finish the installation, please follow the steps below." -msgstr "Volg de volgende stappen om de instalatie af te ronden." - -#: ../templates/installation.php:26 -msgid "Create an admin account." -msgstr "Maak een administrator account. aan" - -#: ../templates/installation.php:27 -msgid "Login:" -msgstr "Gebruikersnaam:" - -#: ../templates/installation.php:28 -msgid "Password:" -msgstr "Wachtwoord:" - -#: ../templates/installation.php:31 -msgid "Advanced" -msgstr "Geavanceerd" - -#: ../templates/installation.php:34 -msgid "Set where to store the data." -msgstr "Bepaal waar de gegevens opgeslagen moeten woorden." - -#: ../templates/installation.php:35 -msgid "Data directory:" -msgstr "Gegevens map:" - -#: ../templates/installation.php:39 -msgid "Configure your database." -msgstr "Stel de database in." - -#: ../templates/installation.php:43 -msgid "I will use a SQLite database. You have nothing to do!" -msgstr "" -"Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." - -#: ../templates/installation.php:46 -msgid "SQLite" -msgstr "SQLite" - -#: ../templates/installation.php:53 -msgid "I will use a MySQL database." -msgstr "Er zal een MySQL database gebruikt woorden." - -#: ../templates/installation.php:59 -msgid "Host:" -msgstr "Host:" - -#: ../templates/installation.php:60 -msgid "Database name:" -msgstr "Database naam:" - -#: ../templates/installation.php:61 -msgid "Table prefix:" -msgstr "Voorvoegsel voor tabelnaamen:" - -#: ../templates/installation.php:62 -msgid "MySQL user login:" -msgstr "MySQL gebruikers naam." - -#: ../templates/installation.php:63 -msgid "MySQL user password:" -msgstr "MySQL wachtwoord" - -#: ../templates/installation.php:68 -msgid "Finish setup" -msgstr "Instalatie afronden" - -#: ../templates/layout.guest.php:20 -msgid "" -"ownCloud is a personal cloud which runs " -"on your own server.

        " -msgstr "" -"ownCloud is een persoonlijke cloud die " -"op je eigen server draait.

        " - -#: ../templates/login.php:6 -msgid "Login failed!" -msgstr "Aanmelden mislukt." - -#: ../templates/logout.php:1 -msgid "You are logged out." -msgstr "Je bent afgemend." - -#: ../templates/part.pagenavi.php:6 -msgid "prev" -msgstr "vorige" - -#: ../templates/part.pagenavi.php:26 -msgid "next" -msgstr "volgende" - -#: ../templates/part.searchbox.php:3 -msgid "Search" -msgstr "Zoeken" - - diff --git a/l10n/da/log.po b/l10n/da/log.po new file mode 100644 index 00000000000..5a88aedee94 --- /dev/null +++ b/l10n/da/log.po @@ -0,0 +1,67 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Mikkel Bjerg Larsen , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 16:53+0200\n" +"PO-Revision-Date: 2011-06-19 21:09+0200\n" +"Last-Translator: Mikkel Bjerg Larsen \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/index.php:4 +msgid "Filter:" +msgstr "Filter:" + +#: ../templates/index.php:7 +msgid "Logins" +msgstr "Logins" + +#: ../templates/index.php:8 +msgid "Logouts" +msgstr "Logouts" + +#: ../templates/index.php:9 +msgid "Downloads" +msgstr "Downloads" + +#: ../templates/index.php:10 +msgid "Uploads" +msgstr "Uploads" + +#: ../templates/index.php:11 +msgid "Creations" +msgstr "Oprettelser" + +#: ../templates/index.php:12 +msgid "Deletions" +msgstr "Sletninger" + +#: ../templates/index.php:15 +msgid "Show:" +msgstr "Vis:" + +#: ../templates/index.php:16 +msgid "entries per page." +msgstr "poster pr side." + +#: ../templates/index.php:26 +msgid "What" +msgstr "Hvilket" + +#: ../templates/index.php:27 +msgid "When" +msgstr "Hvornår" + +#: ../templates/index.php:45 +msgid "Clear log entries before" +msgstr "Slet log poster før" + diff --git a/l10n/de/core.po b/l10n/de/core.po new file mode 100644 index 00000000000..19b12ca4aac --- /dev/null +++ b/l10n/de/core.po @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "" + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "" + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "" + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "" + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "Benutzername:" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "Passwort:" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "Erweitert" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "Speicherort der Daten" + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "" + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "" + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "" + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "" + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "" + +#: ../templates/layout.guest.php:17 ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

        " +msgstr "" + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "Anmeldung Fehlgeschlagen!" + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "Sie wurden abgemeldet." + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "zurück" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "weiter" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "Suchen" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "" diff --git a/l10n/de/log.po b/l10n/de/log.po new file mode 100644 index 00000000000..a901754f1a6 --- /dev/null +++ b/l10n/de/log.po @@ -0,0 +1,68 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Jakob Sack , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 16:44+0200\n" +"PO-Revision-Date: 2011-06-19 16:54+0200\n" +"Last-Translator: Jakob Sack \n" +"Language-Team: German \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: ../templates/index.php:4 +msgid "Filter:" +msgstr "Filter:" + +#: ../templates/index.php:7 +msgid "Logins" +msgstr "Anmeldungen" + +#: ../templates/index.php:8 +msgid "Logouts" +msgstr "Abmeldungen" + +#: ../templates/index.php:9 +msgid "Downloads" +msgstr "Downloads" + +#: ../templates/index.php:10 +msgid "Uploads" +msgstr "Uploads" + +#: ../templates/index.php:11 +msgid "Creations" +msgstr "Erstellungen" + +#: ../templates/index.php:12 +msgid "Deletions" +msgstr "Löschungen" + +#: ../templates/index.php:15 +msgid "Show:" +msgstr "Zeige" + +#: ../templates/index.php:16 +msgid "entries per page." +msgstr "Einträge pro Seite" + +#: ../templates/index.php:26 +msgid "What" +msgstr "Was" + +#: ../templates/index.php:27 +msgid "When" +msgstr "Wann" + +#: ../templates/index.php:45 +msgid "Clear log entries before" +msgstr "Lösche Einträge vor dem" + + diff --git a/l10n/l10n.pl b/l10n/l10n.pl new file mode 100644 index 00000000000..5463e34e4dc --- /dev/null +++ b/l10n/l10n.pl @@ -0,0 +1,104 @@ +#!/usr/bin/perl +use strict; +use Locale::PO; +use Cwd; +use Data::Dumper; + +sub crawl{ + my( $dir ) = @_; + my @found = (); + + opendir( DIR, $dir ); + my @files = readdir( DIR ); + closedir( DIR ); + + foreach my $i ( @files ){ + next if substr( $i, 0, 1 ) eq '.'; + if( -d $dir.'/'.$i ){ + push( @found, crawl( $dir.'/'.$i )); + } + elsif( $i eq 'xgettextfiles' ){ + push( @found, $dir ); + } + } + + return @found; +} + +my $task = shift( @ARGV ); +my $place = '..'; + +die( "Usuage: l10n.pl task\ntask: read, write\n") unless $task && $place; + +# Where are i18n-files? +my @dirs = crawl( $place ); + +# Languages +mkdir( 'templates' ) unless -d 'templates'; + +my @languages = (); +opendir( DIR, '.' ); +my @files = readdir( DIR ); +closedir( DIR ); +foreach my $i ( @files ){ + push( @languages, $i ) if -d $i && substr( $i, 0, 1 ) ne '.'; +} + +# Our current position +my $whereami = cwd(); + +if( $task eq 'read' ){ + foreach my $dir ( @dirs ){ + my @temp = split( /\//, $dir ); + pop( @temp ); + my $app = pop( @temp ); + chdir( $dir ); + foreach my $language ( @languages ){ + my $output = "${whereami}/$language/$app.po"; + $output .= 't' if $language eq 'templates'; + + if( -e $output ){ + `xgettext --files-from=xgettextfiles --join-existing --output="$output" --keyword=t` + } + else{ + `xgettext --files-from=xgettextfiles --output="$output" --keyword=t` + } + } + chdir( $whereami ); + } +} +elsif( $task eq 'write' ){ + foreach my $dir ( @dirs ){ + my @temp = split( /\//, $dir ); + pop( @temp ); + my $app = pop( @temp ); + chdir( $dir ); + foreach my $language ( @languages ){ + next if $language eq 'templates'; + + my $input = "${whereami}/$language/$app.po"; + next unless -e $input; + + my $hash = Locale::PO->load_file_ashash( $input ); + + # Create array + my @strings = (); + foreach my $key ( keys( %{$hash} )){ + next if $key eq '""'; + next if $hash->{$key}->msgstr() eq '""'; + push( @strings, $hash->{$key}->msgid()." => ".$hash->{$key}->msgstr()); + } + + # Write PHP file + open( OUT, ">$lang.php" ); + print OUT ", 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: 2011-06-20 14:19+0200\n" +"Last-Translator: Robin Appelman \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "Fout 404, Cloud niet gevonden." + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "Welkom by ownCloud, jouw persoonlijke cloud" + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "Volg de volgende stappen om de instalatie af te ronden." + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "Maak een administrator account. aan" + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "Gebruikersnaam:" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "Wachtwoord:" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "Geavanceerd" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "Bepaal waar de gegevens opgeslagen moeten woorden." + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "Gegevens map:" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "Stel de database in." + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "" +"Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "SQLite" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "Er zal een MySQL database gebruikt woorden." + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "Host:" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "Database naam:" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "Voorvoegsel voor tabelnaamen:" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "MySQL gebruikers naam." + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "MySQL wachtwoord" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "Instalatie afronden" + +#: ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

        " +msgstr "" +"ownCloud is een persoonlijke cloud die " +"op je eigen server draait.

        " + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "Aanmelden mislukt." + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "Je bent afgemend." + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "vorige" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "volgende" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "Zoeken" + + diff --git a/l10n/nl/log.po b/l10n/nl/log.po new file mode 100644 index 00000000000..2da2355a3ab --- /dev/null +++ b/l10n/nl/log.po @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 16:53+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:4 +msgid "Filter:" +msgstr "" + +#: ../templates/index.php:7 +msgid "Logins" +msgstr "" + +#: ../templates/index.php:8 +msgid "Logouts" +msgstr "" + +#: ../templates/index.php:9 +msgid "Downloads" +msgstr "" + +#: ../templates/index.php:10 +msgid "Uploads" +msgstr "" + +#: ../templates/index.php:11 +msgid "Creations" +msgstr "" + +#: ../templates/index.php:12 +msgid "Deletions" +msgstr "" + +#: ../templates/index.php:15 +msgid "Show:" +msgstr "" + +#: ../templates/index.php:16 +msgid "entries per page." +msgstr "" + +#: ../templates/index.php:26 +msgid "What" +msgstr "" + +#: ../templates/index.php:27 +msgid "When" +msgstr "" + +#: ../templates/index.php:45 +msgid "Clear log entries before" +msgstr "" diff --git a/l10n/nl/settings.po b/l10n/nl/settings.po new file mode 100644 index 00000000000..5b38f84b775 --- /dev/null +++ b/l10n/nl/settings.po @@ -0,0 +1,87 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Robin Appelman , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 14:47+0200\n" +"PO-Revision-Date: 2011-06-20 14:48+0200\n" +"Last-Translator: Robin Appelman \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/index.php:3 +msgid "Account information" +msgstr "Gebruiks gegevens" + +#: ../templates/index.php:5 +msgid "You're currently using" +msgstr "Je gebruikt momenteel" + +#: ../templates/index.php:5 +msgid "of your" +msgstr "van de" + +#: ../templates/index.php:5 +msgid "space" +msgstr "beschikbare ruimte." + +#: ../templates/index.php:11 +msgid "Change Password" +msgstr "Wachtwoord aanpassen" + +#: ../templates/index.php:12 +msgid "Your password got changed" +msgstr "Je wachtwoord is aangepast" + +#: ../templates/index.php:15 +msgid "Old password:" +msgstr "Oud wachtwoord:" + +#: ../templates/index.php:19 +msgid "New password" +msgstr "Nieuw wachtwoord" + +#: ../templates/index.php:24 +msgid "Show new password" +msgstr "Toon nieuw wachtwoord" + +#: ../templates/index.php:34 +msgid "Language" +msgstr "Taal" + +#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 +msgid "Authentication error" +msgstr "Authenticatie fout." + +#: ../ajax/changepassword.php:19 +msgid "You have to enter the old and the new password!" +msgstr "Je moet het oude en nieuwe wachtwoord invullen." + +#: ../ajax/changepassword.php:25 +msgid "Your old password is wrong!" +msgstr "Het oude wachtwoord is verkeerd." + +#: ../ajax/changepassword.php:31 +msgid "Password changed" +msgstr "Wachtwoord aangepast" + +#: ../ajax/changepassword.php:34 +msgid "Unable to change password" +msgstr "Wachtwoord aanpassen is niet mogenlijk" + +#: ../ajax/setlanguage.php:21 +msgid "Language changed" +msgstr "Taal aangepast" + +#: ../ajax/setlanguage.php:23 +msgid "Invalid request" +msgstr "Ongeldige aanvraag" + diff --git a/l10n/templates/admin.pot b/l10n/templates/admin.pot new file mode 100644 index 00000000000..c30a4454311 --- /dev/null +++ b/l10n/templates/admin.pot @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:32+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/app.php:22 +msgid "read more" +msgstr "" + +#: ../templates/app.php:24 +msgid "INSTALL" +msgstr "" + +#: ../templates/app_noconn.php:6 ../templates/apps.php:6 +msgid "Apps Repository" +msgstr "" + +#: ../templates/app_noconn.php:7 +msgid "Cannot connect to apps repository" +msgstr "" + +#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 +#: ../templates/users.php:50 +msgid "Name" +msgstr "" + +#: ../templates/apps.php:14 +msgid "Modified" +msgstr "" + +#: ../templates/system.php:6 +msgid "Administration" +msgstr "" + +#: ../templates/system.php:7 +msgid "System Settings" +msgstr "" + +#: ../templates/users.php:13 +msgid "Add user" +msgstr "" + +#: ../templates/users.php:21 +msgid "Password" +msgstr "" + +#: ../templates/users.php:30 +msgid "Create user" +msgstr "" + +#: ../templates/users.php:40 ../templates/users.php:68 +msgid "remove" +msgstr "" + +#: ../templates/users.php:46 +msgid "Groups" +msgstr "" + +#: ../templates/users.php:58 +msgid "Create group" +msgstr "" + +#: ../templates/users.php:94 +msgid "Force new password:" +msgstr "" + +#: ../templates/users.php:96 +msgid "Set" +msgstr "" + +#: ../templates/users.php:102 +msgid "Do you really want to delete user" +msgstr "" + +#: ../templates/users.php:109 +msgid "Do you really want to delete group" +msgstr "" diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot new file mode 100644 index 00000000000..591a1c724e3 --- /dev/null +++ b/l10n/templates/core.pot @@ -0,0 +1,120 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "" + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "" + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "" + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "" + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "" + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "" + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "" + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "" + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "" + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "" + +#: ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

        " +msgstr "" + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "" + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "" + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "" diff --git a/l10n/templates/log.pot b/l10n/templates/log.pot new file mode 100644 index 00000000000..2da2355a3ab --- /dev/null +++ b/l10n/templates/log.pot @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 16:53+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:4 +msgid "Filter:" +msgstr "" + +#: ../templates/index.php:7 +msgid "Logins" +msgstr "" + +#: ../templates/index.php:8 +msgid "Logouts" +msgstr "" + +#: ../templates/index.php:9 +msgid "Downloads" +msgstr "" + +#: ../templates/index.php:10 +msgid "Uploads" +msgstr "" + +#: ../templates/index.php:11 +msgid "Creations" +msgstr "" + +#: ../templates/index.php:12 +msgid "Deletions" +msgstr "" + +#: ../templates/index.php:15 +msgid "Show:" +msgstr "" + +#: ../templates/index.php:16 +msgid "entries per page." +msgstr "" + +#: ../templates/index.php:26 +msgid "What" +msgstr "" + +#: ../templates/index.php:27 +msgid "When" +msgstr "" + +#: ../templates/index.php:45 +msgid "Clear log entries before" +msgstr "" diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot new file mode 100644 index 00000000000..705d583ee76 --- /dev/null +++ b/l10n/templates/settings.pot @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 14:47+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:3 +msgid "Account information" +msgstr "" + +#: ../templates/index.php:5 +msgid "You're currently using" +msgstr "" + +#: ../templates/index.php:5 +msgid "of your" +msgstr "" + +#: ../templates/index.php:5 +msgid "space" +msgstr "" + +#: ../templates/index.php:11 +msgid "Change Password" +msgstr "" + +#: ../templates/index.php:12 +msgid "Your password got changed" +msgstr "" + +#: ../templates/index.php:15 +msgid "Old password:" +msgstr "" + +#: ../templates/index.php:19 +msgid "New password" +msgstr "" + +#: ../templates/index.php:24 +msgid "Show new password" +msgstr "" + +#: ../templates/index.php:34 +msgid "Language" +msgstr "" + +#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 +msgid "Authentication error" +msgstr "" + +#: ../ajax/changepassword.php:19 +msgid "You have to enter the old and the new password!" +msgstr "" + +#: ../ajax/changepassword.php:25 +msgid "Your old password is wrong!" +msgstr "" + +#: ../ajax/changepassword.php:31 +msgid "Password changed" +msgstr "" + +#: ../ajax/changepassword.php:34 +msgid "Unable to change password" +msgstr "" + +#: ../ajax/setlanguage.php:21 +msgid "Language changed" +msgstr "" + +#: ../ajax/setlanguage.php:23 +msgid "Invalid request" +msgstr "" diff --git a/lib/l10n.php b/lib/l10n.php index 729310825dd..ff0238241a6 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -81,9 +81,9 @@ class OC_L10N{ } } - if( file_exists( $SERVERROOT.'/l10n/l10n-'.$lang.'.php' )){ + if( file_exists( $SERVERROOT.'/core/l10n/l10n-'.$lang.'.php' )){ // Include the file, save the data from $CONFIG - include( $SERVERROOT.'/l10n/l10n-'.$lang.'.php' ); + include( $SERVERROOT.'/core/l10n/l10n-'.$lang.'.php' ); if( isset( $LOCALIZATIONS ) && is_array( $LOCALIZATIONS )){ $this->localizations = array_merge( $this->localizations, $LOCALIZATIONS ); } @@ -231,8 +231,8 @@ class OC_L10N{ global $SERVERROOT; // find the i18n dir - $i18ndir = $SERVERROOT.'/l10n/'; - if( $app != 'core' && $app != '' ){ + $i18ndir = $SERVERROOT.'/core/l10n/'; + if( $app != '' ){ // Check if the app is in the app folder if( file_exists( $SERVERROOT.'/apps/'.$app.'/l10n/' )){ $i18ndir = $SERVERROOT.'/apps/'.$app.'/l10n/'; diff --git a/log/l10n/da.po b/log/l10n/da.po deleted file mode 100644 index 5a88aedee94..00000000000 --- a/log/l10n/da.po +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Mikkel Bjerg Larsen , 2011. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 16:53+0200\n" -"PO-Revision-Date: 2011-06-19 21:09+0200\n" -"Last-Translator: Mikkel Bjerg Larsen \n" -"Language-Team: American English \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../templates/index.php:4 -msgid "Filter:" -msgstr "Filter:" - -#: ../templates/index.php:7 -msgid "Logins" -msgstr "Logins" - -#: ../templates/index.php:8 -msgid "Logouts" -msgstr "Logouts" - -#: ../templates/index.php:9 -msgid "Downloads" -msgstr "Downloads" - -#: ../templates/index.php:10 -msgid "Uploads" -msgstr "Uploads" - -#: ../templates/index.php:11 -msgid "Creations" -msgstr "Oprettelser" - -#: ../templates/index.php:12 -msgid "Deletions" -msgstr "Sletninger" - -#: ../templates/index.php:15 -msgid "Show:" -msgstr "Vis:" - -#: ../templates/index.php:16 -msgid "entries per page." -msgstr "poster pr side." - -#: ../templates/index.php:26 -msgid "What" -msgstr "Hvilket" - -#: ../templates/index.php:27 -msgid "When" -msgstr "Hvornår" - -#: ../templates/index.php:45 -msgid "Clear log entries before" -msgstr "Slet log poster før" - diff --git a/log/l10n/de.po b/log/l10n/de.po deleted file mode 100644 index a901754f1a6..00000000000 --- a/log/l10n/de.po +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Jakob Sack , 2011. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 16:44+0200\n" -"PO-Revision-Date: 2011-06-19 16:54+0200\n" -"Last-Translator: Jakob Sack \n" -"Language-Team: German \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" - -#: ../templates/index.php:4 -msgid "Filter:" -msgstr "Filter:" - -#: ../templates/index.php:7 -msgid "Logins" -msgstr "Anmeldungen" - -#: ../templates/index.php:8 -msgid "Logouts" -msgstr "Abmeldungen" - -#: ../templates/index.php:9 -msgid "Downloads" -msgstr "Downloads" - -#: ../templates/index.php:10 -msgid "Uploads" -msgstr "Uploads" - -#: ../templates/index.php:11 -msgid "Creations" -msgstr "Erstellungen" - -#: ../templates/index.php:12 -msgid "Deletions" -msgstr "Löschungen" - -#: ../templates/index.php:15 -msgid "Show:" -msgstr "Zeige" - -#: ../templates/index.php:16 -msgid "entries per page." -msgstr "Einträge pro Seite" - -#: ../templates/index.php:26 -msgid "What" -msgstr "Was" - -#: ../templates/index.php:27 -msgid "When" -msgstr "Wann" - -#: ../templates/index.php:45 -msgid "Clear log entries before" -msgstr "Lösche Einträge vor dem" - - diff --git a/log/l10n/log b/log/l10n/log deleted file mode 100644 index f70eb6af3fe..00000000000 --- a/log/l10n/log +++ /dev/null @@ -1,4 +0,0 @@ -[General] -LangCode=de -ProjectID=oc_log -TargetLangCode=de diff --git a/log/l10n/messages.pot b/log/l10n/messages.pot deleted file mode 100644 index 2da2355a3ab..00000000000 --- a/log/l10n/messages.pot +++ /dev/null @@ -1,66 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 16:53+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../templates/index.php:4 -msgid "Filter:" -msgstr "" - -#: ../templates/index.php:7 -msgid "Logins" -msgstr "" - -#: ../templates/index.php:8 -msgid "Logouts" -msgstr "" - -#: ../templates/index.php:9 -msgid "Downloads" -msgstr "" - -#: ../templates/index.php:10 -msgid "Uploads" -msgstr "" - -#: ../templates/index.php:11 -msgid "Creations" -msgstr "" - -#: ../templates/index.php:12 -msgid "Deletions" -msgstr "" - -#: ../templates/index.php:15 -msgid "Show:" -msgstr "" - -#: ../templates/index.php:16 -msgid "entries per page." -msgstr "" - -#: ../templates/index.php:26 -msgid "What" -msgstr "" - -#: ../templates/index.php:27 -msgid "When" -msgstr "" - -#: ../templates/index.php:45 -msgid "Clear log entries before" -msgstr "" diff --git a/log/l10n/nl.po b/log/l10n/nl.po deleted file mode 100644 index 2da2355a3ab..00000000000 --- a/log/l10n/nl.po +++ /dev/null @@ -1,66 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 16:53+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../templates/index.php:4 -msgid "Filter:" -msgstr "" - -#: ../templates/index.php:7 -msgid "Logins" -msgstr "" - -#: ../templates/index.php:8 -msgid "Logouts" -msgstr "" - -#: ../templates/index.php:9 -msgid "Downloads" -msgstr "" - -#: ../templates/index.php:10 -msgid "Uploads" -msgstr "" - -#: ../templates/index.php:11 -msgid "Creations" -msgstr "" - -#: ../templates/index.php:12 -msgid "Deletions" -msgstr "" - -#: ../templates/index.php:15 -msgid "Show:" -msgstr "" - -#: ../templates/index.php:16 -msgid "entries per page." -msgstr "" - -#: ../templates/index.php:26 -msgid "What" -msgstr "" - -#: ../templates/index.php:27 -msgid "When" -msgstr "" - -#: ../templates/index.php:45 -msgid "Clear log entries before" -msgstr "" diff --git a/settings/l10n/messages.pot b/settings/l10n/messages.pot deleted file mode 100644 index 705d583ee76..00000000000 --- a/settings/l10n/messages.pot +++ /dev/null @@ -1,86 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 14:47+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../templates/index.php:3 -msgid "Account information" -msgstr "" - -#: ../templates/index.php:5 -msgid "You're currently using" -msgstr "" - -#: ../templates/index.php:5 -msgid "of your" -msgstr "" - -#: ../templates/index.php:5 -msgid "space" -msgstr "" - -#: ../templates/index.php:11 -msgid "Change Password" -msgstr "" - -#: ../templates/index.php:12 -msgid "Your password got changed" -msgstr "" - -#: ../templates/index.php:15 -msgid "Old password:" -msgstr "" - -#: ../templates/index.php:19 -msgid "New password" -msgstr "" - -#: ../templates/index.php:24 -msgid "Show new password" -msgstr "" - -#: ../templates/index.php:34 -msgid "Language" -msgstr "" - -#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 -msgid "Authentication error" -msgstr "" - -#: ../ajax/changepassword.php:19 -msgid "You have to enter the old and the new password!" -msgstr "" - -#: ../ajax/changepassword.php:25 -msgid "Your old password is wrong!" -msgstr "" - -#: ../ajax/changepassword.php:31 -msgid "Password changed" -msgstr "" - -#: ../ajax/changepassword.php:34 -msgid "Unable to change password" -msgstr "" - -#: ../ajax/setlanguage.php:21 -msgid "Language changed" -msgstr "" - -#: ../ajax/setlanguage.php:23 -msgid "Invalid request" -msgstr "" diff --git a/settings/l10n/nl.po b/settings/l10n/nl.po deleted file mode 100644 index 5b38f84b775..00000000000 --- a/settings/l10n/nl.po +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Robin Appelman , 2011. -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 14:47+0200\n" -"PO-Revision-Date: 2011-06-20 14:48+0200\n" -"Last-Translator: Robin Appelman \n" -"Language-Team: American English \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ../templates/index.php:3 -msgid "Account information" -msgstr "Gebruiks gegevens" - -#: ../templates/index.php:5 -msgid "You're currently using" -msgstr "Je gebruikt momenteel" - -#: ../templates/index.php:5 -msgid "of your" -msgstr "van de" - -#: ../templates/index.php:5 -msgid "space" -msgstr "beschikbare ruimte." - -#: ../templates/index.php:11 -msgid "Change Password" -msgstr "Wachtwoord aanpassen" - -#: ../templates/index.php:12 -msgid "Your password got changed" -msgstr "Je wachtwoord is aangepast" - -#: ../templates/index.php:15 -msgid "Old password:" -msgstr "Oud wachtwoord:" - -#: ../templates/index.php:19 -msgid "New password" -msgstr "Nieuw wachtwoord" - -#: ../templates/index.php:24 -msgid "Show new password" -msgstr "Toon nieuw wachtwoord" - -#: ../templates/index.php:34 -msgid "Language" -msgstr "Taal" - -#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 -msgid "Authentication error" -msgstr "Authenticatie fout." - -#: ../ajax/changepassword.php:19 -msgid "You have to enter the old and the new password!" -msgstr "Je moet het oude en nieuwe wachtwoord invullen." - -#: ../ajax/changepassword.php:25 -msgid "Your old password is wrong!" -msgstr "Het oude wachtwoord is verkeerd." - -#: ../ajax/changepassword.php:31 -msgid "Password changed" -msgstr "Wachtwoord aangepast" - -#: ../ajax/changepassword.php:34 -msgid "Unable to change password" -msgstr "Wachtwoord aanpassen is niet mogenlijk" - -#: ../ajax/setlanguage.php:21 -msgid "Language changed" -msgstr "Taal aangepast" - -#: ../ajax/setlanguage.php:23 -msgid "Invalid request" -msgstr "Ongeldige aanvraag" - -- cgit v1.2.3 From 0c3880cffc2ab44cd4d658d424a66f3018913008 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 21:58:43 +0200 Subject: Added danish translation --- help/l10n/xgettextfiles | 1 + l10n/da/admin.po | 92 ++++++++++++++++++++++++++++++++++++ l10n/da/core.po | 123 ++++++++++++++++++++++++++++++++++++++++++++++++ l10n/da/settings.po | 87 ++++++++++++++++++++++++++++++++++ 4 files changed, 303 insertions(+) create mode 100644 help/l10n/xgettextfiles create mode 100644 l10n/da/admin.po create mode 100644 l10n/da/core.po create mode 100644 l10n/da/settings.po diff --git a/help/l10n/xgettextfiles b/help/l10n/xgettextfiles new file mode 100644 index 00000000000..a24bcc89a85 --- /dev/null +++ b/help/l10n/xgettextfiles @@ -0,0 +1 @@ +../templates/index.php diff --git a/l10n/da/admin.po b/l10n/da/admin.po new file mode 100644 index 00000000000..b083b8ecca0 --- /dev/null +++ b/l10n/da/admin.po @@ -0,0 +1,92 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Mikkel Bjerg Larsen , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:32+0200\n" +"PO-Revision-Date: 2011-06-20 00:36+0200\n" +"Last-Translator: Mikkel Bjerg Larsen \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/app.php:22 +msgid "read more" +msgstr "læs mere" + +#: ../templates/app.php:24 +msgid "INSTALL" +msgstr "INSTALLER" + +#: ../templates/app_noconn.php:6 ../templates/apps.php:6 +msgid "Apps Repository" +msgstr "Applikation arkiv" + +#: ../templates/app_noconn.php:7 +msgid "Cannot connect to apps repository" +msgstr "Kan ikke tilslutte applikations arkivet" + +#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 +#: ../templates/users.php:50 +msgid "Name" +msgstr "Navn" + +#: ../templates/apps.php:14 +msgid "Modified" +msgstr "Ændret" + +#: ../templates/system.php:6 +msgid "Administration" +msgstr "Administration" + +#: ../templates/system.php:7 +msgid "System Settings" +msgstr "System indstillinger" + +#: ../templates/users.php:13 +msgid "Add user" +msgstr "Tilføj bruger" + +#: ../templates/users.php:21 +msgid "Password" +msgstr "Kodeord" + +#: ../templates/users.php:30 +msgid "Create user" +msgstr "Lav bruger" + +#: ../templates/users.php:40 ../templates/users.php:68 +msgid "remove" +msgstr "slet" + +#: ../templates/users.php:46 +msgid "Groups" +msgstr "Grupper" + +#: ../templates/users.php:58 +msgid "Create group" +msgstr "Lav gruppe" + +#: ../templates/users.php:94 +msgid "Force new password:" +msgstr "Tving ny adgangskode" + +#: ../templates/users.php:96 +msgid "Set" +msgstr "Indstil" + +#: ../templates/users.php:102 +msgid "Do you really want to delete user" +msgstr "Vil du virkelig slette denne bruger" + +#: ../templates/users.php:109 +msgid "Do you really want to delete group" +msgstr "Vil du virkelig slette denne gruppe" + diff --git a/l10n/da/core.po b/l10n/da/core.po new file mode 100644 index 00000000000..7529cc2a572 --- /dev/null +++ b/l10n/da/core.po @@ -0,0 +1,123 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Mikkel Bjerg Larsen , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"PO-Revision-Date: 2011-06-20 00:21+0200\n" +"Last-Translator: Mikkel Bjerg Larsen \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "Fejl 404, Skyen kan ikke findes" + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "Velkommen til ownCloud, Din personlige Sky." + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "For at fuldføre installationen, følg venligst nedenstående trin" + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "Lav en administrator konto." + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "Login:" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "Kodeord:" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "Avanceret" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "Indstil data mappe." + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "Data mappe:" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "Konfigurer din database." + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "Jeg vil benytte en SQLite database. Du skal ikke gøre noget!" + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "SQLite" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "Jeg vil benytte en MySQL database." + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "Host:" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "Database navn:" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "Tabel prefix:" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "MySQL bruger login:" + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "MySQL bruger password:" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "Afslut installation" + +#: ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

        " +msgstr "" +"ownCloud er din personly sky der køre på " +"din egen server.

        " + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "Login misslykkedes" + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "Du er nu logget ud" + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "forrige" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "næste" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "Søg" + diff --git a/l10n/da/settings.po b/l10n/da/settings.po new file mode 100644 index 00000000000..8158261a3a3 --- /dev/null +++ b/l10n/da/settings.po @@ -0,0 +1,87 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 14:47+0200\n" +"PO-Revision-Date: 2011-06-20 15:16+0100\n" +"Last-Translator: Mikkel Bjerg Larsen \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:3 +msgid "Account information" +msgstr "Konto information" + +#: ../templates/index.php:5 +msgid "You're currently using" +msgstr "Du udnytter i øjeblikket" + +#: ../templates/index.php:5 +msgid "of your" +msgstr "af din" + +#: ../templates/index.php:5 +msgid "space" +msgstr "plads" + +#: ../templates/index.php:11 +msgid "Change Password" +msgstr "Ændre adgangskode" + +#: ../templates/index.php:12 +msgid "Your password got changed" +msgstr "Din adgangskode er ændret" + +#: ../templates/index.php:15 +msgid "Old password:" +msgstr "Gamle adgangskode" + +#: ../templates/index.php:19 +msgid "New password" +msgstr "Ny adgangskode" + +#: ../templates/index.php:24 +msgid "Show new password" +msgstr "Vis den nye adgangskode" + +#: ../templates/index.php:34 +msgid "Language" +msgstr "Sprog" + +#: ../ajax/changepassword.php:13 +#: ../ajax/setlanguage.php:13 +msgid "Authentication error" +msgstr "Godkendelsesfejl" + +#: ../ajax/changepassword.php:19 +msgid "You have to enter the old and the new password!" +msgstr "Du skal indtaste din gamle og nye adganskode" + +#: ../ajax/changepassword.php:25 +msgid "Your old password is wrong!" +msgstr "Dit gamle adgangskode er forkert!" + +#: ../ajax/changepassword.php:31 +msgid "Password changed" +msgstr "Adgangskoden er ændret" + +#: ../ajax/changepassword.php:34 +msgid "Unable to change password" +msgstr "Kan ikke ændre din adgangskode" + +#: ../ajax/setlanguage.php:21 +msgid "Language changed" +msgstr "Sprog ændret" + +#: ../ajax/setlanguage.php:23 +msgid "Invalid request" +msgstr "Invalid forespørgsel" + -- cgit v1.2.3 From daa194cede61efe0df017a24c58acabd413e0042 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 22:02:13 +0200 Subject: more i18n improvements --- l10n/da/admin.po | 19 +++++----- l10n/da/core.po | 21 +++++------ l10n/da/help.po | 26 +++++++++++++ l10n/da/log.po | 17 ++++----- l10n/da/settings.po | 11 +++--- l10n/de/admin.po | 91 +++++++++++++++++++++++++++++++++++++++++++++ l10n/de/core.po | 2 +- l10n/de/help.po | 26 +++++++++++++ l10n/de/log.po | 18 ++++----- l10n/de/settings.po | 86 ++++++++++++++++++++++++++++++++++++++++++ l10n/l10n.pl | 2 +- l10n/nl/admin.po | 91 +++++++++++++++++++++++++++++++++++++++++++++ l10n/nl/core.po | 18 ++++----- l10n/nl/help.po | 26 +++++++++++++ l10n/nl/log.po | 2 +- l10n/nl/settings.po | 17 ++++----- l10n/templates/admin.pot | 4 +- l10n/templates/core.pot | 2 +- l10n/templates/help.pot | 26 +++++++++++++ l10n/templates/log.pot | 2 +- l10n/templates/settings.pot | 2 +- 21 files changed, 436 insertions(+), 73 deletions(-) create mode 100644 l10n/da/help.po create mode 100644 l10n/de/admin.po create mode 100644 l10n/de/help.po create mode 100644 l10n/de/settings.po create mode 100644 l10n/nl/admin.po create mode 100644 l10n/nl/help.po create mode 100644 l10n/templates/help.pot diff --git a/l10n/da/admin.po b/l10n/da/admin.po index b083b8ecca0..26f34e599ae 100644 --- a/l10n/da/admin.po +++ b/l10n/da/admin.po @@ -1,21 +1,21 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # -# Mikkel Bjerg Larsen , 2011. +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:32+0200\n" -"PO-Revision-Date: 2011-06-20 00:36+0200\n" -"Last-Translator: Mikkel Bjerg Larsen \n" -"Language-Team: American English \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../templates/app.php:22 msgid "read more" @@ -66,7 +66,7 @@ msgstr "Lav bruger" msgid "remove" msgstr "slet" -#: ../templates/users.php:46 +#: ../templates/users.php:46 ../templates/users.php:7 msgid "Groups" msgstr "Grupper" @@ -89,4 +89,3 @@ msgstr "Vil du virkelig slette denne bruger" #: ../templates/users.php:109 msgid "Do you really want to delete group" msgstr "Vil du virkelig slette denne gruppe" - diff --git a/l10n/da/core.po b/l10n/da/core.po index 7529cc2a572..b31b7b93dbc 100644 --- a/l10n/da/core.po +++ b/l10n/da/core.po @@ -1,21 +1,21 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # -# Mikkel Bjerg Larsen , 2011. +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" -"PO-Revision-Date: 2011-06-20 00:21+0200\n" -"Last-Translator: Mikkel Bjerg Larsen \n" -"Language-Team: American English \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../templates/404.php:15 msgid "Error 404, Cloud not found" @@ -98,8 +98,8 @@ msgid "" "ownCloud is a personal cloud which runs " "on your own server.

        " msgstr "" -"ownCloud er din personly sky der køre på " -"din egen server.

        " +"ownCloud er din personly sky der køre " +"på din egen server.

        " #: ../templates/login.php:6 msgid "Login failed!" @@ -120,4 +120,3 @@ msgstr "næste" #: ../templates/part.searchbox.php:3 msgid "Search" msgstr "Søg" - diff --git a/l10n/da/help.po b/l10n/da/help.po new file mode 100644 index 00000000000..cd06f9b10ad --- /dev/null +++ b/l10n/da/help.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:2 +msgid "Questions and Answers" +msgstr "" + +#: ../templates/index.php:21 +msgid "ASK A QUESTION" +msgstr "" diff --git a/l10n/da/log.po b/l10n/da/log.po index 5a88aedee94..4c81d97ea4b 100644 --- a/l10n/da/log.po +++ b/l10n/da/log.po @@ -1,21 +1,21 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # -# Mikkel Bjerg Larsen , 2011. +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 16:53+0200\n" -"PO-Revision-Date: 2011-06-19 21:09+0200\n" -"Last-Translator: Mikkel Bjerg Larsen \n" -"Language-Team: American English \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../templates/index.php:4 msgid "Filter:" @@ -64,4 +64,3 @@ msgstr "Hvornår" #: ../templates/index.php:45 msgid "Clear log entries before" msgstr "Slet log poster før" - diff --git a/l10n/da/settings.po b/l10n/da/settings.po index 8158261a3a3..b00f26b052a 100644 --- a/l10n/da/settings.po +++ b/l10n/da/settings.po @@ -3,13 +3,14 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # +#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 14:47+0200\n" -"PO-Revision-Date: 2011-06-20 15:16+0100\n" -"Last-Translator: Mikkel Bjerg Larsen \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" @@ -56,8 +57,7 @@ msgstr "Vis den nye adgangskode" msgid "Language" msgstr "Sprog" -#: ../ajax/changepassword.php:13 -#: ../ajax/setlanguage.php:13 +#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 msgid "Authentication error" msgstr "Godkendelsesfejl" @@ -84,4 +84,3 @@ msgstr "Sprog ændret" #: ../ajax/setlanguage.php:23 msgid "Invalid request" msgstr "Invalid forespørgsel" - diff --git a/l10n/de/admin.po b/l10n/de/admin.po new file mode 100644 index 00000000000..94134e44397 --- /dev/null +++ b/l10n/de/admin.po @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/app.php:22 +msgid "read more" +msgstr "" + +#: ../templates/app.php:24 +msgid "INSTALL" +msgstr "" + +#: ../templates/app_noconn.php:6 ../templates/apps.php:6 +msgid "Apps Repository" +msgstr "" + +#: ../templates/app_noconn.php:7 +msgid "Cannot connect to apps repository" +msgstr "" + +#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 +#: ../templates/users.php:50 +msgid "Name" +msgstr "" + +#: ../templates/apps.php:14 +msgid "Modified" +msgstr "" + +#: ../templates/system.php:6 +msgid "Administration" +msgstr "" + +#: ../templates/system.php:7 +msgid "System Settings" +msgstr "" + +#: ../templates/users.php:7 ../templates/users.php:46 +msgid "Groups" +msgstr "" + +#: ../templates/users.php:13 +msgid "Add user" +msgstr "" + +#: ../templates/users.php:21 +msgid "Password" +msgstr "" + +#: ../templates/users.php:30 +msgid "Create user" +msgstr "" + +#: ../templates/users.php:40 ../templates/users.php:68 +msgid "remove" +msgstr "" + +#: ../templates/users.php:58 +msgid "Create group" +msgstr "" + +#: ../templates/users.php:94 +msgid "Force new password:" +msgstr "" + +#: ../templates/users.php:96 +msgid "Set" +msgstr "" + +#: ../templates/users.php:102 +msgid "Do you really want to delete user" +msgstr "" + +#: ../templates/users.php:109 +msgid "Do you really want to delete group" +msgstr "" diff --git a/l10n/de/core.po b/l10n/de/core.po index 19b12ca4aac..8b232607d98 100644 --- a/l10n/de/core.po +++ b/l10n/de/core.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/de/help.po b/l10n/de/help.po new file mode 100644 index 00000000000..cd06f9b10ad --- /dev/null +++ b/l10n/de/help.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:2 +msgid "Questions and Answers" +msgstr "" + +#: ../templates/index.php:21 +msgid "ASK A QUESTION" +msgstr "" diff --git a/l10n/de/log.po b/l10n/de/log.po index a901754f1a6..2bb4104b307 100644 --- a/l10n/de/log.po +++ b/l10n/de/log.po @@ -1,21 +1,21 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # -# Jakob Sack , 2011. +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 16:44+0200\n" -"PO-Revision-Date: 2011-06-19 16:54+0200\n" -"Last-Translator: Jakob Sack \n" -"Language-Team: German \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../templates/index.php:4 msgid "Filter:" @@ -64,5 +64,3 @@ msgstr "Wann" #: ../templates/index.php:45 msgid "Clear log entries before" msgstr "Lösche Einträge vor dem" - - diff --git a/l10n/de/settings.po b/l10n/de/settings.po new file mode 100644 index 00000000000..55f3298f6f9 --- /dev/null +++ b/l10n/de/settings.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:3 +msgid "Account information" +msgstr "" + +#: ../templates/index.php:5 +msgid "You're currently using" +msgstr "" + +#: ../templates/index.php:5 +msgid "of your" +msgstr "" + +#: ../templates/index.php:5 +msgid "space" +msgstr "" + +#: ../templates/index.php:11 +msgid "Change Password" +msgstr "" + +#: ../templates/index.php:12 +msgid "Your password got changed" +msgstr "" + +#: ../templates/index.php:15 +msgid "Old password:" +msgstr "" + +#: ../templates/index.php:19 +msgid "New password" +msgstr "" + +#: ../templates/index.php:24 +msgid "Show new password" +msgstr "" + +#: ../templates/index.php:34 +msgid "Language" +msgstr "" + +#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 +msgid "Authentication error" +msgstr "" + +#: ../ajax/changepassword.php:19 +msgid "You have to enter the old and the new password!" +msgstr "" + +#: ../ajax/changepassword.php:25 +msgid "Your old password is wrong!" +msgstr "" + +#: ../ajax/changepassword.php:31 +msgid "Password changed" +msgstr "" + +#: ../ajax/changepassword.php:34 +msgid "Unable to change password" +msgstr "" + +#: ../ajax/setlanguage.php:21 +msgid "Language changed" +msgstr "" + +#: ../ajax/setlanguage.php:23 +msgid "Invalid request" +msgstr "" diff --git a/l10n/l10n.pl b/l10n/l10n.pl index 5463e34e4dc..f798e4e60e3 100644 --- a/l10n/l10n.pl +++ b/l10n/l10n.pl @@ -90,7 +90,7 @@ elsif( $task eq 'write' ){ } # Write PHP file - open( OUT, ">$lang.php" ); + open( OUT, ">$language.php" ); print OUT ", YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/app.php:22 +msgid "read more" +msgstr "" + +#: ../templates/app.php:24 +msgid "INSTALL" +msgstr "" + +#: ../templates/app_noconn.php:6 ../templates/apps.php:6 +msgid "Apps Repository" +msgstr "" + +#: ../templates/app_noconn.php:7 +msgid "Cannot connect to apps repository" +msgstr "" + +#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 +#: ../templates/users.php:50 +msgid "Name" +msgstr "" + +#: ../templates/apps.php:14 +msgid "Modified" +msgstr "" + +#: ../templates/system.php:6 +msgid "Administration" +msgstr "" + +#: ../templates/system.php:7 +msgid "System Settings" +msgstr "" + +#: ../templates/users.php:7 ../templates/users.php:46 +msgid "Groups" +msgstr "" + +#: ../templates/users.php:13 +msgid "Add user" +msgstr "" + +#: ../templates/users.php:21 +msgid "Password" +msgstr "" + +#: ../templates/users.php:30 +msgid "Create user" +msgstr "" + +#: ../templates/users.php:40 ../templates/users.php:68 +msgid "remove" +msgstr "" + +#: ../templates/users.php:58 +msgid "Create group" +msgstr "" + +#: ../templates/users.php:94 +msgid "Force new password:" +msgstr "" + +#: ../templates/users.php:96 +msgid "Set" +msgstr "" + +#: ../templates/users.php:102 +msgid "Do you really want to delete user" +msgstr "" + +#: ../templates/users.php:109 +msgid "Do you really want to delete group" +msgstr "" diff --git a/l10n/nl/core.po b/l10n/nl/core.po index 7a819e81dd8..9aa3851d86f 100644 --- a/l10n/nl/core.po +++ b/l10n/nl/core.po @@ -1,21 +1,21 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # -# Robin Appelman , 2011. +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" -"PO-Revision-Date: 2011-06-20 14:19+0200\n" -"Last-Translator: Robin Appelman \n" -"Language-Team: American English \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../templates/404.php:15 msgid "Error 404, Cloud not found" @@ -121,5 +121,3 @@ msgstr "volgende" #: ../templates/part.searchbox.php:3 msgid "Search" msgstr "Zoeken" - - diff --git a/l10n/nl/help.po b/l10n/nl/help.po new file mode 100644 index 00000000000..cd06f9b10ad --- /dev/null +++ b/l10n/nl/help.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:2 +msgid "Questions and Answers" +msgstr "" + +#: ../templates/index.php:21 +msgid "ASK A QUESTION" +msgstr "" diff --git a/l10n/nl/log.po b/l10n/nl/log.po index 2da2355a3ab..c73912a6262 100644 --- a/l10n/nl/log.po +++ b/l10n/nl/log.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 16:53+0200\n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/nl/settings.po b/l10n/nl/settings.po index 5b38f84b775..11c325d5fcb 100644 --- a/l10n/nl/settings.po +++ b/l10n/nl/settings.po @@ -1,21 +1,21 @@ +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # -# Robin Appelman , 2011. +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 14:47+0200\n" -"PO-Revision-Date: 2011-06-20 14:48+0200\n" -"Last-Translator: Robin Appelman \n" -"Language-Team: American English \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.2\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../templates/index.php:3 msgid "Account information" @@ -84,4 +84,3 @@ msgstr "Taal aangepast" #: ../ajax/setlanguage.php:23 msgid "Invalid request" msgstr "Ongeldige aanvraag" - diff --git a/l10n/templates/admin.pot b/l10n/templates/admin.pot index c30a4454311..c683082b6f8 100644 --- a/l10n/templates/admin.pot +++ b/l10n/templates/admin.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:32+0200\n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -66,7 +66,7 @@ msgstr "" msgid "remove" msgstr "" -#: ../templates/users.php:46 +#: ../templates/users.php:46 ../templates/users.php:7 msgid "Groups" msgstr "" diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot index 591a1c724e3..ef4f80b580b 100644 --- a/l10n/templates/core.pot +++ b/l10n/templates/core.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 23:27+0200\n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/help.pot b/l10n/templates/help.pot new file mode 100644 index 00000000000..cd06f9b10ad --- /dev/null +++ b/l10n/templates/help.pot @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../templates/index.php:2 +msgid "Questions and Answers" +msgstr "" + +#: ../templates/index.php:21 +msgid "ASK A QUESTION" +msgstr "" diff --git a/l10n/templates/log.pot b/l10n/templates/log.pot index 2da2355a3ab..c73912a6262 100644 --- a/l10n/templates/log.pot +++ b/l10n/templates/log.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-19 16:53+0200\n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot index 705d583ee76..55f3298f6f9 100644 --- a/l10n/templates/settings.pot +++ b/l10n/templates/settings.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 14:47+0200\n" +"POT-Creation-Date: 2011-06-20 22:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3 From ef3386c5f8774a8959b93332f7fc388824a93385 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 22:08:44 +0200 Subject: All translations should be in the new system --- admin/l10n/da.php | 20 ++++++++++++++++++++ core/l10n/da.php | 27 +++++++++++++++++++++++++++ l10n/l10n.pl | 1 + log/l10n/nl.php | 13 +------------ settings/l10n/da.php | 19 +++++++++++++++++++ 5 files changed, 68 insertions(+), 12 deletions(-) create mode 100644 admin/l10n/da.php create mode 100644 core/l10n/da.php create mode 100644 settings/l10n/da.php diff --git a/admin/l10n/da.php b/admin/l10n/da.php new file mode 100644 index 00000000000..4601616efc0 --- /dev/null +++ b/admin/l10n/da.php @@ -0,0 +1,20 @@ + "slet", +"Password" => "Kodeord", +"Administration" => "Administration", +"Name" => "Navn", +"Do you really want to delete group" => "Vil du virkelig slette denne gruppe", +"System Settings" => "System indstillinger", +"Create group" => "Lav gruppe", +"Modified" => "Ændret", +"read more" => "læs mere", +"INSTALL" => "INSTALLER", +"Set" => "Indstil", +"Apps Repository" => "Applikation arkiv", +"Force new password:" => "Tving ny adgangskode", +"Add user" => "Tilføj bruger", +"Groups" => "Grupper", +"Cannot connect to apps repository" => "Kan ikke tilslutte applikations arkivet", +"Do you really want to delete user" => "Vil du virkelig slette denne bruger", +"Create user" => "Lav bruger" +); diff --git a/core/l10n/da.php b/core/l10n/da.php new file mode 100644 index 00000000000..d7aa3855d48 --- /dev/null +++ b/core/l10n/da.php @@ -0,0 +1,27 @@ +admin account." => "Lav en administrator konto.", +"Welcome to ownCloud, your personnal cloud." => "Velkommen til ownCloud, Din personlige Sky.", +"You are logged out." => "Du er nu logget ud", +"MySQL user password:" => "MySQL bruger password:", +"Error 404, Cloud not found" => "Fejl 404, Skyen kan ikke findes", +"Database name:" => "Database navn:", +"Set where to store the data." => "Indstil data mappe.", +"Advanced" => "Avanceret", +"To finish the installation, please follow the steps below." => "For at fuldføre installationen, følg venligst nedenstående trin", +"Host:" => "Host:", +"Table prefix:" => "Tabel prefix:", +"prev" => "forrige", +"Login:" => "Login:", +"Login failed!" => "Login misslykkedes", +"I will use a MySQL database." => "Jeg vil benytte en MySQL database.", +"next" => "næste", +"Password:" => "Kodeord:", +"SQLite" => "SQLite", +"MySQL user login:" => "MySQL bruger login:", +"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud er din personly sky der køre på din egen server.

        ", +"Search" => "Søg", +"Data directory:" => "Data mappe:", +"Finish setup" => "Afslut installation", +"Configure your database." => "Konfigurer din database.", +"I will use a SQLite database. You have nothing to do!" => "Jeg vil benytte en SQLite database. Du skal ikke gøre noget!" +); diff --git a/l10n/l10n.pl b/l10n/l10n.pl index f798e4e60e3..a5fab01a2fd 100644 --- a/l10n/l10n.pl +++ b/l10n/l10n.pl @@ -88,6 +88,7 @@ elsif( $task eq 'write' ){ next if $hash->{$key}->msgstr() eq '""'; push( @strings, $hash->{$key}->msgid()." => ".$hash->{$key}->msgstr()); } + next if $#strings == -1; # Skip empty files # Write PHP file open( OUT, ">$language.php" ); diff --git a/log/l10n/nl.php b/log/l10n/nl.php index 1eab84ef152..34178b68632 100644 --- a/log/l10n/nl.php +++ b/log/l10n/nl.php @@ -1,14 +1,3 @@ "Laat", -"Uploads" => "Uploads", -"Filter:" => "Filter: ", -"Logouts" => "Afmeldingen", -"Logins" => "Aanmeldingen", -"When" => "Wanneer", -"Downloads" => "Downloades", -"Clear log entries before" => "Verwijder logboek elementen ouder dan", -"What" => "Wat", -"entries per page." => "elementen per pagina zien.", -"Creations" => "Creaties", -"Deletions" => "Verwijderingen" + ); diff --git a/settings/l10n/da.php b/settings/l10n/da.php new file mode 100644 index 00000000000..4d403042e1e --- /dev/null +++ b/settings/l10n/da.php @@ -0,0 +1,19 @@ + "plads", +"You're currently using" => "Du udnytter i øjeblikket", +"Unable to change password" => "Kan ikke ændre din adgangskode", +"New password" => "Ny adgangskode", +"Authentication error" => "Godkendelsesfejl", +"Your password got changed" => "Din adgangskode er ændret", +"Language changed" => "Sprog ændret", +"Invalid request" => "Invalid forespørgsel", +"Account information" => "Konto information", +"of your" => "af din", +"Password changed" => "Adgangskoden er ændret", +"Old password:" => "Gamle adgangskode", +"Your old password is wrong!" => "Dit gamle adgangskode er forkert!", +"Show new password" => "Vis den nye adgangskode", +"You have to enter the old and the new password!" => "Du skal indtaste din gamle og nye adganskode", +"Language" => "Sprog", +"Change Password" => "Ændre adgangskode" +); -- cgit v1.2.3 From f72db005b565505b7754915de9b10f636669f9cf Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 22:22:17 +0200 Subject: Keep order when creating php files --- l10n/l10n.pl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/l10n/l10n.pl b/l10n/l10n.pl index a5fab01a2fd..88abc821e95 100644 --- a/l10n/l10n.pl +++ b/l10n/l10n.pl @@ -30,6 +30,10 @@ my $place = '..'; die( "Usuage: l10n.pl task\ntask: read, write\n") unless $task && $place; +# Our current position +my $whereami = cwd(); +die( "Program must be executed in a l10n-folder called 'l10n'" ) unless $whereami =~ m/\/l10n$/; + # Where are i18n-files? my @dirs = crawl( $place ); @@ -44,9 +48,6 @@ foreach my $i ( @files ){ push( @languages, $i ) if -d $i && substr( $i, 0, 1 ) ne '.'; } -# Our current position -my $whereami = cwd(); - if( $task eq 'read' ){ foreach my $dir ( @dirs ){ my @temp = split( /\//, $dir ); @@ -79,14 +80,13 @@ elsif( $task eq 'write' ){ my $input = "${whereami}/$language/$app.po"; next unless -e $input; - my $hash = Locale::PO->load_file_ashash( $input ); - + my $array = Locale::PO->load_file_asarray( $input ); # Create array my @strings = (); - foreach my $key ( keys( %{$hash} )){ - next if $key eq '""'; - next if $hash->{$key}->msgstr() eq '""'; - push( @strings, $hash->{$key}->msgid()." => ".$hash->{$key}->msgstr()); + foreach my $string ( @{$array} ){ + next if $string->msgid() eq '""'; + next if $string->msgstr() eq '""'; + push( @strings, $string->msgid()." => ".$string->msgstr()); } next if $#strings == -1; # Skip empty files -- cgit v1.2.3 From fb7f00edbca5b1892cdfc04358d6658e986a877c Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 22:22:58 +0200 Subject: l10nlist.shuffle ;-) --- admin/l10n/da.php | 24 ++++++++++++------------ core/l10n/da.php | 36 ++++++++++++++++++------------------ core/l10n/de.php | 10 +++++----- core/l10n/nl.php | 36 ++++++++++++++++++------------------ log/l10n/da.php | 16 ++++++++-------- log/l10n/de.php | 16 ++++++++-------- settings/l10n/da.php | 24 ++++++++++++------------ settings/l10n/nl.php | 24 ++++++++++++------------ 8 files changed, 93 insertions(+), 93 deletions(-) diff --git a/admin/l10n/da.php b/admin/l10n/da.php index 4601616efc0..f405a358cb7 100644 --- a/admin/l10n/da.php +++ b/admin/l10n/da.php @@ -1,20 +1,20 @@ "slet", -"Password" => "Kodeord", -"Administration" => "Administration", -"Name" => "Navn", -"Do you really want to delete group" => "Vil du virkelig slette denne gruppe", -"System Settings" => "System indstillinger", -"Create group" => "Lav gruppe", -"Modified" => "Ændret", "read more" => "læs mere", "INSTALL" => "INSTALLER", -"Set" => "Indstil", "Apps Repository" => "Applikation arkiv", -"Force new password:" => "Tving ny adgangskode", +"Cannot connect to apps repository" => "Kan ikke tilslutte applikations arkivet", +"Name" => "Navn", +"Modified" => "Ændret", +"Administration" => "Administration", +"System Settings" => "System indstillinger", "Add user" => "Tilføj bruger", +"Password" => "Kodeord", +"Create user" => "Lav bruger", +"remove" => "slet", "Groups" => "Grupper", -"Cannot connect to apps repository" => "Kan ikke tilslutte applikations arkivet", +"Create group" => "Lav gruppe", +"Force new password:" => "Tving ny adgangskode", +"Set" => "Indstil", "Do you really want to delete user" => "Vil du virkelig slette denne bruger", -"Create user" => "Lav bruger" +"Do you really want to delete group" => "Vil du virkelig slette denne gruppe" ); diff --git a/core/l10n/da.php b/core/l10n/da.php index d7aa3855d48..54a11ddba82 100644 --- a/core/l10n/da.php +++ b/core/l10n/da.php @@ -1,27 +1,27 @@ admin account." => "Lav en administrator konto.", -"Welcome to ownCloud, your personnal cloud." => "Velkommen til ownCloud, Din personlige Sky.", -"You are logged out." => "Du er nu logget ud", -"MySQL user password:" => "MySQL bruger password:", "Error 404, Cloud not found" => "Fejl 404, Skyen kan ikke findes", -"Database name:" => "Database navn:", -"Set where to store the data." => "Indstil data mappe.", -"Advanced" => "Avanceret", +"Welcome to ownCloud, your personnal cloud." => "Velkommen til ownCloud, Din personlige Sky.", "To finish the installation, please follow the steps below." => "For at fuldføre installationen, følg venligst nedenstående trin", -"Host:" => "Host:", -"Table prefix:" => "Tabel prefix:", -"prev" => "forrige", +"Create an admin account." => "Lav en administrator konto.", "Login:" => "Login:", -"Login failed!" => "Login misslykkedes", -"I will use a MySQL database." => "Jeg vil benytte en MySQL database.", -"next" => "næste", "Password:" => "Kodeord:", +"Advanced" => "Avanceret", +"Set where to store the data." => "Indstil data mappe.", +"Data directory:" => "Data mappe:", +"Configure your database." => "Konfigurer din database.", +"I will use a SQLite database. You have nothing to do!" => "Jeg vil benytte en SQLite database. Du skal ikke gøre noget!", "SQLite" => "SQLite", +"I will use a MySQL database." => "Jeg vil benytte en MySQL database.", +"Host:" => "Host:", +"Database name:" => "Database navn:", +"Table prefix:" => "Tabel prefix:", "MySQL user login:" => "MySQL bruger login:", -"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud er din personly sky der køre på din egen server.

        ", -"Search" => "Søg", -"Data directory:" => "Data mappe:", +"MySQL user password:" => "MySQL bruger password:", "Finish setup" => "Afslut installation", -"Configure your database." => "Konfigurer din database.", -"I will use a SQLite database. You have nothing to do!" => "Jeg vil benytte en SQLite database. Du skal ikke gøre noget!" +"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud er din personly sky der køre på din egen server.

        ", +"Login failed!" => "Login misslykkedes", +"You are logged out." => "Du er nu logget ud", +"prev" => "forrige", +"next" => "næste", +"Search" => "Søg" ); diff --git a/core/l10n/de.php b/core/l10n/de.php index fb00345e69d..cd89558a4dd 100644 --- a/core/l10n/de.php +++ b/core/l10n/de.php @@ -1,11 +1,11 @@ "Sie wurden abgemeldet.", -"Set where to store the data." => "Speicherort der Daten", -"Advanced" => "Erweitert", -"prev" => "zurück", "Login:" => "Benutzername:", +"Password:" => "Passwort:", +"Advanced" => "Erweitert", +"Set where to store the data." => "Speicherort der Daten", "Login failed!" => "Anmeldung Fehlgeschlagen!", +"You are logged out." => "Sie wurden abgemeldet.", +"prev" => "zurück", "next" => "weiter", -"Password:" => "Passwort:", "Search" => "Suchen" ); diff --git a/core/l10n/nl.php b/core/l10n/nl.php index 712444c8006..bbffcd0831a 100644 --- a/core/l10n/nl.php +++ b/core/l10n/nl.php @@ -1,27 +1,27 @@ admin account." => "Maak een administrator account. aan", -"Welcome to ownCloud, your personnal cloud." => "Welkom by ownCloud, jouw persoonlijke cloud", -"You are logged out." => "Je bent afgemend.", -"MySQL user password:" => "MySQL wachtwoord", "Error 404, Cloud not found" => "Fout 404, Cloud niet gevonden.", -"Database name:" => "Database naam:", -"Set where to store the data." => "Bepaal waar de gegevens opgeslagen moeten woorden.", -"Advanced" => "Geavanceerd", +"Welcome to ownCloud, your personnal cloud." => "Welkom by ownCloud, jouw persoonlijke cloud", "To finish the installation, please follow the steps below." => "Volg de volgende stappen om de instalatie af te ronden.", -"Host:" => "Host:", -"Table prefix:" => "Voorvoegsel voor tabelnaamen:", -"prev" => "vorige", +"Create an admin account." => "Maak een administrator account. aan", "Login:" => "Gebruikersnaam:", -"Login failed!" => "Aanmelden mislukt.", -"I will use a MySQL database." => "Er zal een MySQL database gebruikt woorden.", -"next" => "volgende", "Password:" => "Wachtwoord:", +"Advanced" => "Geavanceerd", +"Set where to store the data." => "Bepaal waar de gegevens opgeslagen moeten woorden.", +"Data directory:" => "Gegevens map:", +"Configure your database." => "Stel de database in.", +"I will use a SQLite database. You have nothing to do!" => "Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen.", "SQLite" => "SQLite", +"I will use a MySQL database." => "Er zal een MySQL database gebruikt woorden.", +"Host:" => "Host:", +"Database name:" => "Database naam:", +"Table prefix:" => "Voorvoegsel voor tabelnaamen:", "MySQL user login:" => "MySQL gebruikers naam.", -"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud is een persoonlijke cloud die op je eigen server draait.

        ", -"Search" => "Zoeken", -"Data directory:" => "Gegevens map:", +"MySQL user password:" => "MySQL wachtwoord", "Finish setup" => "Instalatie afronden", -"Configure your database." => "Stel de database in.", -"I will use a SQLite database. You have nothing to do!" => "Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." +"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud is een persoonlijke cloud die op je eigen server draait.

        ", +"Login failed!" => "Aanmelden mislukt.", +"You are logged out." => "Je bent afgemend.", +"prev" => "vorige", +"next" => "volgende", +"Search" => "Zoeken" ); diff --git a/log/l10n/da.php b/log/l10n/da.php index 8ab99277bfa..8fbfae67a6d 100644 --- a/log/l10n/da.php +++ b/log/l10n/da.php @@ -1,14 +1,14 @@ "Vis:", -"Uploads" => "Uploads", "Filter:" => "Filter:", -"Logouts" => "Logouts", "Logins" => "Logins", -"When" => "Hvornår", +"Logouts" => "Logouts", "Downloads" => "Downloads", -"Clear log entries before" => "Slet log poster før", -"What" => "Hvilket", -"entries per page." => "poster pr side.", +"Uploads" => "Uploads", "Creations" => "Oprettelser", -"Deletions" => "Sletninger" +"Deletions" => "Sletninger", +"Show:" => "Vis:", +"entries per page." => "poster pr side.", +"What" => "Hvilket", +"When" => "Hvornår", +"Clear log entries before" => "Slet log poster før" ); diff --git a/log/l10n/de.php b/log/l10n/de.php index 5cfc3486aff..9cf804d6cf8 100644 --- a/log/l10n/de.php +++ b/log/l10n/de.php @@ -1,14 +1,14 @@ "Zeige", -"Uploads" => "Uploads", "Filter:" => "Filter:", -"Logouts" => "Abmeldungen", "Logins" => "Anmeldungen", -"When" => "Wann", +"Logouts" => "Abmeldungen", "Downloads" => "Downloads", -"Clear log entries before" => "Lösche Einträge vor dem", -"What" => "Was", -"entries per page." => "Einträge pro Seite", +"Uploads" => "Uploads", "Creations" => "Erstellungen", -"Deletions" => "Löschungen" +"Deletions" => "Löschungen", +"Show:" => "Zeige", +"entries per page." => "Einträge pro Seite", +"What" => "Was", +"When" => "Wann", +"Clear log entries before" => "Lösche Einträge vor dem" ); diff --git a/settings/l10n/da.php b/settings/l10n/da.php index 4d403042e1e..1c0b87f8675 100644 --- a/settings/l10n/da.php +++ b/settings/l10n/da.php @@ -1,19 +1,19 @@ "plads", -"You're currently using" => "Du udnytter i øjeblikket", -"Unable to change password" => "Kan ikke ændre din adgangskode", -"New password" => "Ny adgangskode", -"Authentication error" => "Godkendelsesfejl", -"Your password got changed" => "Din adgangskode er ændret", -"Language changed" => "Sprog ændret", -"Invalid request" => "Invalid forespørgsel", "Account information" => "Konto information", +"You're currently using" => "Du udnytter i øjeblikket", "of your" => "af din", -"Password changed" => "Adgangskoden er ændret", +"space" => "plads", +"Change Password" => "Ændre adgangskode", +"Your password got changed" => "Din adgangskode er ændret", "Old password:" => "Gamle adgangskode", -"Your old password is wrong!" => "Dit gamle adgangskode er forkert!", +"New password" => "Ny adgangskode", "Show new password" => "Vis den nye adgangskode", -"You have to enter the old and the new password!" => "Du skal indtaste din gamle og nye adganskode", "Language" => "Sprog", -"Change Password" => "Ændre adgangskode" +"Authentication error" => "Godkendelsesfejl", +"You have to enter the old and the new password!" => "Du skal indtaste din gamle og nye adganskode", +"Your old password is wrong!" => "Dit gamle adgangskode er forkert!", +"Password changed" => "Adgangskoden er ændret", +"Unable to change password" => "Kan ikke ændre din adgangskode", +"Language changed" => "Sprog ændret", +"Invalid request" => "Invalid forespørgsel" ); diff --git a/settings/l10n/nl.php b/settings/l10n/nl.php index d6732521559..f05e7cc7c26 100644 --- a/settings/l10n/nl.php +++ b/settings/l10n/nl.php @@ -1,19 +1,19 @@ "beschikbare ruimte.", -"You're currently using" => "Je gebruikt momenteel", -"Unable to change password" => "Wachtwoord aanpassen is niet mogenlijk", -"New password" => "Nieuw wachtwoord", -"Authentication error" => "Authenticatie fout.", -"Your password got changed" => "Je wachtwoord is aangepast", -"Language changed" => "Taal aangepast", -"Invalid request" => "Ongeldige aanvraag", "Account information" => "Gebruiks gegevens", +"You're currently using" => "Je gebruikt momenteel", "of your" => "van de", -"Password changed" => "Wachtwoord aangepast", +"space" => "beschikbare ruimte.", +"Change Password" => "Wachtwoord aanpassen", +"Your password got changed" => "Je wachtwoord is aangepast", "Old password:" => "Oud wachtwoord:", -"Your old password is wrong!" => "Het oude wachtwoord is verkeerd.", +"New password" => "Nieuw wachtwoord", "Show new password" => "Toon nieuw wachtwoord", -"You have to enter the old and the new password!" => "Je moet het oude en nieuwe wachtwoord invullen.", "Language" => "Taal", -"Change Password" => "Wachtwoord aanpassen" +"Authentication error" => "Authenticatie fout.", +"You have to enter the old and the new password!" => "Je moet het oude en nieuwe wachtwoord invullen.", +"Your old password is wrong!" => "Het oude wachtwoord is verkeerd.", +"Password changed" => "Wachtwoord aangepast", +"Unable to change password" => "Wachtwoord aanpassen is niet mogenlijk", +"Language changed" => "Taal aangepast", +"Invalid request" => "Ongeldige aanvraag" ); -- cgit v1.2.3 From bcfd1ff304a688823d60cf5a289d625e9501fff1 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Mon, 20 Jun 2011 22:57:28 +0200 Subject: Adapt javascript-i18n to latest changes --- core/ajax/translations.php | 2 +- core/js/js.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ajax/translations.php b/core/ajax/translations.php index a1e84487f63..adaf7dcb758 100644 --- a/core/ajax/translations.php +++ b/core/ajax/translations.php @@ -22,7 +22,7 @@ */ // Init owncloud -require_once('../lib/base.php'); +require_once('../../lib/base.php'); $app = $_POST["app"]; diff --git a/core/js/js.js b/core/js/js.js index 7e44b7ce6d5..9a14cb8ed4f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1,7 +1,7 @@ var _l10ncache = {}; function t(app,text){ if( !( app in _l10ncache )){ - $.post( oc_webroot+'/l10n/javascript.php', {'app': app}, function(jsondata){ + $.post( oc_webroot+'/core/ajax/translations.php', {'app': app}, function(jsondata){ _l10ncache[app] = jsondata.data; }); -- cgit v1.2.3 From 2d5b4dfa10fc852cd25d2c309fbd7764992ff0d8 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 21 Jun 2011 15:10:33 +0200 Subject: update dutch translations --- admin/l10n/nl.php | 20 ++++++++++++++++++++ help/l10n/nl.php | 4 ++++ l10n/nl/admin.po | 53 +++++++++++++++++++++++++++-------------------------- l10n/nl/help.po | 21 +++++++++++---------- l10n/nl/log.po | 41 +++++++++++++++++++++-------------------- log/l10n/nl.php | 13 ++++++++++++- 6 files changed, 95 insertions(+), 57 deletions(-) create mode 100644 admin/l10n/nl.php create mode 100644 help/l10n/nl.php diff --git a/admin/l10n/nl.php b/admin/l10n/nl.php new file mode 100644 index 00000000000..a762559e08d --- /dev/null +++ b/admin/l10n/nl.php @@ -0,0 +1,20 @@ + "Meer informatie", +"INSTALL" => "Instaleer", +"Apps Repository" => "Applicatie Database", +"Cannot connect to apps repository" => "Kan geen verbinding maken met de applicatie database", +"Name" => "Naam", +"Modified" => "Laatst aangepast", +"Administration" => "Administratie", +"System Settings" => "Systeem Instellingen", +"Groups" => "Groepen", +"Add user" => "Voeg gebruiker toe", +"Password" => "Wachtwoord", +"Create user" => "Maak gebruiker aan", +"remove" => "verwijder", +"Create group" => "Maak groep aan", +"Force new password:" => "Forceer nieuw wachtwoord:", +"Set" => "Ok", +"Do you really want to delete user" => "Weet je zeker dat je deze gebruiker wil verwijderen", +"Do you really want to delete group" => "Weet je zeker dat je deze groep wil verwijderen" +); diff --git a/help/l10n/nl.php b/help/l10n/nl.php new file mode 100644 index 00000000000..11a28894c72 --- /dev/null +++ b/help/l10n/nl.php @@ -0,0 +1,4 @@ + "Vraag en Antwoord", +"ASK A QUESTION" => "Stel een vraag" +); diff --git a/l10n/nl/admin.po b/l10n/nl/admin.po index 94134e44397..2feccb46b97 100644 --- a/l10n/nl/admin.po +++ b/l10n/nl/admin.po @@ -1,91 +1,92 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # -#, fuzzy +# Robin Appelman , 2011. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-06-20 22:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2011-06-21 15:00+0200\n" +"Last-Translator: Robin Appelman \n" +"Language-Team: American English \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../templates/app.php:22 msgid "read more" -msgstr "" +msgstr "Meer informatie" #: ../templates/app.php:24 msgid "INSTALL" -msgstr "" +msgstr "Instaleer" #: ../templates/app_noconn.php:6 ../templates/apps.php:6 msgid "Apps Repository" -msgstr "" +msgstr "Applicatie Database" #: ../templates/app_noconn.php:7 msgid "Cannot connect to apps repository" -msgstr "" +msgstr "Kan geen verbinding maken met de applicatie database" #: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 #: ../templates/users.php:50 msgid "Name" -msgstr "" +msgstr "Naam" #: ../templates/apps.php:14 msgid "Modified" -msgstr "" +msgstr "Laatst aangepast" #: ../templates/system.php:6 msgid "Administration" -msgstr "" +msgstr "Administratie" #: ../templates/system.php:7 msgid "System Settings" -msgstr "" +msgstr "Systeem Instellingen" #: ../templates/users.php:7 ../templates/users.php:46 msgid "Groups" -msgstr "" +msgstr "Groepen" #: ../templates/users.php:13 msgid "Add user" -msgstr "" +msgstr "Voeg gebruiker toe" #: ../templates/users.php:21 msgid "Password" -msgstr "" +msgstr "Wachtwoord" #: ../templates/users.php:30 msgid "Create user" -msgstr "" +msgstr "Maak gebruiker aan" #: ../templates/users.php:40 ../templates/users.php:68 msgid "remove" -msgstr "" +msgstr "verwijder" #: ../templates/users.php:58 msgid "Create group" -msgstr "" +msgstr "Maak groep aan" #: ../templates/users.php:94 msgid "Force new password:" -msgstr "" +msgstr "Forceer nieuw wachtwoord:" #: ../templates/users.php:96 msgid "Set" -msgstr "" +msgstr "Ok" #: ../templates/users.php:102 msgid "Do you really want to delete user" -msgstr "" +msgstr "Weet je zeker dat je deze gebruiker wil verwijderen" #: ../templates/users.php:109 msgid "Do you really want to delete group" -msgstr "" +msgstr "Weet je zeker dat je deze groep wil verwijderen" + diff --git a/l10n/nl/help.po b/l10n/nl/help.po index cd06f9b10ad..b1f1f4bc447 100644 --- a/l10n/nl/help.po +++ b/l10n/nl/help.po @@ -1,26 +1,27 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # -#, fuzzy +# Robin Appelman , 2011. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-06-20 22:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2011-06-21 15:03+0200\n" +"Last-Translator: Robin Appelman \n" +"Language-Team: Dutch <>\n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../templates/index.php:2 msgid "Questions and Answers" -msgstr "" +msgstr "Vraag en Antwoord" #: ../templates/index.php:21 msgid "ASK A QUESTION" -msgstr "" +msgstr "Stel een vraag" + diff --git a/l10n/nl/log.po b/l10n/nl/log.po index c73912a6262..a071faeccfc 100644 --- a/l10n/nl/log.po +++ b/l10n/nl/log.po @@ -1,66 +1,67 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # -#, fuzzy +# Robin Appelman , 2011. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-06-20 22:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2011-06-21 15:01+0200\n" +"Last-Translator: Robin Appelman \n" +"Language-Team: American English \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../templates/index.php:4 msgid "Filter:" -msgstr "" +msgstr "Filter:" #: ../templates/index.php:7 msgid "Logins" -msgstr "" +msgstr "Aanmeldingen" #: ../templates/index.php:8 msgid "Logouts" -msgstr "" +msgstr "Afmeldingen" #: ../templates/index.php:9 msgid "Downloads" -msgstr "" +msgstr "Downloads" #: ../templates/index.php:10 msgid "Uploads" -msgstr "" +msgstr "Uploads" #: ../templates/index.php:11 msgid "Creations" -msgstr "" +msgstr "Creaties" #: ../templates/index.php:12 msgid "Deletions" -msgstr "" +msgstr "Verwijderingen" #: ../templates/index.php:15 msgid "Show:" -msgstr "" +msgstr "Laat" #: ../templates/index.php:16 msgid "entries per page." -msgstr "" +msgstr "resulaten per pagina zien" #: ../templates/index.php:26 msgid "What" -msgstr "" +msgstr "Wat" #: ../templates/index.php:27 msgid "When" -msgstr "" +msgstr "Waneer" #: ../templates/index.php:45 msgid "Clear log entries before" -msgstr "" +msgstr "Verwijder logboek element ouder dan" + diff --git a/log/l10n/nl.php b/log/l10n/nl.php index 34178b68632..59e9fa04d2a 100644 --- a/log/l10n/nl.php +++ b/log/l10n/nl.php @@ -1,3 +1,14 @@ "Filter:", +"Logins" => "Aanmeldingen", +"Logouts" => "Afmeldingen", +"Downloads" => "Downloads", +"Uploads" => "Uploads", +"Creations" => "Creaties", +"Deletions" => "Verwijderingen", +"Show:" => "Laat", +"entries per page." => "resulaten per pagina zien", +"What" => "Wat", +"When" => "Waneer", +"Clear log entries before" => "Verwijder logboek element ouder dan" ); -- cgit v1.2.3 From 34de2cacd137a42bb7705d869aecdc938993e8ff Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Tue, 21 Jun 2011 16:01:47 +0200 Subject: Updated danish translation --- admin/l10n/da.php | 6 +++--- core/l10n/da.php | 4 ++-- help/l10n/da.php | 4 ++++ l10n/da/admin.po | 25 +++++++++++++++---------- l10n/da/core.po | 18 +++++++----------- l10n/da/help.po | 12 ++++++------ l10n/da/settings.po | 13 +++++++------ settings/l10n/da.php | 4 ++-- 8 files changed, 46 insertions(+), 40 deletions(-) create mode 100644 help/l10n/da.php diff --git a/admin/l10n/da.php b/admin/l10n/da.php index f405a358cb7..477dd9db9e2 100644 --- a/admin/l10n/da.php +++ b/admin/l10n/da.php @@ -2,7 +2,7 @@ "read more" => "læs mere", "INSTALL" => "INSTALLER", "Apps Repository" => "Applikation arkiv", -"Cannot connect to apps repository" => "Kan ikke tilslutte applikations arkivet", +"Cannot connect to apps repository" => "Kan ikke oprette forbindelse til applikations arkivet", "Name" => "Navn", "Modified" => "Ændret", "Administration" => "Administration", @@ -15,6 +15,6 @@ "Create group" => "Lav gruppe", "Force new password:" => "Tving ny adgangskode", "Set" => "Indstil", -"Do you really want to delete user" => "Vil du virkelig slette denne bruger", -"Do you really want to delete group" => "Vil du virkelig slette denne gruppe" +"Do you really want to delete user" => "Vil du virkelig slette denne bruger?", +"Do you really want to delete group" => "Vil du virkelig slette denne gruppe?" ); diff --git a/core/l10n/da.php b/core/l10n/da.php index 54a11ddba82..631201bab60 100644 --- a/core/l10n/da.php +++ b/core/l10n/da.php @@ -1,6 +1,6 @@ "Fejl 404, Skyen kan ikke findes", -"Welcome to ownCloud, your personnal cloud." => "Velkommen til ownCloud, Din personlige Sky.", +"Welcome to ownCloud, your personnal cloud." => "Velkommen til ownCloud, din personlige Sky.", "To finish the installation, please follow the steps below." => "For at fuldføre installationen, følg venligst nedenstående trin", "Create an admin account." => "Lav en administrator konto.", "Login:" => "Login:", @@ -19,7 +19,7 @@ "MySQL user password:" => "MySQL bruger password:", "Finish setup" => "Afslut installation", "ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud er din personly sky der køre på din egen server.

        ", -"Login failed!" => "Login misslykkedes", +"Login failed!" => "Login mislykkedes", "You are logged out." => "Du er nu logget ud", "prev" => "forrige", "next" => "næste", diff --git a/help/l10n/da.php b/help/l10n/da.php new file mode 100644 index 00000000000..2b8120c0c38 --- /dev/null +++ b/help/l10n/da.php @@ -0,0 +1,4 @@ + "Spørgsmål og Svar", +"ASK A QUESTION" => "STIL ET SPØRGSMÅL" +); diff --git a/l10n/da/admin.po b/l10n/da/admin.po index 26f34e599ae..be62e2cd3db 100644 --- a/l10n/da/admin.po +++ b/l10n/da/admin.po @@ -3,14 +3,13 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-06-20 22:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2011-06-21 15:08+0100\n" +"Last-Translator: Mikkel Bjerg Larsen \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" @@ -25,15 +24,18 @@ msgstr "læs mere" msgid "INSTALL" msgstr "INSTALLER" -#: ../templates/app_noconn.php:6 ../templates/apps.php:6 +#: ../templates/app_noconn.php:6 +#: ../templates/apps.php:6 msgid "Apps Repository" msgstr "Applikation arkiv" #: ../templates/app_noconn.php:7 msgid "Cannot connect to apps repository" -msgstr "Kan ikke tilslutte applikations arkivet" +msgstr "Kan ikke oprette forbindelse til applikations arkivet" -#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 +#: ../templates/apps.php:13 +#: ../templates/users.php:6 +#: ../templates/users.php:20 #: ../templates/users.php:50 msgid "Name" msgstr "Navn" @@ -62,11 +64,13 @@ msgstr "Kodeord" msgid "Create user" msgstr "Lav bruger" -#: ../templates/users.php:40 ../templates/users.php:68 +#: ../templates/users.php:40 +#: ../templates/users.php:68 msgid "remove" msgstr "slet" -#: ../templates/users.php:46 ../templates/users.php:7 +#: ../templates/users.php:46 +#: ../templates/users.php:7 msgid "Groups" msgstr "Grupper" @@ -84,8 +88,9 @@ msgstr "Indstil" #: ../templates/users.php:102 msgid "Do you really want to delete user" -msgstr "Vil du virkelig slette denne bruger" +msgstr "Vil du virkelig slette denne bruger?" #: ../templates/users.php:109 msgid "Do you really want to delete group" -msgstr "Vil du virkelig slette denne gruppe" +msgstr "Vil du virkelig slette denne gruppe?" + diff --git a/l10n/da/core.po b/l10n/da/core.po index b31b7b93dbc..df83958287b 100644 --- a/l10n/da/core.po +++ b/l10n/da/core.po @@ -3,14 +3,13 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-06-20 22:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2011-06-21 15:10+0100\n" +"Last-Translator: Mikkel Bjerg Larsen \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" @@ -23,7 +22,7 @@ msgstr "Fejl 404, Skyen kan ikke findes" #: ../templates/installation.php:6 msgid "Welcome to ownCloud, your personnal cloud." -msgstr "Velkommen til ownCloud, Din personlige Sky." +msgstr "Velkommen til ownCloud, din personlige Sky." #: ../templates/installation.php:7 msgid "To finish the installation, please follow the steps below." @@ -94,16 +93,12 @@ msgid "Finish setup" msgstr "Afslut installation" #: ../templates/layout.guest.php:20 -msgid "" -"ownCloud is a personal cloud which runs " -"on your own server.

        " -msgstr "" -"ownCloud er din personly sky der køre " -"på din egen server.

        " +msgid "ownCloud is a personal cloud which runs on your own server.

        " +msgstr "ownCloud er din personly sky der køre på din egen server.

        " #: ../templates/login.php:6 msgid "Login failed!" -msgstr "Login misslykkedes" +msgstr "Login mislykkedes" #: ../templates/logout.php:1 msgid "You are logged out." @@ -120,3 +115,4 @@ msgstr "næste" #: ../templates/part.searchbox.php:3 msgid "Search" msgstr "Søg" + diff --git a/l10n/da/help.po b/l10n/da/help.po index cd06f9b10ad..d09d34e0aa8 100644 --- a/l10n/da/help.po +++ b/l10n/da/help.po @@ -3,24 +3,24 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-06-20 22:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2011-06-21 15:02+0100\n" +"Last-Translator: Mikkel Bjerg Larsen \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../templates/index.php:2 msgid "Questions and Answers" -msgstr "" +msgstr "Spørgsmål og Svar" #: ../templates/index.php:21 msgid "ASK A QUESTION" -msgstr "" +msgstr "STIL ET SPØRGSMÅL" + diff --git a/l10n/da/settings.po b/l10n/da/settings.po index b00f26b052a..c7981c921fb 100644 --- a/l10n/da/settings.po +++ b/l10n/da/settings.po @@ -3,14 +3,13 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-06-20 22:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2011-06-21 15:00+0100\n" +"Last-Translator: Mikkel Bjerg Larsen \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" @@ -47,7 +46,7 @@ msgstr "Gamle adgangskode" #: ../templates/index.php:19 msgid "New password" -msgstr "Ny adgangskode" +msgstr "Nye adgangskode" #: ../templates/index.php:24 msgid "Show new password" @@ -57,7 +56,8 @@ msgstr "Vis den nye adgangskode" msgid "Language" msgstr "Sprog" -#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 +#: ../ajax/changepassword.php:13 +#: ../ajax/setlanguage.php:13 msgid "Authentication error" msgstr "Godkendelsesfejl" @@ -67,7 +67,7 @@ msgstr "Du skal indtaste din gamle og nye adganskode" #: ../ajax/changepassword.php:25 msgid "Your old password is wrong!" -msgstr "Dit gamle adgangskode er forkert!" +msgstr "Din gamle adgangskode er forkert!" #: ../ajax/changepassword.php:31 msgid "Password changed" @@ -84,3 +84,4 @@ msgstr "Sprog ændret" #: ../ajax/setlanguage.php:23 msgid "Invalid request" msgstr "Invalid forespørgsel" + diff --git a/settings/l10n/da.php b/settings/l10n/da.php index 1c0b87f8675..37a56f2f64c 100644 --- a/settings/l10n/da.php +++ b/settings/l10n/da.php @@ -6,12 +6,12 @@ "Change Password" => "Ændre adgangskode", "Your password got changed" => "Din adgangskode er ændret", "Old password:" => "Gamle adgangskode", -"New password" => "Ny adgangskode", +"New password" => "Nye adgangskode", "Show new password" => "Vis den nye adgangskode", "Language" => "Sprog", "Authentication error" => "Godkendelsesfejl", "You have to enter the old and the new password!" => "Du skal indtaste din gamle og nye adganskode", -"Your old password is wrong!" => "Dit gamle adgangskode er forkert!", +"Your old password is wrong!" => "Din gamle adgangskode er forkert!", "Password changed" => "Adgangskoden er ændret", "Unable to change password" => "Kan ikke ændre din adgangskode", "Language changed" => "Sprog ændret", -- cgit v1.2.3 From c25474e2c587a394c33af4748733a604b7d2a711 Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Tue, 21 Jun 2011 16:19:30 +0200 Subject: Updated l10n script, fixed translation in admin/users template --- admin/templates/users.php | 2 +- l10n/l10n.pl | 15 ++++++--------- l10n/templates/admin.pot | 6 +++++- l10n/templates/core.pot | 2 +- l10n/templates/help.pot | 2 +- l10n/templates/log.pot | 2 +- l10n/templates/settings.pot | 2 +- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/admin/templates/users.php b/admin/templates/users.php index 0c26fd3bdf4..70fc8b3ab2f 100644 --- a/admin/templates/users.php +++ b/admin/templates/users.php @@ -1,4 +1,4 @@ -

        Users

        +

        t( 'Users' ); ?>

        diff --git a/l10n/l10n.pl b/l10n/l10n.pl index 88abc821e95..0ad33d2116b 100644 --- a/l10n/l10n.pl +++ b/l10n/l10n.pl @@ -54,16 +54,13 @@ if( $task eq 'read' ){ pop( @temp ); my $app = pop( @temp ); chdir( $dir ); - foreach my $language ( @languages ){ - my $output = "${whereami}/$language/$app.po"; - $output .= 't' if $language eq 'templates'; + my $output = "${whereami}/templates/$app.pot"; - if( -e $output ){ - `xgettext --files-from=xgettextfiles --join-existing --output="$output" --keyword=t` - } - else{ - `xgettext --files-from=xgettextfiles --output="$output" --keyword=t` - } + if( -e $output ){ + `xgettext --files-from=xgettextfiles --join-existing --output="$output" --keyword=t` + } + else{ + `xgettext --files-from=xgettextfiles --output="$output" --keyword=t` } chdir( $whereami ); } diff --git a/l10n/templates/admin.pot b/l10n/templates/admin.pot index c683082b6f8..cb01fee4d23 100644 --- a/l10n/templates/admin.pot +++ b/l10n/templates/admin.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -89,3 +89,7 @@ msgstr "" #: ../templates/users.php:109 msgid "Do you really want to delete group" msgstr "" + +#: ../templates/users.php:1 +msgid "Users" +msgstr "" diff --git a/l10n/templates/core.pot b/l10n/templates/core.pot index ef4f80b580b..679ca60a989 100644 --- a/l10n/templates/core.pot +++ b/l10n/templates/core.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/help.pot b/l10n/templates/help.pot index cd06f9b10ad..43b9b26ff0c 100644 --- a/l10n/templates/help.pot +++ b/l10n/templates/help.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/log.pot b/l10n/templates/log.pot index c73912a6262..91339d45132 100644 --- a/l10n/templates/log.pot +++ b/l10n/templates/log.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/l10n/templates/settings.pot b/l10n/templates/settings.pot index 55f3298f6f9..ff8029ae465 100644 --- a/l10n/templates/settings.pot +++ b/l10n/templates/settings.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-20 22:00+0200\n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3 From c36b8621b4e91f01e979d62d3af2075e5e5630ee Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Tue, 21 Jun 2011 19:18:34 +0200 Subject: fixed wrong php tags --- admin/templates/users.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/templates/users.php b/admin/templates/users.php index 70fc8b3ab2f..133028c4e27 100644 --- a/admin/templates/users.php +++ b/admin/templates/users.php @@ -22,8 +22,8 @@ - + -- cgit v1.2.3 From 299d7bc3063a064cd0d86af75e4172fd46cdd81e Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Tue, 21 Jun 2011 23:05:54 +0200 Subject: install new shipped apps before fetching all apps --- admin/apps.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/admin/apps.php b/admin/apps.php index 56e76d139d2..285cf9e90f5 100644 --- a/admin/apps.php +++ b/admin/apps.php @@ -40,11 +40,10 @@ if(isset($_GET['installed'])) $installed=true; else $installed=false; if($installed){ global $SERVERROOT; + OC_INSTALLER::installShippedApps(false); $apps = OC_APPCONFIG::getApps(); $records = array(); - OC_INSTALLER::installShippedApps(false); - OC_APP::setActiveNavigationEntry( "core_apps_installed" ); foreach($apps as $app){ $info=OC_APP::getAppInfo("$SERVERROOT/apps/$app/appinfo/info.xml"); -- cgit v1.2.3 From 36dbb8edab6de784c45eee688000c5e330e70478 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 21 Jun 2011 23:58:02 +0200 Subject: prefix the mysql user name to avoid collissions --- lib/setup.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index 281f24db507..0a8c9650cbc 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -97,13 +97,20 @@ class OC_SETUP { else { $query="SELECT user FROM mysql.user WHERE user='$dbuser'"; //this should be enough to check for admin rights in mysql if(mysql_query($query, $connection)) { - self::createDBUser($username, $password, $connection); //use the admin login data for the new database user - OC_CONFIG::setValue('dbuser', $username); - OC_CONFIG::setValue('dbpassword', $password); + + //add prefix to the mysql user name to prevent collissions + $dbusername='oc_mysql_'.$username; + //hash the password so we don't need to store the admin config in the config file + $dbpassowrd=md5(time().$password); + + self::createDBUser($dbusername, $dbpassowrd, $connection); + + OC_CONFIG::setValue('dbuser', $dbusername); + OC_CONFIG::setValue('dbpassword', $dbpassowrd); //create the database - self::createDatabase($dbname, $username, $connection); + self::createDatabase($dbname, $dbusername, $connection); } else { OC_CONFIG::setValue('dbuser', $dbuser); -- cgit v1.2.3 From 77f5fa0f078b03b96afe843ece35725a501ebe77 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Wed, 22 Jun 2011 01:45:50 +0200 Subject: fix "files" app admin link visible for non-admins --- files/appinfo/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/appinfo/app.php b/files/appinfo/app.php index bf67812cf38..06ca16e82d4 100644 --- a/files/appinfo/app.php +++ b/files/appinfo/app.php @@ -3,7 +3,7 @@ OC_APP::register( array( "order" => 2, "id" => "files", "name" => "Files" )); OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "home.png" ), "name" => "Files" )); -OC_APP::addSettingsPage( array( "id" => "files_administration", "order" => 1, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files", "icon" => OC_HELPER::imagePath( "files", "folder.png" ))); +OC_APP::addAdminPage( array( "id" => "files_administration", "order" => 3, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files", "icon" => OC_HELPER::imagePath( "files", "folder.png" ))); // To add navigation sub entries use -- cgit v1.2.3 From 4f6ea7e64824888a0a704f6c5f1cd32369d46afc Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Wed, 22 Jun 2011 03:55:13 +0200 Subject: added polish translation --- admin/l10n/pl.php | 21 +++++++++ core/l10n/pl.php | 27 +++++++++++ help/l10n/pl.php | 4 ++ l10n/pl/admin.po | 96 ++++++++++++++++++++++++++++++++++++++++ l10n/pl/core.po | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++ l10n/pl/help.po | 28 ++++++++++++ l10n/pl/log.po | 68 ++++++++++++++++++++++++++++ l10n/pl/settings.po | 88 ++++++++++++++++++++++++++++++++++++ log/l10n/pl.php | 14 ++++++ settings/l10n/pl.php | 19 ++++++++ 10 files changed, 488 insertions(+) create mode 100644 admin/l10n/pl.php create mode 100644 core/l10n/pl.php create mode 100644 help/l10n/pl.php create mode 100644 l10n/pl/admin.po create mode 100644 l10n/pl/core.po create mode 100644 l10n/pl/help.po create mode 100644 l10n/pl/log.po create mode 100644 l10n/pl/settings.po create mode 100644 log/l10n/pl.php create mode 100644 settings/l10n/pl.php diff --git a/admin/l10n/pl.php b/admin/l10n/pl.php new file mode 100644 index 00000000000..9995c5da56f --- /dev/null +++ b/admin/l10n/pl.php @@ -0,0 +1,21 @@ + "czytaj więcej", +"INSTALL" => "INSTALUJ", +"Apps Repository" => "Repozytorium aplikacji", +"Cannot connect to apps repository" => "Nie można połączyć się z repozytorium aplikacji", +"Name" => "Nazwa", +"Modified" => "Zmodyfikowano", +"Administration" => "Administracja", +"System Settings" => "Ustawienia systemowe", +"Add user" => "Dodaj użytkownika", +"Password" => "Hasło", +"Create user" => "Utwórz użytkownika", +"remove" => "usuń", +"Groups" => "Grupy", +"Create group" => "Utwórz grupę", +"Force new password:" => "Wymuś nowe hasło", +"Set" => "Ustaw", +"Do you really want to delete user" => "Czy naprawdę chcesz usunąć użytkownika", +"Do you really want to delete group" => "Czy naprawdę chcesz usunąć grupę", +"Users" => "Użytkownicy" +); diff --git a/core/l10n/pl.php b/core/l10n/pl.php new file mode 100644 index 00000000000..6914e11557a --- /dev/null +++ b/core/l10n/pl.php @@ -0,0 +1,27 @@ + "Błąd 404, Chmura nie znaleziona", +"Welcome to ownCloud, your personnal cloud." => "Witaj w ownCloud, Twojej osobistej chmurze.", +"To finish the installation, please follow the steps below." => "By zakończyć instalację, podążaj poniższymi krokami.", +"Create an admin account." => "Utwórz konto administratora.", +"Login:" => "Login:", +"Password:" => "Hasło:", +"Advanced" => "Zaawansowane", +"Set where to store the data." => "Ustaw, gdzie przechowywać dane.", +"Data directory:" => "Katalog danych:", +"Configure your database." => "Skonfiguruj Twoją bazę danych.", +"I will use a SQLite database. You have nothing to do!" => "Użyję bazy SQLite. Nie masz tu nic do roboty!", +"SQLite" => "SQLite", +"I will use a MySQL database." => "Użyję bazy danych MySQL.", +"Host:" => "Host:", +"Database name:" => "Nazwa bazy:", +"Table prefix:" => "Przedrostek tabeli:", +"MySQL user login:" => "Login użytkownika MySQL:", +"MySQL user password:" => "Hasło użytkownika MySQL:", +"Finish setup" => "Zakończ instalację", +"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud jest osobistą chmurą działającą na Twoim własnym serwerze.

        ", +"Login failed!" => "Nie udało się zalogować!", +"You are logged out." => "Jesteś wylogowany.", +"prev" => "wstecz", +"next" => "dalej", +"Search" => "Szukaj" +); diff --git a/help/l10n/pl.php b/help/l10n/pl.php new file mode 100644 index 00000000000..7d37913d037 --- /dev/null +++ b/help/l10n/pl.php @@ -0,0 +1,4 @@ + "Pytania i odpowiedzi", +"ASK A QUESTION" => "ZADAJ PYTANIE" +); diff --git a/l10n/pl/admin.po b/l10n/pl/admin.po new file mode 100644 index 00000000000..858dccf6687 --- /dev/null +++ b/l10n/pl/admin.po @@ -0,0 +1,96 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Kamil Domański , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" +"PO-Revision-Date: 2011-06-22 03:28+0200\n" +"Last-Translator: Kamil Domański \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/app.php:22 +msgid "read more" +msgstr "czytaj więcej" + +#: ../templates/app.php:24 +msgid "INSTALL" +msgstr "INSTALUJ" + +#: ../templates/app_noconn.php:6 ../templates/apps.php:6 +msgid "Apps Repository" +msgstr "Repozytorium aplikacji" + +#: ../templates/app_noconn.php:7 +msgid "Cannot connect to apps repository" +msgstr "Nie można połączyć się z repozytorium aplikacji" + +#: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 +#: ../templates/users.php:50 +msgid "Name" +msgstr "Nazwa" + +#: ../templates/apps.php:14 +msgid "Modified" +msgstr "Zmodyfikowano" + +#: ../templates/system.php:6 +msgid "Administration" +msgstr "Administracja" + +#: ../templates/system.php:7 +msgid "System Settings" +msgstr "Ustawienia systemowe" + +#: ../templates/users.php:13 +msgid "Add user" +msgstr "Dodaj użytkownika" + +#: ../templates/users.php:21 +msgid "Password" +msgstr "Hasło" + +#: ../templates/users.php:30 +msgid "Create user" +msgstr "Utwórz użytkownika" + +#: ../templates/users.php:40 ../templates/users.php:68 +msgid "remove" +msgstr "usuń" + +#: ../templates/users.php:46 ../templates/users.php:7 +msgid "Groups" +msgstr "Grupy" + +#: ../templates/users.php:58 +msgid "Create group" +msgstr "Utwórz grupę" + +#: ../templates/users.php:94 +msgid "Force new password:" +msgstr "Wymuś nowe hasło" + +#: ../templates/users.php:96 +msgid "Set" +msgstr "Ustaw" + +#: ../templates/users.php:102 +msgid "Do you really want to delete user" +msgstr "Czy naprawdę chcesz usunąć użytkownika" + +#: ../templates/users.php:109 +msgid "Do you really want to delete group" +msgstr "Czy naprawdę chcesz usunąć grupę" + +#: ../templates/users.php:1 +msgid "Users" +msgstr "Użytkownicy" + diff --git a/l10n/pl/core.po b/l10n/pl/core.po new file mode 100644 index 00000000000..717555818e2 --- /dev/null +++ b/l10n/pl/core.po @@ -0,0 +1,123 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Kamil Domański , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" +"PO-Revision-Date: 2011-06-22 03:36+0200\n" +"Last-Translator: Kamil Domański \n" +"Language-Team: American English \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../templates/404.php:15 +msgid "Error 404, Cloud not found" +msgstr "Błąd 404, Chmura nie znaleziona" + +#: ../templates/installation.php:6 +msgid "Welcome to ownCloud, your personnal cloud." +msgstr "Witaj w ownCloud, Twojej osobistej chmurze." + +#: ../templates/installation.php:7 +msgid "To finish the installation, please follow the steps below." +msgstr "By zakończyć instalację, podążaj poniższymi krokami." + +#: ../templates/installation.php:26 +msgid "Create an admin account." +msgstr "Utwórz konto administratora." + +#: ../templates/installation.php:27 +msgid "Login:" +msgstr "Login:" + +#: ../templates/installation.php:28 +msgid "Password:" +msgstr "Hasło:" + +#: ../templates/installation.php:31 +msgid "Advanced" +msgstr "Zaawansowane" + +#: ../templates/installation.php:34 +msgid "Set where to store the data." +msgstr "Ustaw, gdzie przechowywać dane." + +#: ../templates/installation.php:35 +msgid "Data directory:" +msgstr "Katalog danych:" + +#: ../templates/installation.php:39 +msgid "Configure your database." +msgstr "Skonfiguruj Twoją bazę danych." + +#: ../templates/installation.php:43 +msgid "I will use a SQLite database. You have nothing to do!" +msgstr "Użyję bazy SQLite. Nie masz tu nic do roboty!" + +#: ../templates/installation.php:46 +msgid "SQLite" +msgstr "SQLite" + +#: ../templates/installation.php:53 +msgid "I will use a MySQL database." +msgstr "Użyję bazy danych MySQL." + +#: ../templates/installation.php:59 +msgid "Host:" +msgstr "Host:" + +#: ../templates/installation.php:60 +msgid "Database name:" +msgstr "Nazwa bazy:" + +#: ../templates/installation.php:61 +msgid "Table prefix:" +msgstr "Przedrostek tabeli:" + +#: ../templates/installation.php:62 +msgid "MySQL user login:" +msgstr "Login użytkownika MySQL:" + +#: ../templates/installation.php:63 +msgid "MySQL user password:" +msgstr "Hasło użytkownika MySQL:" + +#: ../templates/installation.php:68 +msgid "Finish setup" +msgstr "Zakończ instalację" + +#: ../templates/layout.guest.php:20 +msgid "" +"ownCloud is a personal cloud which runs " +"on your own server.

        " +msgstr "" +"ownCloud jest osobistą chmurą działającą " +"na Twoim własnym serwerze.

        " + +#: ../templates/login.php:6 +msgid "Login failed!" +msgstr "Nie udało się zalogować!" + +#: ../templates/logout.php:1 +msgid "You are logged out." +msgstr "Jesteś wylogowany." + +#: ../templates/part.pagenavi.php:6 +msgid "prev" +msgstr "wstecz" + +#: ../templates/part.pagenavi.php:26 +msgid "next" +msgstr "dalej" + +#: ../templates/part.searchbox.php:3 +msgid "Search" +msgstr "Szukaj" + diff --git a/l10n/pl/help.po b/l10n/pl/help.po new file mode 100644 index 00000000000..a9d8481d5ce --- /dev/null +++ b/l10n/pl/help.po @@ -0,0 +1,28 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Kamil Domański , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" +"PO-Revision-Date: 2011-06-22 03:45+0200\n" +"Last-Translator: Kamil Domański \n" +"Language-Team: Polish \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: ../templates/index.php:2 +msgid "Questions and Answers" +msgstr "Pytania i odpowiedzi" + +#: ../templates/index.php:21 +msgid "ASK A QUESTION" +msgstr "ZADAJ PYTANIE" + diff --git a/l10n/pl/log.po b/l10n/pl/log.po new file mode 100644 index 00000000000..9c426ec2318 --- /dev/null +++ b/l10n/pl/log.po @@ -0,0 +1,68 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Kamil Domański , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" +"PO-Revision-Date: 2011-06-22 03:50+0200\n" +"Last-Translator: Kamil Domański \n" +"Language-Team: Polish \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: ../templates/index.php:4 +msgid "Filter:" +msgstr "Filtr:" + +#: ../templates/index.php:7 +msgid "Logins" +msgstr "Zalogowania" + +#: ../templates/index.php:8 +msgid "Logouts" +msgstr "Wylogowani" + +#: ../templates/index.php:9 +msgid "Downloads" +msgstr "Pobrania" + +#: ../templates/index.php:10 +msgid "Uploads" +msgstr "Wgrania" + +#: ../templates/index.php:11 +msgid "Creations" +msgstr "Utworzenia" + +#: ../templates/index.php:12 +msgid "Deletions" +msgstr "Usunięcia" + +#: ../templates/index.php:15 +msgid "Show:" +msgstr "Pokaż:" + +#: ../templates/index.php:16 +msgid "entries per page." +msgstr "wpisów na stronę." + +#: ../templates/index.php:26 +msgid "What" +msgstr "Co" + +#: ../templates/index.php:27 +msgid "When" +msgstr "Kiedy" + +#: ../templates/index.php:45 +msgid "Clear log entries before" +msgstr "Wyczyść spisy dziennika sprzed" + diff --git a/l10n/pl/settings.po b/l10n/pl/settings.po new file mode 100644 index 00000000000..6dec38f1054 --- /dev/null +++ b/l10n/pl/settings.po @@ -0,0 +1,88 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Kamil Domański , 2011. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-06-21 16:19+0200\n" +"PO-Revision-Date: 2011-06-22 03:52+0200\n" +"Last-Translator: Kamil Domański \n" +"Language-Team: Polish \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" + +#: ../templates/index.php:3 +msgid "Account information" +msgstr "Dane konta" + +#: ../templates/index.php:5 +msgid "You're currently using" +msgstr "Obecnie używasz" + +#: ../templates/index.php:5 +msgid "of your" +msgstr "ze swoich" + +#: ../templates/index.php:5 +msgid "space" +msgstr "przestrzeni" + +#: ../templates/index.php:11 +msgid "Change Password" +msgstr "Zmień hasło" + +#: ../templates/index.php:12 +msgid "Your password got changed" +msgstr "Twoje hasło zostało zmienione" + +#: ../templates/index.php:15 +msgid "Old password:" +msgstr "Stare hasło" + +#: ../templates/index.php:19 +msgid "New password" +msgstr "Nowe hasło" + +#: ../templates/index.php:24 +msgid "Show new password" +msgstr "Pokaż nowe hasło" + +#: ../templates/index.php:34 +msgid "Language" +msgstr "Język" + +#: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 +msgid "Authentication error" +msgstr "Błąd uwierzytelniania" + +#: ../ajax/changepassword.php:19 +msgid "You have to enter the old and the new password!" +msgstr "Musisz wprowadzić zarówno stare, jak i nowe hasło!" + +#: ../ajax/changepassword.php:25 +msgid "Your old password is wrong!" +msgstr "Twoje stare hasło jest błędne!" + +#: ../ajax/changepassword.php:31 +msgid "Password changed" +msgstr "Hasło zmienione" + +#: ../ajax/changepassword.php:34 +msgid "Unable to change password" +msgstr "NIe można zmienić hasła" + +#: ../ajax/setlanguage.php:21 +msgid "Language changed" +msgstr "Język zmieniony" + +#: ../ajax/setlanguage.php:23 +msgid "Invalid request" +msgstr "Nieprawidłowe żądanie" + diff --git a/log/l10n/pl.php b/log/l10n/pl.php new file mode 100644 index 00000000000..322e5df1add --- /dev/null +++ b/log/l10n/pl.php @@ -0,0 +1,14 @@ + "Filtr:", +"Logins" => "Zalogowania", +"Logouts" => "Wylogowani", +"Downloads" => "Pobrania", +"Uploads" => "Wgrania", +"Creations" => "Utworzenia", +"Deletions" => "Usunięcia", +"Show:" => "Pokaż:", +"entries per page." => "wpisów na stronę.", +"What" => "Co", +"When" => "Kiedy", +"Clear log entries before" => "Wyczyść spisy dziennika sprzed" +); diff --git a/settings/l10n/pl.php b/settings/l10n/pl.php new file mode 100644 index 00000000000..b65fdd15b4d --- /dev/null +++ b/settings/l10n/pl.php @@ -0,0 +1,19 @@ + "Dane konta", +"You're currently using" => "Obecnie używasz", +"of your" => "ze swoich", +"space" => "przestrzeni", +"Change Password" => "Zmień hasło", +"Your password got changed" => "Twoje hasło zostało zmienione", +"Old password:" => "Stare hasło", +"New password" => "Nowe hasło", +"Show new password" => "Pokaż nowe hasło", +"Language" => "Język", +"Authentication error" => "Błąd uwierzytelniania", +"You have to enter the old and the new password!" => "Musisz wprowadzić zarówno stare, jak i nowe hasło!", +"Your old password is wrong!" => "Twoje stare hasło jest błędne!", +"Password changed" => "Hasło zmienione", +"Unable to change password" => "NIe można zmienić hasła", +"Language changed" => "Język zmieniony", +"Invalid request" => "Nieprawidłowe żądanie" +); -- cgit v1.2.3 From c0af177223f5ebd74614b775121ea7f3497d25a5 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 22 Jun 2011 12:40:13 +0200 Subject: public link config is also for non admins --- apps/files_publiclink/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_publiclink/admin.php b/apps/files_publiclink/admin.php index a48076b4d42..afb726da312 100644 --- a/apps/files_publiclink/admin.php +++ b/apps/files_publiclink/admin.php @@ -29,7 +29,7 @@ require( 'template.php' ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn()){ header( "Location: ".OC_HELPER::linkTo( "index.php" )); exit(); } -- cgit v1.2.3 From 83958ebd4be58c64b23a3e9535f4246faeff8f4a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 22 Jun 2011 12:50:57 +0200 Subject: add oc_user::getUser to get the user id of the loggedin user --- admin/ajax/changepassword.php | 2 +- admin/ajax/creategroup.php | 2 +- admin/ajax/createuser.php | 2 +- admin/ajax/removegroup.php | 2 +- admin/ajax/removeuser.php | 2 +- admin/ajax/togglegroups.php | 2 +- admin/apps.php | 2 +- admin/system.php | 2 +- admin/users.php | 2 +- apps/files_publiclink/lib_public.php | 6 +++--- files/admin.php | 2 +- lib/base.php | 2 +- lib/l10n.php | 4 ++-- lib/user.php | 13 +++++++++++++ log/index.php | 8 ++++---- settings/ajax/setlanguage.php | 2 +- settings/index.php | 2 +- 17 files changed, 35 insertions(+), 22 deletions(-) diff --git a/admin/ajax/changepassword.php b/admin/ajax/changepassword.php index a8f3af15175..51634908a76 100644 --- a/admin/ajax/changepassword.php +++ b/admin/ajax/changepassword.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } diff --git a/admin/ajax/creategroup.php b/admin/ajax/creategroup.php index eec27587930..df9a36aaa2f 100644 --- a/admin/ajax/creategroup.php +++ b/admin/ajax/creategroup.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } diff --git a/admin/ajax/createuser.php b/admin/ajax/createuser.php index a6e4ec0e93d..507ded9079f 100644 --- a/admin/ajax/createuser.php +++ b/admin/ajax/createuser.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } diff --git a/admin/ajax/removegroup.php b/admin/ajax/removegroup.php index c7991ba5819..e3d62e5fac8 100644 --- a/admin/ajax/removegroup.php +++ b/admin/ajax/removegroup.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } diff --git a/admin/ajax/removeuser.php b/admin/ajax/removeuser.php index 7e587f16058..6b48146ad45 100644 --- a/admin/ajax/removeuser.php +++ b/admin/ajax/removeuser.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } diff --git a/admin/ajax/togglegroups.php b/admin/ajax/togglegroups.php index f821ae0bfaa..5c7bd393e92 100644 --- a/admin/ajax/togglegroups.php +++ b/admin/ajax/togglegroups.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } diff --git a/admin/apps.php b/admin/apps.php index 285cf9e90f5..b47611f536d 100644 --- a/admin/apps.php +++ b/admin/apps.php @@ -24,7 +24,7 @@ require_once('../lib/base.php'); include_once('../lib/installer.php'); require( 'template.php' ); -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ header( "Location: ".OC_HELPER::linkTo( "", "index.php" )); exit(); } diff --git a/admin/system.php b/admin/system.php index 310979295f0..284509144ee 100644 --- a/admin/system.php +++ b/admin/system.php @@ -23,7 +23,7 @@ require_once('../lib/base.php'); require( 'template.php' ); -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ header( "Location: ".OC_HELPER::linkTo( "index.php" )); exit(); } diff --git a/admin/users.php b/admin/users.php index e44feb40fe2..0848d57162a 100644 --- a/admin/users.php +++ b/admin/users.php @@ -23,7 +23,7 @@ require_once('../lib/base.php'); require( 'template.php' ); -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ header( "Location: ".OC_HELPER::linkTo( "index.php" )); exit(); } diff --git a/apps/files_publiclink/lib_public.php b/apps/files_publiclink/lib_public.php index aeef9212377..93ccc52d0e9 100644 --- a/apps/files_publiclink/lib_public.php +++ b/apps/files_publiclink/lib_public.php @@ -7,7 +7,7 @@ class OC_PublicLink{ */ public function __construct($path,$expiretime=0){ if($path and OC_FILESYSTEM::file_exists($path) and OC_FILESYSTEM::is_readable($path)){ - $user=$_SESSION['user_id']; + $user=OC_USER::getUser(); $token=sha1("$user-$path-$expiretime"); $query=OC_DB::prepare("INSERT INTO *PREFIX*publiclink VALUES(?,?,?,?)"); $result=$query->execute(array($token,$path,$user,$expiretime)); @@ -60,7 +60,7 @@ class OC_PublicLink{ */ static public function getLinks(){ $query=OC_DB::prepare("SELECT * FROM *PREFIX*publiclink WHERE user=?"); - return $query->execute(array($_SESSION['user_id']))->fetchAll(); + return $query->execute(array(OC_USER::getUser()))->fetchAll(); } /** @@ -69,7 +69,7 @@ class OC_PublicLink{ static public function delete($token){ $query=OC_DB::prepare("SELECT user,path FROM *PREFIX*publiclink WHERE token=?"); $result=$query->execute(array($token))->fetchAll(); - if(count($result)>0 and $result[0]['user']==$_SESSION['user_id']){ + if(count($result)>0 and $result[0]['user']==OC_USER::getUser()){ $query=OC_DB::prepare("DELETE FROM *PREFIX*publiclink WHERE token=?"); $query->execute(array($token)); } diff --git a/files/admin.php b/files/admin.php index 59b822468ed..5c9923aff86 100644 --- a/files/admin.php +++ b/files/admin.php @@ -28,7 +28,7 @@ require( 'template.php' ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ header( "Location: ".OC_HELPER::linkTo( "index.php" )); exit(); } diff --git a/lib/base.php b/lib/base.php index e93c4712727..0453e272a4b 100644 --- a/lib/base.php +++ b/lib/base.php @@ -142,7 +142,7 @@ class OC_UTIL { // If we are not forced to load a specific user we load the one that is logged in if( $user == "" && OC_USER::isLoggedIn()){ - $user = $_SESSION['user_id']; + $user = OC_USER::getUser(); } if( $user != "" ){ //if we aren't logged in, there is no use to set up the filesystem diff --git a/lib/l10n.php b/lib/l10n.php index ff0238241a6..053c6fbc10e 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -200,8 +200,8 @@ class OC_L10N{ else{ $available=self::findAvailableLanguages( $app ); } - if( isset($_SESSION['user_id']) && $_SESSION['user_id'] && OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' )){ - $lang = OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' ); + if( OC_USER::getUser() && OC_PREFERENCES::getValue( OC_USER::getUser(), 'core', 'lang' )){ + $lang = OC_PREFERENCES::getValue( OC_USER::getUser(), 'core', 'lang' ); self::$language = $lang; if( array_search( $lang, $available ) !== false ){ return $lang; diff --git a/lib/user.php b/lib/user.php index 2e11a30e85e..7eafef924a8 100644 --- a/lib/user.php +++ b/lib/user.php @@ -231,6 +231,19 @@ class OC_USER { } } + /** + * @brief get the user idea of the user currently logged in. + * @return string uid or false + */ + public static function getUser(){ + if( isset($_SESSION['user_id']) AND $_SESSION['user_id'] ){ + return $_SESSION['user_id']; + } + else{ + return false; + } + } + /** * @brief Autogenerate a password * @returns string diff --git a/log/index.php b/log/index.php index 950e1f82d19..4986526e007 100644 --- a/log/index.php +++ b/log/index.php @@ -43,8 +43,8 @@ if(isset($_POST['save'])){ $selectedActions[]=$action; } } - OC_PREFERENCES::setValue($_SESSION['user_id'],'log','actions',implode(',',$selectedActions)); - OC_PREFERENCES::setValue($_SESSION['user_id'],'log','pagesize',$_POST['size']); + OC_PREFERENCES::setValue(OC_USER::getUser(),'log','actions',implode(',',$selectedActions)); + OC_PREFERENCES::setValue(OC_USER::getUser(),'log','pagesize',$_POST['size']); } //clear log entries elseif(isset($_POST['clear'])){ @@ -62,10 +62,10 @@ OC_APP::setActiveNavigationEntry( 'log' ); $logs=OC_LOG::get(); -$selectedActions=explode(',',OC_PREFERENCES::getValue($_SESSION['user_id'],'log','actions',implode(',',$allActions))); +$selectedActions=explode(',',OC_PREFERENCES::getValue(OC_USER::getUser(),'log','actions',implode(',',$allActions))); $logs=OC_LOG::filterAction($logs,$selectedActions); -$pageSize=OC_PREFERENCES::getValue($_SESSION['user_id'],'log','pagesize',20); +$pageSize=OC_PREFERENCES::getValue(OC_USER::getUser(),'log','pagesize',20); $pageCount=ceil(count($logs)/$pageSize); $page=isset($_GET['page'])?$_GET['page']:0; if($page>=$pageCount){ diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index f971806f4c6..bc467fb9004 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -17,7 +17,7 @@ if( !OC_USER::isLoggedIn()){ // Get data if( isset( $_POST['lang'] ) ){ $lang=$_POST['lang']; - OC_PREFERENCES::setValue( $_SESSION['user_id'], 'core', 'lang', $lang ); + OC_PREFERENCES::setValue( OC_USER::getUser(), 'core', 'lang', $lang ); echo json_encode( array( "status" => "success", "data" => array( "message" => $l->t("Language changed") ))); }else{ echo json_encode( array( "status" => "error", "data" => array( "message" => $l->t("Invalid request") ))); diff --git a/settings/index.php b/settings/index.php index e2a73a5d9f3..07adba142d6 100644 --- a/settings/index.php +++ b/settings/index.php @@ -18,7 +18,7 @@ $free=OC_FILESYSTEM::free_space(); $total=$free+$used; $relative=round(($used/$total)*100); -$lang=OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang', 'en' ); +$lang=OC_PREFERENCES::getValue( OC_USER::getUser(), 'core', 'lang', 'en' ); $languages=OC_L10N::findAvailableLanguages(); //put the current language in the front unset($languages[array_search($lang,$languages)]); -- cgit v1.2.3 From 50dbc533e184cbce9bae3dd6710fbf87ab22694f Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 23 Jun 2011 01:53:48 +0200 Subject: updated/finished German translation --- l10n/de/admin.po | 36 ++++++++++++++++++------------------ l10n/de/core.po | 32 +++++++++++++++++--------------- l10n/de/help.po | 4 ++-- l10n/de/settings.po | 34 +++++++++++++++++----------------- 4 files changed, 54 insertions(+), 52 deletions(-) diff --git a/l10n/de/admin.po b/l10n/de/admin.po index 94134e44397..58db3b78e6d 100644 --- a/l10n/de/admin.po +++ b/l10n/de/admin.po @@ -19,73 +19,73 @@ msgstr "" #: ../templates/app.php:22 msgid "read more" -msgstr "" +msgstr "mehr …" #: ../templates/app.php:24 msgid "INSTALL" -msgstr "" +msgstr "Installieren" #: ../templates/app_noconn.php:6 ../templates/apps.php:6 msgid "Apps Repository" -msgstr "" +msgstr "Anwendungen" #: ../templates/app_noconn.php:7 msgid "Cannot connect to apps repository" -msgstr "" +msgstr "Verbindung fehlgeschlagen" #: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 #: ../templates/users.php:50 msgid "Name" -msgstr "" +msgstr "Name" #: ../templates/apps.php:14 msgid "Modified" -msgstr "" +msgstr "Änderungsdatum" #: ../templates/system.php:6 msgid "Administration" -msgstr "" +msgstr "Verwaltung" #: ../templates/system.php:7 msgid "System Settings" -msgstr "" +msgstr "Systemeinstellungen" #: ../templates/users.php:7 ../templates/users.php:46 msgid "Groups" -msgstr "" +msgstr "Gruppen" #: ../templates/users.php:13 msgid "Add user" -msgstr "" +msgstr "Nutzer hinzufügen" #: ../templates/users.php:21 msgid "Password" -msgstr "" +msgstr "Passwort" #: ../templates/users.php:30 msgid "Create user" -msgstr "" +msgstr "Nutzer erstellen" #: ../templates/users.php:40 ../templates/users.php:68 msgid "remove" -msgstr "" +msgstr "entfernen" #: ../templates/users.php:58 msgid "Create group" -msgstr "" +msgstr "Gruppe erstellen" #: ../templates/users.php:94 msgid "Force new password:" -msgstr "" +msgstr "Neues Passwort:" #: ../templates/users.php:96 msgid "Set" -msgstr "" +msgstr "OK" #: ../templates/users.php:102 msgid "Do you really want to delete user" -msgstr "" +msgstr "Möchtest du den Nutzer wirklich entfernen?" #: ../templates/users.php:109 msgid "Do you really want to delete group" -msgstr "" +msgstr "Möchtest du die Gruppe wirklich entfernen?" diff --git a/l10n/de/core.po b/l10n/de/core.po index 8b232607d98..b78c7996190 100644 --- a/l10n/de/core.po +++ b/l10n/de/core.po @@ -19,19 +19,19 @@ msgstr "" #: ../templates/404.php:15 msgid "Error 404, Cloud not found" -msgstr "" +msgstr "Cloud konnte nicht gefunden werden." #: ../templates/installation.php:6 msgid "Welcome to ownCloud, your personnal cloud." -msgstr "" +msgstr "Willkommen bei ownCloud, deinem persönlichen Online-Speicher." #: ../templates/installation.php:7 msgid "To finish the installation, please follow the steps below." -msgstr "" +msgstr "Die Installation ist fast abgeschlossen." #: ../templates/installation.php:26 msgid "Create an admin account." -msgstr "" +msgstr "Verwaltungskonto erstellen." #: ../templates/installation.php:27 msgid "Login:" @@ -51,49 +51,51 @@ msgstr "Speicherort der Daten" #: ../templates/installation.php:35 msgid "Data directory:" -msgstr "" +msgstr "Datenverzeichnis:" #: ../templates/installation.php:39 msgid "Configure your database." -msgstr "" +msgstr "Datenbank einstellen." #: ../templates/installation.php:43 msgid "I will use a SQLite database. You have nothing to do!" -msgstr "" +msgstr "Es wird eine SQLite-Datenbank genutzt." #: ../templates/installation.php:46 msgid "SQLite" -msgstr "" +msgstr "SQLite" #: ../templates/installation.php:53 msgid "I will use a MySQL database." -msgstr "" +msgstr "Es wird eine MySQL-Datenbank genutzt." #: ../templates/installation.php:59 msgid "Host:" -msgstr "" +msgstr "Host:" #: ../templates/installation.php:60 msgid "Database name:" -msgstr "" +msgstr "Datenbankname:" #: ../templates/installation.php:61 msgid "Table prefix:" -msgstr "" +msgstr "Tabellenpräfix:" #: ../templates/installation.php:62 msgid "MySQL user login:" -msgstr "" +msgstr "MySQL-Nutzername:" #: ../templates/installation.php:63 msgid "MySQL user password:" -msgstr "" +msgstr "MySQL-Passwort:" #: ../templates/layout.guest.php:17 ../templates/layout.guest.php:20 msgid "" "ownCloud is a personal cloud which runs " "on your own server.

        " msgstr "" +"ownCloud ist ein privater Online-Speicher " +"für deinen eigenen Server.

        " #: ../templates/login.php:6 msgid "Login failed!" @@ -117,4 +119,4 @@ msgstr "Suchen" #: ../templates/installation.php:68 msgid "Finish setup" -msgstr "" +msgstr "Installation abschließen" diff --git a/l10n/de/help.po b/l10n/de/help.po index cd06f9b10ad..37029fffc70 100644 --- a/l10n/de/help.po +++ b/l10n/de/help.po @@ -19,8 +19,8 @@ msgstr "" #: ../templates/index.php:2 msgid "Questions and Answers" -msgstr "" +msgstr "Fragen & Antworten" #: ../templates/index.php:21 msgid "ASK A QUESTION" -msgstr "" +msgstr "Stell eine Frage" diff --git a/l10n/de/settings.po b/l10n/de/settings.po index 55f3298f6f9..423514bc130 100644 --- a/l10n/de/settings.po +++ b/l10n/de/settings.po @@ -19,68 +19,68 @@ msgstr "" #: ../templates/index.php:3 msgid "Account information" -msgstr "" +msgstr "Konto-Information" #: ../templates/index.php:5 msgid "You're currently using" -msgstr "" +msgstr "Du benutzt gerade" #: ../templates/index.php:5 msgid "of your" -msgstr "" +msgstr "von deinem" #: ../templates/index.php:5 msgid "space" -msgstr "" +msgstr "Speicherplatz" #: ../templates/index.php:11 msgid "Change Password" -msgstr "" +msgstr "Passwort ändern" #: ../templates/index.php:12 msgid "Your password got changed" -msgstr "" +msgstr "Dein Passwort wurde geändert." #: ../templates/index.php:15 msgid "Old password:" -msgstr "" +msgstr "Aktuelles Passwort:" #: ../templates/index.php:19 msgid "New password" -msgstr "" +msgstr "Neues Passwort:" #: ../templates/index.php:24 msgid "Show new password" -msgstr "" +msgstr "Neues Passwort anzeigen" #: ../templates/index.php:34 msgid "Language" -msgstr "" +msgstr "Sprache" #: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 msgid "Authentication error" -msgstr "" +msgstr "Berechtigungsfehler" #: ../ajax/changepassword.php:19 msgid "You have to enter the old and the new password!" -msgstr "" +msgstr "Du musst das aktuelle und ein neues Passwort angeben!" #: ../ajax/changepassword.php:25 msgid "Your old password is wrong!" -msgstr "" +msgstr "Du hast dein aktuelles Passwort falsch eingegeben!" #: ../ajax/changepassword.php:31 msgid "Password changed" -msgstr "" +msgstr "Passwort geändert" #: ../ajax/changepassword.php:34 msgid "Unable to change password" -msgstr "" +msgstr "Passwort konnte nicht geändert werden" #: ../ajax/setlanguage.php:21 msgid "Language changed" -msgstr "" +msgstr "Sprache geändert" #: ../ajax/setlanguage.php:23 msgid "Invalid request" -msgstr "" +msgstr "Ungültige Anfrage" -- cgit v1.2.3 From 481b7b25e2635f66b3aba6eeb4b2100b0f1a825b Mon Sep 17 00:00:00 2001 From: Jakob Sack Date: Thu, 23 Jun 2011 10:58:06 +0200 Subject: Make Jans German translation usuable --- admin/l10n/de.php | 20 ++++++++++++++++++++ core/l10n/de.php | 18 +++++++++++++++++- help/l10n/de.php | 4 ++++ l10n/de/log.po | 15 ++++++++------- settings/l10n/de.php | 19 +++++++++++++++++++ 5 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 admin/l10n/de.php create mode 100644 help/l10n/de.php create mode 100644 settings/l10n/de.php diff --git a/admin/l10n/de.php b/admin/l10n/de.php new file mode 100644 index 00000000000..9d1b12b1a16 --- /dev/null +++ b/admin/l10n/de.php @@ -0,0 +1,20 @@ + "mehr …", +"INSTALL" => "Installieren", +"Apps Repository" => "Anwendungen", +"Cannot connect to apps repository" => "Verbindung fehlgeschlagen", +"Name" => "Name", +"Modified" => "Änderungsdatum", +"Administration" => "Verwaltung", +"System Settings" => "Systemeinstellungen", +"Groups" => "Gruppen", +"Add user" => "Nutzer hinzufügen", +"Password" => "Passwort", +"Create user" => "Nutzer erstellen", +"remove" => "entfernen", +"Create group" => "Gruppe erstellen", +"Force new password:" => "Neues Passwort:", +"Set" => "OK", +"Do you really want to delete user" => "Möchtest du den Nutzer wirklich entfernen?", +"Do you really want to delete group" => "Möchtest du die Gruppe wirklich entfernen?" +); diff --git a/core/l10n/de.php b/core/l10n/de.php index cd89558a4dd..b1309beed06 100644 --- a/core/l10n/de.php +++ b/core/l10n/de.php @@ -1,11 +1,27 @@ "Cloud konnte nicht gefunden werden.", +"Welcome to ownCloud, your personnal cloud." => "Willkommen bei ownCloud, deinem persönlichen Online-Speicher.", +"To finish the installation, please follow the steps below." => "Die Installation ist fast abgeschlossen.", +"Create an admin account." => "Verwaltungskonto erstellen.", "Login:" => "Benutzername:", "Password:" => "Passwort:", "Advanced" => "Erweitert", "Set where to store the data." => "Speicherort der Daten", +"Data directory:" => "Datenverzeichnis:", +"Configure your database." => "Datenbank einstellen.", +"I will use a SQLite database. You have nothing to do!" => "Es wird eine SQLite-Datenbank genutzt.", +"SQLite" => "SQLite", +"I will use a MySQL database." => "Es wird eine MySQL-Datenbank genutzt.", +"Host:" => "Host:", +"Database name:" => "Datenbankname:", +"Table prefix:" => "Tabellenpräfix:", +"MySQL user login:" => "MySQL-Nutzername:", +"MySQL user password:" => "MySQL-Passwort:", +"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud ist ein privater Online-Speicher für deinen eigenen Server.

        ", "Login failed!" => "Anmeldung Fehlgeschlagen!", "You are logged out." => "Sie wurden abgemeldet.", "prev" => "zurück", "next" => "weiter", -"Search" => "Suchen" +"Search" => "Suchen", +"Finish setup" => "Installation abschließen" ); diff --git a/help/l10n/de.php b/help/l10n/de.php new file mode 100644 index 00000000000..07c5d1bb771 --- /dev/null +++ b/help/l10n/de.php @@ -0,0 +1,4 @@ + "Fragen & Antworten", +"ASK A QUESTION" => "Stell eine Frage" +); diff --git a/l10n/de/log.po b/l10n/de/log.po index 2bb4104b307..f552e1fd14c 100644 --- a/l10n/de/log.po +++ b/l10n/de/log.po @@ -1,21 +1,21 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. # -#, fuzzy +# Jakob Sack , 2011. msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-06-20 22:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2011-06-21 16:44+0200\n" +"Last-Translator: Jakob Sack \n" +"Language-Team: German \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../templates/index.php:4 msgid "Filter:" @@ -64,3 +64,4 @@ msgstr "Wann" #: ../templates/index.php:45 msgid "Clear log entries before" msgstr "Lösche Einträge vor dem" + diff --git a/settings/l10n/de.php b/settings/l10n/de.php new file mode 100644 index 00000000000..e3be20de33e --- /dev/null +++ b/settings/l10n/de.php @@ -0,0 +1,19 @@ + "Konto-Information", +"You're currently using" => "Du benutzt gerade", +"of your" => "von deinem", +"space" => "Speicherplatz", +"Change Password" => "Passwort ändern", +"Your password got changed" => "Dein Passwort wurde geändert.", +"Old password:" => "Aktuelles Passwort:", +"New password" => "Neues Passwort:", +"Show new password" => "Neues Passwort anzeigen", +"Language" => "Sprache", +"Authentication error" => "Berechtigungsfehler", +"You have to enter the old and the new password!" => "Du musst das aktuelle und ein neues Passwort angeben!", +"Your old password is wrong!" => "Du hast dein aktuelles Passwort falsch eingegeben!", +"Password changed" => "Passwort geändert", +"Unable to change password" => "Passwort konnte nicht geändert werden", +"Language changed" => "Sprache geändert", +"Invalid request" => "Ungültige Anfrage" +); -- cgit v1.2.3 From 51b25574700de137f15da880f51bf3a3fb167b4d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 23 Jun 2011 12:04:17 +0200 Subject: stop confusing people with a dummy share button --- files/templates/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/index.php b/files/templates/index.php index 0f24a00f077..6eaa380506d 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -16,7 +16,7 @@ t( 'Download' ); ?> - + t( 'Delete' ); ?>
        -- cgit v1.2.3 From 01471d3e2a29268e8f1dfa3c96da53a0bb9e731c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 23 Jun 2011 12:06:46 +0200 Subject: return to default page on empty search --- search/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/search/index.php b/search/index.php index e6f41528ea3..b348b22387f 100644 --- a/search/index.php +++ b/search/index.php @@ -38,6 +38,9 @@ OC_UTIL::addStyle( 'search', 'search' ); $query=(isset($_POST['query']))?$_POST['query']:''; if($query){ $results=OC_SEARCH::search($query); +}else{ + header("Location: ".$WEBROOT.'/'.OC_APPCONFIG::getValue("core", "defaultpage", "files/index.php")); + exit(); } $resultTypes=array(); -- cgit v1.2.3 From 96657f8b620c374b2c4e3230f3451aa656a5b07b Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 23 Jun 2011 14:33:39 +0200 Subject: Detect backend features dynamically instead of trial-and-error usage Move documented functions for reference into OC_USER_EXAMPLE class. --- lib/User/backend.php | 108 ++++++++++++++++++++++----------------------------- lib/User/example.php | 97 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 61 deletions(-) create mode 100644 lib/User/example.php diff --git a/lib/User/backend.php b/lib/User/backend.php index 8ea7f78190b..1797d0c475a 100644 --- a/lib/User/backend.php +++ b/lib/User/backend.php @@ -4,7 +4,9 @@ * ownCloud * * @author Frank Karlitschek + * @author Dominik Schmidt * @copyright 2010 Frank Karlitschek karlitschek@kde.org + * @copyright 2011 Dominik Schmidt dev@dominik-schmidt.de * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE @@ -22,79 +24,63 @@ */ /** - * error code for functions not provided by the storage provider + * error code for functions not provided by the user backend */ -define('OC_USER_BACKEND_NOT_IMPLEMENTED',-501); +define('OC_USER_BACKEND_NOT_IMPLEMENTED', -501); /** - * abstract base class for user management + * actions that user backends can define */ -abstract class OC_USER_BACKEND { +define('OC_USER_BACKEND_CREATE_USER', 0x000001); +define('OC_USER_BACKEND_DELETE_USER', 0x000010); +define('OC_USER_BACKEND_SET_PASSWORD', 0x000100); +define('OC_USER_BACKEND_CHECK_PASSWORD', 0x001000); +define('OC_USER_BACKEND_GET_USERS', 0x010000); +define('OC_USER_BACKEND_USER_EXISTS', 0x100000); - /** - * @brief Create a new user - * @param $uid The username of the user to create - * @param $password The password of the new user - * @returns true/false - * - * Creates a new user. Basic checking of username is done in OC_USER - * itself, not in its subclasses. - */ - public function createUser($uid, $password){ - return OC_USER_BACKEND_NOT_IMPLEMENTED; - } - /** - * @brief delete a user - * @param $uid The username of the user to delete - * @returns true/false - * - * Deletes a user - */ - public function deleteUser( $uid ){ - return OC_USER_BACKEND_NOT_IMPLEMENTED; - } +/** + * abstract base class for user management + * subclass this for your own backends and see OC_USER_EXAMPLE for descriptions + */ +abstract class OC_USER_BACKEND { - /** - * @brief Set password - * @param $uid The username - * @param $password The new password - * @returns true/false - * - * Change the password of a user - */ - public function setPassword($uid, $password){ - return OC_USER_BACKEND_NOT_IMPLEMENTED; - } + protected $possibleActions = array( + OC_USER_BACKEND_CREATE_USER => 'createUser', + OC_USER_BACKEND_DELETE_USER => 'deleteUser', + OC_USER_BACKEND_SET_PASSWORD => 'setPassword', + OC_USER_BACKEND_CHECK_PASSWORD => 'checkPassword', + OC_USER_BACKEND_GET_USERS => 'getUsers', + OC_USER_BACKEND_USER_EXISTS => 'userExists' + ); /** - * @brief Check if the password is correct - * @param $uid The username - * @param $password The password - * @returns true/false - * - * Check if the password is correct without logging in the user - */ - public function checkPassword($uid, $password){ - return OC_USER_BACKEND_NOT_IMPLEMENTED; - } + * @brief Get all supported actions + * @returns bitwise-or'ed actions + * + * Returns the supported actions as int to be + * compared with OC_USER_BACKEND_CREATE_USER etc. + */ + public function getSupportedActions(){ + $actions = 0; + foreach($this->possibleActions AS $action => $methodName){ + if(method_exists($this, $methodName)) { + $actions |= $action; + } + } - /** - * @brief Get a list of all users - * @returns array with all uids - * - * Get a list of all users. - */ - public function getUsers(){ - return OC_USER_BACKEND_NOT_IMPLEMENTED; + return $actions; } /** - * @brief check if a user exists - * @param string $uid the username - * @return boolean - */ - public function userExists($uid){ - return OC_USER_BACKEND_NOT_IMPLEMENTED; + * @brief Check if backend implements actions + * @param $actions bitwise-or'ed actions + * @returns boolean + * + * Returns the supported actions as int to be + * compared with OC_USER_BACKEND_CREATE_USER etc. + */ + public function implementsActions($actions){ + return (bool)($this->getSupportedActions() & $actions); } } diff --git a/lib/User/example.php b/lib/User/example.php new file mode 100644 index 00000000000..4abc1b3d49c --- /dev/null +++ b/lib/User/example.php @@ -0,0 +1,97 @@ +. + * + */ + +require_once('User/backend.php'); + +/** + * abstract reference class for user management + * this class should only be used as a reference for method signatures and their descriptions + */ +abstract class OC_USER_EXAMPLE extends OC_USER_BACKEND { + /** + * @brief Create a new user + * @param $uid The username of the user to create + * @param $password The password of the new user + * @returns true/false + * + * Creates a new user. Basic checking of username is done in OC_USER + * itself, not in its subclasses. + */ + public function createUser($uid, $password){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } + + /** + * @brief delete a user + * @param $uid The username of the user to delete + * @returns true/false + * + * Deletes a user + */ + public function deleteUser( $uid ){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } + + /** + * @brief Set password + * @param $uid The username + * @param $password The new password + * @returns true/false + * + * Change the password of a user + */ + public function setPassword($uid, $password){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } + + /** + * @brief Check if the password is correct + * @param $uid The username + * @param $password The password + * @returns true/false + * + * Check if the password is correct without logging in the user + */ + public function checkPassword($uid, $password){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } + + /** + * @brief Get a list of all users + * @returns array with all uids + * + * Get a list of all users. + */ + public function getUsers(){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } + + /** + * @brief check if a user exists + * @param string $uid the username + * @return boolean + */ + public function userExists($uid){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } +} -- cgit v1.2.3 From 3b2fcd356f0e1bc0472583d910932c7771ce991c Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 23 Jun 2011 15:24:09 +0200 Subject: Use new user backend API --- lib/user.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/user.php b/lib/user.php index 7eafef924a8..33ee5b8762a 100644 --- a/lib/user.php +++ b/lib/user.php @@ -66,7 +66,7 @@ class OC_USER { public static function getBackends(){ return self::$_backends; } - + /** * @brief gets used backends * @returns array of backends @@ -140,11 +140,13 @@ class OC_USER { if( $run ){ //create the user in the first backend that supports creating users foreach(self::$_usedBackends as $backend){ - $result=$backend->createUser($uid,$password); - if($result!==OC_USER_BACKEND_NOT_IMPLEMENTED){ - OC_HOOK::emit( "OC_USER", "post_createUser", array( "uid" => $uid, "password" => $password )); - return true; - } + if(!$backend->implementsActions(OC_USER_BACKEND_CREATE_USER)) + continue; + + $backend->createUser($uid,$password); + OC_HOOK::emit( "OC_USER", "post_createUser", array( "uid" => $uid, "password" => $password )); + + return true; } } return false; @@ -306,9 +308,8 @@ class OC_USER { public static function getUsers(){ $users=array(); foreach(self::$_usedBackends as $backend){ - $result=$backend->getUsers(); - if($result!=OC_USER_BACKEND_NOT_IMPLEMENTED){ - $users=array_merge($users,$result); + if($backend->implementsActions(OC_USER_BACKEND_GET_USERS)){ + $users=array_merge($users,$backend->getUsers()); } } return $users; -- cgit v1.2.3 From bd4aec2c4c979cf88fd2e430b52eb22b34b56dba Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 23 Jun 2011 17:04:32 +0200 Subject: Experimental OpenID user backend and server. Currently all users can set one OpenID identity that allows access to the account. The identity url's for the server is owncloud/apps/user_openid/user.php/$username --- apps/user_openid/appinfo/app.php | 38 + apps/user_openid/appinfo/info.xml | 10 + apps/user_openid/class.openid.v3.php | 328 ++++++ apps/user_openid/phpmyid.php | 1723 +++++++++++++++++++++++++++++++ apps/user_openid/settings.php | 24 + apps/user_openid/templates/settings.php | 7 + apps/user_openid/user.php | 34 + apps/user_openid/user_openid.php | 73 ++ 8 files changed, 2237 insertions(+) create mode 100644 apps/user_openid/appinfo/app.php create mode 100644 apps/user_openid/appinfo/info.xml create mode 100644 apps/user_openid/class.openid.v3.php create mode 100644 apps/user_openid/phpmyid.php create mode 100644 apps/user_openid/settings.php create mode 100644 apps/user_openid/templates/settings.php create mode 100644 apps/user_openid/user.php create mode 100644 apps/user_openid/user_openid.php diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php new file mode 100644 index 00000000000..fb3de10e2a8 --- /dev/null +++ b/apps/user_openid/appinfo/app.php @@ -0,0 +1,38 @@ + "user_openid_settings", 'order'=>1, "href" => OC_HELPER::linkTo( "user_openid", "settings.php" ), "name" => "OpenID")); + +//active the openid backend +OC_USER::useBackend('openid'); + +//check for results from openid requests +if(isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res'){ + error_log('openid retured'); + $openid = new SimpleOpenID; + $openid->SetIdentity($_GET['openid_identity']); + $openid_validation_result = $openid->ValidateWithServer(); + if ($openid_validation_result == true){ // OK HERE KEY IS VALID + error_log('auth sucessfull'); + global $WEBROOT; + $identity=$openid->GetIdentity(); + error_log("auth as $identity"); + $user=OC_USER_OPENID::findUserForIdentity($identity); + if($user){ + $_SESSION['user_id']=$user; + header("Location: $WEBROOT"); + } + }else if($openid->IsError() == true){ // ON THE WAY, WE GOT SOME ERROR + $error = $openid->GetError(); + error_log("ERROR CODE: " . $error['code']); + error_log("ERROR DESCRIPTION: " . $error['description']); + }else{ // Signature Verification Failed + error_log("INVALID AUTHORIZATION"); + } +}else if (isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'cancel'){ // User Canceled your Request + error_log("USER CANCELED REQUEST"); + return false; +} + +?> diff --git a/apps/user_openid/appinfo/info.xml b/apps/user_openid/appinfo/info.xml new file mode 100644 index 00000000000..32525009d61 --- /dev/null +++ b/apps/user_openid/appinfo/info.xml @@ -0,0 +1,10 @@ + + + user_openid + OpenID user backend + Allow login through OpenID + 0.1 + AGPL + Robin Appelman + 2 + \ No newline at end of file diff --git a/apps/user_openid/class.openid.v3.php b/apps/user_openid/class.openid.v3.php new file mode 100644 index 00000000000..8afb9e5b817 --- /dev/null +++ b/apps/user_openid/class.openid.v3.php @@ -0,0 +1,328 @@ +SetIdentity($_POST['openid_url']); + :: SET RETURN URL :: + $openid->SetApprovedURL('http://www.yoursite.com/return.php'); // Script which handles a response from OpenID Server + :: SET TRUST ROOT :: + $openid->SetTrustRoot('http://www.yoursite.com/'); + :: FETCH SERVER URL FROM IDENTITY PAGE :: [Note: It is recomended to cache this (Session, Cookie, Database)] + $openid->GetOpenIDServer(); // Returns false if server is not found + :: REDIRECT USER TO OPEN ID SERVER FOR APPROVAL :: + + :: (OPTIONAL) SET OPENID SERVER :: + $openid->SetOpenIDServer($server_url); // If you have cached previously this, you don't have to call GetOpenIDServer and set value this directly + + STEP 2) + Once user gets returned we must validate signature + :: VALIDATE REQUEST :: + true|false = $openid->ValidateWithServer(); + + ERRORS: + array = $openid->GetError(); // Get latest Error code + + FIELDS: + OpenID allowes you to retreive a profile. To set what fields you'd like to get use (accepts either string or array): + $openid->SetRequiredFields(array('email','fullname','dob','gender','postcode','country','language','timezone')); + or + $openid->SetOptionalFields('postcode'); + +IMPORTANT TIPS: +OPENID as is now, is not trust system. It is a great single-sign on method. If you want to +store information about OpenID in your database for later use, make sure you handle url identities +properly. + For example: + https://steve.myopenid.com/ + https://steve.myopenid.com + http://steve.myopenid.com/ + http://steve.myopenid.com + ... are representing one single user. Some OpenIDs can be in format openidserver.com/users/user/ - keep this in mind when storing identities + + To help you store an OpenID in your DB, you can use function: + $openid_db_safe = $openid->OpenID_Standarize($upenid); + This may not be comatible with current specs, but it works in current enviroment. Use this function to get openid + in one format like steve.myopenid.com (without trailing slashes and http/https). + Use output to insert Identity to database. Don't use this for validation - it may fail. + +*/ + +class SimpleOpenID{ + var $openid_url_identity; + var $URLs = array(); + var $error = array(); + var $fields = array( + 'required' => array(), + 'optional' => array(), + ); + + function SimpleOpenID(){ + if (!function_exists('curl_exec')) { + die('Error: Class SimpleOpenID requires curl extension to work'); + } + } + function SetOpenIDServer($a){ + $this->URLs['openid_server'] = $a; + } + function SetTrustRoot($a){ + $this->URLs['trust_root'] = $a; + } + function SetCancelURL($a){ + $this->URLs['cancel'] = $a; + } + function SetApprovedURL($a){ + $this->URLs['approved'] = $a; + } + function SetRequiredFields($a){ + if (is_array($a)){ + $this->fields['required'] = $a; + }else{ + $this->fields['required'][] = $a; + } + } + function SetOptionalFields($a){ + if (is_array($a)){ + $this->fields['optional'] = $a; + }else{ + $this->fields['optional'][] = $a; + } + } + function SetIdentity($a){ // Set Identity URL + if ((stripos($a, 'http://') === false) + && (stripos($a, 'https://') === false)){ + $a = 'http://'.$a; + } +/* + $u = parse_url(trim($a)); + if (!isset($u['path'])){ + $u['path'] = '/'; + }else if(substr($u['path'],-1,1) == '/'){ + $u['path'] = substr($u['path'], 0, strlen($u['path'])-1); + } + if (isset($u['query'])){ // If there is a query string, then use identity as is + $identity = $a; + }else{ + $identity = $u['scheme'] . '://' . $u['host'] . $u['path']; + } +//*/ + $this->openid_url_identity = $a; + } + function GetIdentity(){ // Get Identity + return $this->openid_url_identity; + } + function GetError(){ + $e = $this->error; + return array('code'=>$e[0],'description'=>$e[1]); + } + + function ErrorStore($code, $desc = null){ + $errs['OPENID_NOSERVERSFOUND'] = 'Cannot find OpenID Server TAG on Identity page.'; + if ($desc == null){ + $desc = $errs[$code]; + } + $this->error = array($code,$desc); + } + + function IsError(){ + if (count($this->error) > 0){ + return true; + }else{ + return false; + } + } + + function splitResponse($response) { + $r = array(); + $response = explode("\n", $response); + foreach($response as $line) { + $line = trim($line); + if ($line != "") { + list($key, $value) = explode(":", $line, 2); + $r[trim($key)] = trim($value); + } + } + return $r; + } + + function OpenID_Standarize($openid_identity = null){ + if ($openid_identity === null) + $openid_identity = $this->openid_url_identity; + + $u = parse_url(strtolower(trim($openid_identity))); + + if (!isset($u['path']) || ($u['path'] == '/')) { + $u['path'] = ''; + } + if(substr($u['path'],-1,1) == '/'){ + $u['path'] = substr($u['path'], 0, strlen($u['path'])-1); + } + if (isset($u['query'])){ // If there is a query string, then use identity as is + return $u['host'] . $u['path'] . '?' . $u['query']; + }else{ + return $u['host'] . $u['path']; + } + } + + function array2url($arr){ // converts associated array to URL Query String + if (!is_array($arr)){ + return false; + } + $query = ''; + foreach($arr as $key => $value){ + $query .= $key . "=" . $value . "&"; + } + return $query; + } + function FSOCK_Request($url, $method="GET", $params = ""){ + $fp = fsockopen("ssl://www.myopenid.com", 443, $errno, $errstr, 3); // Connection timeout is 3 seconds + if (!$fp) { + $this->ErrorStore('OPENID_SOCKETERROR', $errstr); + return false; + } else { + $request = $method . " /server HTTP/1.0\r\n"; + $request .= "User-Agent: Simple OpenID PHP Class (http://www.phpclasses.org/simple_openid)\r\n"; + $request .= "Connection: close\r\n\r\n"; + fwrite($fp, $request); + stream_set_timeout($fp, 4); // Connection response timeout is 4 seconds + $res = fread($fp, 2000); + $info = stream_get_meta_data($fp); + fclose($fp); + + if ($info['timed_out']) { + $this->ErrorStore('OPENID_SOCKETTIMEOUT'); + } else { + return $res; + } + } + } + function CURL_Request($url, $method="GET", $params = "") { // Remember, SSL MUST BE SUPPORTED + if (is_array($params)) $params = $this->array2url($params); + $curl = curl_init($url . ($method == "GET" && $params != "" ? "?" . $params : "")); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($curl, CURLOPT_HEADER, false); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($curl, CURLOPT_HTTPGET, ($method == "GET")); + curl_setopt($curl, CURLOPT_POST, ($method == "POST")); + if ($method == "POST") curl_setopt($curl, CURLOPT_POSTFIELDS, $params); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + $response = curl_exec($curl); + + if (curl_errno($curl) == 0){ + $response; + }else{ + $this->ErrorStore('OPENID_CURL', curl_error($curl)); + } + return $response; + } + + function HTML2OpenIDServer($content) { + $get = array(); + + // Get details of their OpenID server and (optional) delegate + preg_match_all('/]*rel=[\'"](openid2.provider )?openid.server[\'"][^>]*href=[\'"]([^\'"]+)[\'"][^>]*\/?>/i', $content, $matches1); + preg_match_all('/]*href=\'"([^\'"]+)[\'"][^>]*rel=[\'"](openid2.provider )?openid.server[\'"][^>]*\/?>/i', $content, $matches2); + $servers = array_merge($matches1[2], $matches2[1]); + + preg_match_all('/]*rel=[\'"]openid.delegate[\'"][^>]*href=[\'"]([^\'"]+)[\'"][^>]*\/?>/i', $content, $matches1); + + preg_match_all('/]*href=[\'"]([^\'"]+)[\'"][^>]*rel=[\'"]openid.delegate[\'"][^>]*\/?>/i', $content, $matches2); + + $delegates = array_merge($matches1[1], $matches2[1]); + + $ret = array($servers, $delegates); + return $ret; + } + + function GetOpenIDServer(){ + $response = $this->CURL_Request($this->openid_url_identity); + list($servers, $delegates) = $this->HTML2OpenIDServer($response); + if (count($servers) == 0){ + $this->ErrorStore('OPENID_NOSERVERSFOUND'); + return false; + } + if (isset($delegates[0]) + && ($delegates[0] != "")){ + $this->SetIdentity($delegates[0]); + } + $this->SetOpenIDServer($servers[0]); + return $servers[0]; + } + + function GetRedirectURL(){ + $params = array(); + $params['openid.return_to'] = urlencode($this->URLs['approved']); + $params['openid.mode'] = 'checkid_setup'; + $params['openid.identity'] = urlencode($this->openid_url_identity); + $params['openid.trust_root'] = urlencode($this->URLs['trust_root']); + + if (isset($this->fields['required']) + && (count($this->fields['required']) > 0)) { + $params['openid.sreg.required'] = implode(',',$this->fields['required']); + } + if (isset($this->fields['optional']) + && (count($this->fields['optional']) > 0)) { + $params['openid.sreg.optional'] = implode(',',$this->fields['optional']); + } + return $this->URLs['openid_server'] . "?". $this->array2url($params); + } + + function Redirect(){ + $redirect_to = $this->GetRedirectURL(); + if (headers_sent()){ // Use JavaScript to redirect if content has been previously sent (not recommended, but safe) + echo ''; + }else{ // Default Header Redirect + header('Location: ' . $redirect_to); + } + } + + function ValidateWithServer(){ + $params = array( + 'openid.assoc_handle' => urlencode($_GET['openid_assoc_handle']), + 'openid.signed' => urlencode($_GET['openid_signed']), + 'openid.sig' => urlencode($_GET['openid_sig']) + ); + // Send only required parameters to confirm validity + $arr_signed = explode(",",str_replace('sreg.','sreg_',$_GET['openid_signed'])); + for ($i=0; $iGetOpenIDServer(); + if ($openid_server == false){ + return false; + } + $response = $this->CURL_Request($openid_server,'POST',$params); + $data = $this->splitResponse($response); + + if ($data['is_valid'] == "true") { + return true; + }else{ + return false; + } + } +} + +?> \ No newline at end of file diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php new file mode 100644 index 00000000000..719bbd954c0 --- /dev/null +++ b/apps/user_openid/phpmyid.php @@ -0,0 +1,1723 @@ + + * @copyright 2006-2008 + * @license http://www.gnu.org/licenses/gpl.html GNU Public License + * @url http://siege.org/projects/phpMyID + * @version 0.9 + */ + + +/** + * Set a constant to indicate that phpMyID is running + */ +define('PHPMYID_STARTED', true); + +/** + * List the known types and modes + * @name $known + * @global array $GLOBALS['known'] + */ +$GLOBALS['known'] = array( + 'assoc_types' => array('HMAC-SHA1'), + + 'openid_modes' => array('accept', + 'associate', + 'authorize', + 'cancel', + 'checkid_immediate', + 'checkid_setup', + 'check_authentication', + 'error', + 'id_res', + 'login', + 'logout', + 'test'), + + 'session_types' => array('', + 'DH-SHA1'), + + 'bigmath_types' => array('DH-SHA1'), +); + +/** + * Defined by OpenID spec + * @name $g + * @global integer $GLOBALS['g'] + */ +$GLOBALS['g'] = 2; + +/** + * Defined by OpenID spec + * @name $p + * @global integer $GLOBALS['p'] + */ +$GLOBALS['p'] = '155172898181473697471232257763715539915724801966915404479707' . +'7953140576293785419175806512274236981889937278161526466314385615958256881888' . +'8995127215884267541995034125870655654980358010487053768147672651325574704076' . +'5857479291291572334510643245094715007229621094194349783925984760375594985848' . +'253359305585439638443'; + + +// Runmode functions + +/** + * Allow the user to accept trust on a URL + * @global array $profile + */ +function accept_mode () { + global $profile; + + // this is a user session + user_session(); + + // the user needs refresh urls in their session to access this mode + if (! isset($_SESSION['post_accept_url']) || ! isset($_SESSION['cancel_accept_url']) || ! isset($_SESSION['unaccepted_url'])) + error_500('You may not access this mode directly.'); + + // has the user accepted the trust_root? + $accepted = @strlen($_REQUEST['accepted']) + ? $_REQUEST['accepted'] + : null; + + // if so, refresh back to post_accept_url + if ($accepted === 'yes') { + $_SESSION['accepted_url'] = $_SESSION['unaccepted_url']; + wrap_redirect($_SESSION['post_accept_url']); + + // if they rejected it, return to the client + } elseif ($accepted === 'no') { + wrap_redirect($_SESSION['cancel_accept_url']); + } + + // if neither, offer the trust request + $q = strpos($profile['req_url'], '?') ? '&' : '?'; + $yes = $profile['req_url'] . $q . 'accepted=yes'; + $no = $profile['req_url'] . $q . 'accepted=no'; + + wrap_html('The client site you are attempting to log into has requested that you trust the following URL:
        ' . $_SESSION['unaccepted_url'] . '

        Do you wish to continue?
        Yes | No'); +} + +/** * Perform an association with a consumer + * @global array $known + * @global array $profile + * @global integer $g + * @global integer $p + */ +function associate_mode () { + global $g, $known, $p, $profile; + + // Validate the request + if (! isset($_REQUEST['openid_mode']) || $_REQUEST['openid_mode'] != 'associate') + error_400(); + + // Get the request options, using defaults as necessary + $assoc_type = (@strlen($_REQUEST['openid_assoc_type']) + && in_array($_REQUEST['openid_assoc_type'], $known['assoc_types'])) + ? $_REQUEST['openid_assoc_type'] + : 'HMAC-SHA1'; + + $session_type = (@strlen($_REQUEST['openid_session_type']) + && in_array($_REQUEST['openid_session_type'], $known['session_types'])) + ? $_REQUEST['openid_session_type'] + : ''; + + $dh_modulus = (@strlen($_REQUEST['openid_dh_modulus'])) + ? long(base64_decode($_REQUEST['openid_dh_modulus'])) + : ($session_type == 'DH-SHA1' + ? $p + : null); + + $dh_gen = (@strlen($_REQUEST['openid_dh_gen'])) + ? long(base64_decode($_REQUEST['openid_dh_gen'])) + : ($session_type == 'DH-SHA1' + ? $g + : null); + + $dh_consumer_public = (@strlen($_REQUEST['openid_dh_consumer_public'])) + ? $_REQUEST['openid_dh_consumer_public'] + : ($session_type == 'DH-SHA1' + ? error_post('dh_consumer_public was not specified') + : null); + + $lifetime = time() + $profile['lifetime']; + + // Create standard keys + $keys = array( + 'assoc_type' => $assoc_type, + 'expires_in' => $profile['lifetime'] + ); + + // If I can't handle bigmath, default to plaintext sessions + if (in_array($session_type, $known['bigmath_types']) && $profile['use_bigmath'] === false) + $session_type = null; + + // Add response keys based on the session type + switch ($session_type) { + case 'DH-SHA1': + // Create the associate id and shared secret now + list ($assoc_handle, $shared_secret) = new_assoc($lifetime); + + // Compute the Diffie-Hellman stuff + $private_key = random($dh_modulus); + $public_key = bmpowmod($dh_gen, $private_key, $dh_modulus); + $remote_key = long(base64_decode($dh_consumer_public)); + $ss = bmpowmod($remote_key, $private_key, $dh_modulus); + + $keys['assoc_handle'] = $assoc_handle; + $keys['session_type'] = $session_type; + $keys['dh_server_public'] = base64_encode(bin($public_key)); + $keys['enc_mac_key'] = base64_encode(x_or(sha1_20(bin($ss)), $shared_secret)); + + break; + + default: + // Create the associate id and shared secret now + list ($assoc_handle, $shared_secret) = new_assoc($lifetime); + + $keys['assoc_handle'] = $assoc_handle; + $keys['mac_key'] = base64_encode($shared_secret); + } + + // Return the keys + wrap_kv($keys); +} + + +/** + * Perform a user authorization + * @global array $profile + */ +function authorize_mode () { + global $profile; + global $USERNAME; + + // this is a user session + + // the user needs refresh urls in their session to access this mode + if (! isset($_SESSION['post_auth_url']) || ! isset($_SESSION['cancel_auth_url'])) + error_500('You may not access this mode directly.'); + + if (isset($_SERVER['PHP_AUTH_USER']) && $profile['authorized'] === false && $_SERVER['PHP_AUTH_USER']==$USERNAME) { + if (OC_USER::checkPassword($USERNAME, $_SERVER['PHP_AUTH_PW'])) {// successful login! + + // return to the refresh url if they get in + $_SESSION['openid_auth']=true; + $_SESSION['openid_user']=$USERNAME; + wrap_redirect($_SESSION['post_auth_url']); + + // failed login + } else { + $_SESSION['failures']++; + debug('Login failed'); + debug('Fail count: ' . $_SESSION['failures']); + } + + } + + // if we get this far the user is not authorized, so send the headers + $uid = uniqid(mt_rand(1,9)); + $_SESSION['uniqid'] = $uid; + +// debug('Prompting user to log in. Stale? ' . $stale); + header('HTTP/1.0 401 Unauthorized'); +// header(sprintf('WWW-Authenticate: Digest qop="auth-int, auth", realm="%s", domain="%s", nonce="%s", opaque="%s", stale="%s", algorithm="MD5"', $profile['auth_realm'], $profile['auth_domain'], $uid, md5($profile['auth_realm']), $stale ? 'true' : 'false')); + header('WWW-Authenticate: Basic realm="ownCloud"'); + $q = strpos($_SESSION['cancel_auth_url'], '?') ? '&' : '?'; + wrap_refresh($_SESSION['cancel_auth_url'] . $q . 'openid.mode=cancel'); +// die('401 Unauthorized'); +} + + +/** + * Handle a consumer's request for cancellation. + */ +function cancel_mode () { + wrap_html('Request cancelled.'); +} + + +/** + * Handle a consumer's request to see if the user is authenticated + */ +function check_authentication_mode () { + // Validate the request + if (! isset($_REQUEST['openid_mode']) || $_REQUEST['openid_mode'] != 'check_authentication') + error_400(); + + $assoc_handle = @strlen($_REQUEST['openid_assoc_handle']) + ? $_REQUEST['openid_assoc_handle'] + : error_post('Missing assoc_handle'); + + $sig = @strlen($_REQUEST['openid_sig']) + ? $_REQUEST['openid_sig'] + : error_post('Missing sig'); + + $signed = @strlen($_REQUEST['openid_signed']) + ? $_REQUEST['openid_signed'] + : error_post('Missing signed'); + + // Prepare the return keys + $keys = array( + 'openid.mode' => 'id_res' + ); + + // Invalidate the assoc handle if we need to + if (@strlen($_REQUEST['openid_invalidate_handle'])) { + destroy_assoc_handle($_REQUEST['openid_invalidate_handle']); + + $keys['invalidate_handle'] = $_REQUEST['openid_invalidate_handle']; + } + + // Validate the sig by recreating the kv pair and signing + $_REQUEST['openid_mode'] = 'id_res'; + $tokens = ''; + foreach (explode(',', $signed) as $param) { + $post = preg_replace('/\./', '_', $param); + $tokens .= sprintf("%s:%s\n", $param, $_REQUEST['openid_' . $post]); + } + + // Add the sreg stuff, if we've got it + if (isset($sreg_required)) { + foreach (explode(',', $sreg_required) as $key) { + if (! isset($sreg[$key])) + continue; + $skey = 'sreg.' . $key; + + $tokens .= sprintf("%s:%s\n", $skey, $sreg[$key]); + $keys[$skey] = $sreg[$key]; + $fields[] = $skey; + } + } + + // Look up the consumer's shared_secret and timeout + list ($shared_secret, $expires) = secret($assoc_handle); + + // if I can't verify the assoc_handle, or if it's expired + if ($shared_secret == false || (is_numeric($expires) && $expires < time())) { + $keys['is_valid'] = 'false'; + + } else { + $ok = base64_encode(hmac($shared_secret, $tokens)); + $keys['is_valid'] = ($sig == $ok) ? 'true' : 'false'; + } + + // Return the keys + wrap_kv($keys); +} + + +/** + * Handle a consumer's request to see if the end user is logged in + * @global array $known + * @global array $profile + * @global array $sreg + */ +function checkid ( $wait ) { + global $known, $profile, $sreg; + global $USERNAME; + + // This is a user session + user_session(); + + // Get the options, use defaults as necessary + $return_to = @strlen($_REQUEST['openid_return_to']) + ? $_REQUEST['openid_return_to'] + : error_400('Missing return1_to'); + + $identity = @strlen($_REQUEST['openid_identity']) + ? $_REQUEST['openid_identity'] + : error_get($return_to, 'Missing identity'); + + $assoc_handle = @strlen($_REQUEST['openid_assoc_handle']) + ? $_REQUEST['openid_assoc.handle'] + : null; + + $trust_root = @strlen($_REQUEST['openid_trust_root']) + ? $_REQUEST['openid_trust_root'] + : $return_to; + + $sreg_required = @strlen($_REQUEST['openid_sreg_required']) + ? $_REQUEST['openid_sreg.required'] + : ''; + + $sreg_optional = @strlen($_REQUEST['openid_sreg_optional']) + ? $_REQUEST['openid_sreg.optional'] + : ''; + + // determine the cancel url + $q = strpos($return_to, '?') ? '&' : '?'; + $cancel_url = $return_to . $q . 'openid.mode=cancel'; + + // required and optional make no difference to us + $sreg_required .= ',' . $sreg_optional; + // do the trust_root analysis + if ($trust_root != $return_to) { + // the urls are not the same, be sure return decends from trust + if (! url_descends($return_to, $trust_root)) + error_500('Invalid trust_root: "' . $trust_root . '"'); + + } + + // transfer the user to the url accept mode if they're paranoid + if ($wait == 1 && isset($profile['paranoid']) && $profile['paranoid'] === true && (! session_is_registered('accepted_url') || $_SESSION['accepted_url'] != $trust_root)) { + $_SESSION['cancel_accept_url'] = $cancel_url; + $_SESSION['post_accept_url'] = $profile['req_url']; + $_SESSION['unaccepted_url'] = $trust_root; + + debug('Transferring to acceptance mode.'); + debug('Cancel URL: ' . $_SESSION['cancel_accept_url']); + debug('Post URL: ' . $_SESSION['post_accept_url']); + + $q = strpos($profile['idp_url'], '?') ? '&' : '?'; + wrap_redirect($profile['idp_url'] . $q . 'openid.mode=accept'); + } + + // make sure i am this identifier + if ($identity != $profile['idp_url']) { + debug("Invalid identity: $identity"); + debug("IdP URL: " . $profile['idp_url']); + error_get($return_to, "Invalid identity: '$identity'"); + } + + // begin setting up return keys + $keys = array( + 'mode' => 'id_res' + ); + + // if the user is not logged in, transfer to the authorization mode + if ($_SESSION['openid_auth'] === false || $USERNAME != $_SESSION['openid_user']) { + // users can only be logged in to one url at a time + $_SESSION['auth_username'] = null; + $_SESSION['auth_url'] = null; + + if ($wait) { + unset($_SESSION['uniqid']); + + $_SESSION['cancel_auth_url'] = $cancel_url; + $_SESSION['post_auth_url'] = $profile['req_url']; + + debug('Transferring to authorization mode.'); + debug('Cancel URL: ' . $_SESSION['cancel_auth_url']); + debug('Post URL: ' . $_SESSION['post_auth_url']); + + $q = strpos($profile['idp_url'], '?') ? '&' : '?'; + wrap_redirect($profile['idp_url'] . $q . 'openid.mode=authorize'); + } else { + $keys['user_setup_url'] = $profile['idp_url']; + } + + // the user is logged in + } else { + // remove the refresh URLs if set + unset($_SESSION['cancel_auth_url']); + unset($_SESSION['post_auth_url']); + + // check the assoc handle + list($shared_secret, $expires) = secret($assoc_handle); + + // if I can't verify the assoc_handle, or if it's expired + if ($shared_secret == false || (is_numeric($expires) && $expires < time())) { + debug("Session expired or missing key: $expires < " . time()); + if ($assoc_handle != null) { + $keys['invalidate_handle'] = $assoc_handle; + destroy_assoc_handle($assoc_handle); + } + + $lifetime = time() + $profile['lifetime']; + list ($assoc_handle, $shared_secret) = new_assoc($lifetime); + } + + $keys['identity'] = $profile['idp_url']; + $keys['assoc_handle'] = $assoc_handle; + $keys['return_to'] = $return_to; + + $fields = array_keys($keys); + $tokens = ''; + foreach ($fields as $key) + $tokens .= sprintf("%s:%s\n", $key, $keys[$key]); + + // add sreg keys + foreach (explode(',', $sreg_required) as $key) { + if (! isset($sreg[$key])) + continue; + $skey = 'sreg.' . $key; + + $tokens .= sprintf("%s:%s\n", $skey, $sreg[$key]); + $keys[$skey] = $sreg[$key]; + $fields[] = $skey; + } + + $keys['signed'] = implode(',', $fields); + $keys['sig'] = base64_encode(hmac($shared_secret, $tokens)); + } + + wrap_keyed_redirect($return_to, $keys); +} + + +/** + * Handle a consumer's request to see if the user is already logged in + */ +function checkid_immediate_mode () { + if (! isset($_REQUEST['openid_mode']) || $_REQUEST['openid_mode'] != 'checkid_immediate') + error_500(); + + checkid(false); +} + + +/** + * Handle a consumer's request to see if the user is logged in, but be willing + * to wait for them to perform a login if they're not + */ +function checkid_setup_mode () { + if (! isset($_REQUEST['openid_mode']) || $_REQUEST['openid_mode'] != 'checkid_setup') + error_500(); + + checkid(true); +} + + +/** + * Handle errors + */ +function error_mode () { + isset($_REQUEST['openid_error']) + ? wrap_html($_REQUEST['openid_error']) + : error_500(); +} + + +/** + * Show a user if they are logged in or not + * @global array $profile + */ +function id_res_mode () { + global $profile; + + user_session(); + + if ($profile['authorized']) + wrap_html('You are logged in as ' . $_SESSION['auth_username']); + + wrap_html('You are not logged in'); +} + + +/** + * Allow a user to perform a static login + * @global array $profile + */ +function login_mode () { + global $profile; + + user_session(); + + if ($profile['authorized']) + id_res_mode(); + + $keys = array( + 'mode' => 'checkid_setup', + 'identity' => $profile['idp_url'], + 'return_to' => $profile['idp_url'] + ); + + wrap_keyed_redirect($profile['idp_url'], $keys); +} + + +/** + * Allow a user to perform a static logout + * @global array $profile + */ +function logout_mode () { + global $profile; + + user_session(); + + if (! $profile['authorized']) + wrap_html('You were not logged in'); + + $_SESSION = array(); + session_destroy(); + debug('User session destroyed.'); + + header('HTTP/1.0 401 Unauthorized'); + wrap_redirect($profile['idp_url']); +} + + +/** + * The default information screen + * @global array $profile + */ +function no_mode () { + global $profile; + + wrap_html('This is an OpenID server endpoint. For more information, see http://openid.net/
        Server: ' . $profile['idp_url'] . '
        Realm: ' . $profile['php_realm'] . '
        Login' . ($profile['allow_test'] === true ? ' | Test' : null)); +} + + +/** + * Testing for setup + * @global array $profile + */ +function test_mode () { + global $profile, $p, $g; + + if ($profile['allow_test'] != true) + error_403(); + + @ini_set('max_execution_time', 180); + + $test_expire = time() + 120; + $test_ss_enc = 'W7hvmld2yEYdDb0fHfSkKhQX+PM='; + $test_ss = base64_decode($test_ss_enc); + $test_token = "alpha:bravo\ncharlie:delta\necho:foxtrot"; + $test_server_private = '11263846781670293092494395517924811173145217135753406847875706165886322533899689335716152496005807017390233667003995430954419468996805220211293016296351031812246187748601293733816011832462964410766956326501185504714561648498549481477143603650090931135412673422192550825523386522507656442905243832471167330268'; + $test_client_public = base64_decode('AL63zqI5a5p8HdXZF5hFu8p+P9GOb816HcHuvNOhqrgkKdA3fO4XEzmldlb37nv3+xqMBgWj6gxT7vfuFerEZLBvuWyVvR7IOGZmx0BAByoq3fxYd3Fpe2Coxngs015vK37otmH8e83YyyGo5Qua/NAf13yz1PVuJ5Ctk7E+YdVc'); + + $res = array(); + + // bcmath + $res['bcmath'] = extension_loaded('bcmath') + ? 'pass' : 'warn - not loaded'; + + // gmp + if ($profile['allow_gmp']) { + $res['gmp'] = extension_loaded('gmp') + ? 'pass' : 'warn - not loaded'; + } else { + $res['gmp'] = 'pass - n/a'; + } + + // sys_get_temp_dir + $res['logfile'] = is_writable($profile['logfile']) + ? 'pass' : "warn - log is not writable"; + + // session & new_assoc + user_session(); + list($test_assoc, $test_new_ss) = new_assoc($test_expire); + $res['session'] = ($test_assoc != session_id()) + ? 'pass' : 'fail'; + + // secret + @session_unregister('shared_secret'); + list($check, $check2) = secret($test_assoc); + $res['secret'] = ($check == $test_new_ss) + ? 'pass' : 'fail'; + + // expire + $res['expire'] = ($check2 <= $test_expire) + ? 'pass' : 'fail'; + + // base64 + $res['base64'] = (base64_encode($test_ss) == $test_ss_enc) + ? 'pass' : 'fail'; + + // hmac + $test_sig = base64_decode('/VXgHvZAOdoz/OTa5+XJXzSGhjs='); + $check = hmac($test_ss, $test_token); + $res['hmac'] = ($check == $test_sig) + ? 'pass' : sprintf("fail - '%s'", base64_encode($check)); + + if ($profile['use_bigmath']) { + // bigmath powmod + $test_server_public = '102773334773637418574009974502372885384288396853657336911033649141556441102566075470916498748591002884433213640712303846640842555822818660704173387461364443541327856226098159843042567251113889701110175072389560896826887426539315893475252988846151505416694218615764823146765717947374855806613410142231092856731'; + $check = bmpowmod($g, $test_server_private, $p); + $res['bmpowmod-1'] = ($check == $test_server_public) + ? 'pass' : sprintf("fail - '%s'", $check); + + // long + $test_client_long = '133926731803116519408547886573524294471756220428015419404483437186057383311250738749035616354107518232016420809434801736658109316293127101479053449990587221774635063166689561125137927607200322073086097478667514042144489248048756916881344442393090205172004842481037581607299263456852036730858519133859409417564'; + $res['long'] = (long($test_client_public) == $test_client_long) + ? 'pass' : 'fail'; + + // bigmath powmod 2 + $test_client_share = '19333275433742428703546496981182797556056709274486796259858099992516081822015362253491867310832140733686713353304595602619444380387600756677924791671971324290032515367930532292542300647858206600215875069588627551090223949962823532134061941805446571307168890255137575975911397744471376862555181588554632928402'; + $check = bmpowmod($test_client_long, $test_server_private, $p); + $res['bmpowmod-2'] = ($check == $test_client_share) + ? 'pass' : sprintf("fail - '%s'", $check); + + // bin + $test_client_mac_s1 = base64_decode('G4gQQkYM6QmAzhKbVKSBahFesPL0nL3F2MREVwEtnVRRYI0ifl9zmPklwTcvURt3QTiGBd+9Dn3ESLk5qka6IO5xnILcIoBT8nnGVPiOZvTygfuzKp4tQ2mXuIATJoa7oXRGmBWtlSdFapH5Zt6NJj4B83XF/jzZiRwdYuK4HJI='); + $check = bin($test_client_share); + $res['bin'] = ($check == $test_client_mac_s1) + ? 'pass' : sprintf("fail - '%s'", base64_encode($check)); + + } else { + $res['bigmath'] = 'fail - big math functions are not available.'; + } + + // sha1_20 + $test_client_mac_s1 = base64_decode('G4gQQkYM6QmAzhKbVKSBahFesPL0nL3F2MREVwEtnVRRYI0ifl9zmPklwTcvURt3QTiGBd+9Dn3ESLk5qka6IO5xnILcIoBT8nnGVPiOZvTygfuzKp4tQ2mXuIATJoa7oXRGmBWtlSdFapH5Zt6NJj4B83XF/jzZiRwdYuK4HJI='); + $test_client_mac_s2 = base64_decode('0Mb2t9d/HvAZyuhbARJPYdx3+v4='); + $check = sha1_20($test_client_mac_s1); + $res['sha1_20'] = ($check == $test_client_mac_s2) + ? 'pass' : sprintf("fail - '%s'", base64_encode($check)); + + // x_or + $test_client_mac_s3 = base64_decode('i36ZLYAJ1rYEx1VEHObrS8hgAg0='); + $check = x_or($test_client_mac_s2, $test_ss); + $res['x_or'] = ($check == $test_client_mac_s3) + ? 'pass' : sprintf("fail - '%s'", base64_encode($check)); + + $out = "
        - " type="checkbox" name="groups[]" value="" /> - ">
        + " type="checkbox" name="groups[]" value="" /> + ">
        @@ -82,8 +82,8 @@ - " type="checkbox" name="groups[]" value="" /> - ">
        + " type="checkbox" name="groups[]" value="" /> + ">
        -- cgit v1.2.3 From ee0f1490e1872cbe6071f5758e292ae1646ab1af Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 21 Jun 2011 19:28:46 +0200 Subject: Multiply changes to user system keeping tracked of the logged in user is no longer done by the active backend but by oc_user directly instead multiply backends can be active at the same time, allowing alternative authentication procedures like openid or tokens to be used next to the regular user system --- lib/User/backend.php | 68 +++++++++++++++-------------------- lib/User/database.php | 97 ++++++++++--------------------------------------- lib/base.php | 2 +- lib/user.php | 99 ++++++++++++++++++++++++++++++++++++++++----------- 4 files changed, 127 insertions(+), 139 deletions(-) diff --git a/lib/User/backend.php b/lib/User/backend.php index e99016a5214..8ea7f78190b 100644 --- a/lib/User/backend.php +++ b/lib/User/backend.php @@ -21,7 +21,10 @@ * */ - +/** + * error code for functions not provided by the storage provider + */ +define('OC_USER_BACKEND_NOT_IMPLEMENTED',-501); /** * abstract base class for user management @@ -37,7 +40,9 @@ abstract class OC_USER_BACKEND { * Creates a new user. Basic checking of username is done in OC_USER * itself, not in its subclasses. */ - public static function createUser($uid, $password){} + public function createUser($uid, $password){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } /** * @brief delete a user @@ -46,41 +51,9 @@ abstract class OC_USER_BACKEND { * * Deletes a user */ - public static function deleteUser( $uid ){} - - /** - * @brief Try to login a user - * @param $uid The username of the user to log in - * @param $password The password of the user - * @returns true/false - * - * Log in a user - if the password is ok - */ - public static function login($uid, $password){} - - /** - * @brief Kick the user - * @returns true - * - * Logout, destroys session - */ - public static function logout(){} - - /** - * @brief Check if the user is logged in - * @returns true/false - * - * Checks if the user is logged in - */ - public static function isLoggedIn(){} - - /** - * @brief Autogenerate a password - * @returns string - * - * generates a password - */ - public static function generatePassword(){} + public function deleteUser( $uid ){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } /** * @brief Set password @@ -90,7 +63,9 @@ abstract class OC_USER_BACKEND { * * Change the password of a user */ - public static function setPassword($uid, $password){} + public function setPassword($uid, $password){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } /** * @brief Check if the password is correct @@ -100,7 +75,9 @@ abstract class OC_USER_BACKEND { * * Check if the password is correct without logging in the user */ - public static function checkPassword($uid, $password){} + public function checkPassword($uid, $password){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } /** * @brief Get a list of all users @@ -108,5 +85,16 @@ abstract class OC_USER_BACKEND { * * Get a list of all users. */ - public static function getUsers(){} + public function getUsers(){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } + + /** + * @brief check if a user exists + * @param string $uid the username + * @return boolean + */ + public function userExists($uid){ + return OC_USER_BACKEND_NOT_IMPLEMENTED; + } } diff --git a/lib/User/database.php b/lib/User/database.php index eeabb592c22..0396ac30958 100644 --- a/lib/User/database.php +++ b/lib/User/database.php @@ -50,12 +50,8 @@ class OC_USER_DATABASE extends OC_USER_BACKEND { * Creates a new user. Basic checking of username is done in OC_USER * itself, not in its subclasses. */ - public static function createUser( $uid, $password ){ - // Check if the user already exists - $query = OC_DB::prepare( "SELECT * FROM `*PREFIX*users` WHERE uid = ?" ); - $result = $query->execute( array( $uid )); - - if ( $result->numRows() > 0 ){ + public function createUser( $uid, $password ){ + if( $this->userExists($uid) ){ return false; } else{ @@ -73,76 +69,13 @@ class OC_USER_DATABASE extends OC_USER_BACKEND { * * Deletes a user */ - public static function deleteUser( $uid ){ + public function deleteUser( $uid ){ // Delete user-group-relation $query = OC_DB::prepare( "DELETE FROM `*PREFIX*users` WHERE uid = ?" ); $result = $query->execute( array( $uid )); return true; } - /** - * @brief Try to login a user - * @param $uid The username of the user to log in - * @param $password The password of the user - * @returns true/false - * - * Log in a user - if the password is ok - */ - public static function login( $uid, $password ){ - // Query - $query = OC_DB::prepare( "SELECT uid FROM *PREFIX*users WHERE uid = ? AND password = ?" ); - $result = $query->execute( array( $uid, sha1( $password ))); - - if( $result->numRows() > 0 ){ - // Set username if name and password are known - $row = $result->fetchRow(); - $_SESSION['user_id'] = $row["uid"]; - OC_LOG::add( "core", $_SESSION['user_id'], "login" ); - return true; - } - else{ - return false; - } - } - - /** - * @brief Kick the user - * @returns true - * - * Logout, destroys session - */ - public static function logout(){ - OC_LOG::add( "core", $_SESSION['user_id'], "logout" ); - $_SESSION['user_id'] = false; - - return true; - } - - /** - * @brief Check if the user is logged in - * @returns true/false - * - * Checks if the user is logged in - */ - public static function isLoggedIn() { - if( isset($_SESSION['user_id']) AND $_SESSION['user_id'] ){ - return true; - } - else{ - return false; - } - } - - /** - * @brief Autogenerate a password - * @returns string - * - * generates a password - */ - public static function generatePassword(){ - return uniqId(); - } - /** * @brief Set password * @param $uid The username @@ -151,12 +84,8 @@ class OC_USER_DATABASE extends OC_USER_BACKEND { * * Change the password of a user */ - public static function setPassword( $uid, $password ){ - // Check if the user already exists - $query = OC_DB::prepare( "SELECT * FROM `*PREFIX*users` WHERE uid = ?" ); - $result = $query->execute( array( $uid )); - - if( $result->numRows() > 0 ){ + public function setPassword( $uid, $password ){ + if( $this->userExists($uid) ){ $query = OC_DB::prepare( "UPDATE *PREFIX*users SET password = ? WHERE uid = ?" ); $result = $query->execute( array( sha1( $password ), $uid )); @@ -175,7 +104,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND { * * Check if the password is correct without logging in the user */ - public static function checkPassword( $uid, $password ){ + public function checkPassword( $uid, $password ){ $query = OC_DB::prepare( "SELECT uid FROM *PREFIX*users WHERE uid = ? AND password = ?" ); $result = $query->execute( array( $uid, sha1( $password ))); @@ -193,7 +122,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND { * * Get a list of all users. */ - public static function getUsers(){ + public function getUsers(){ $query = OC_DB::prepare( "SELECT uid FROM *PREFIX*users" ); $result = $query->execute(); @@ -203,4 +132,16 @@ class OC_USER_DATABASE extends OC_USER_BACKEND { } return $users; } + + /** + * @brief check if a user exists + * @param string $uid the username + * @return boolean + */ + public function userExists($uid){ + $query = OC_DB::prepare( "SELECT * FROM `*PREFIX*users` WHERE uid = ?" ); + $result = $query->execute( array( $uid )); + + return $result->numRows() > 0; + } } diff --git a/lib/base.php b/lib/base.php index 1baf5dc1679..e93c4712727 100644 --- a/lib/base.php +++ b/lib/base.php @@ -93,7 +93,7 @@ require_once('search.php'); $error=(count(OC_UTIL::checkServer())>0); -OC_USER::setBackend( OC_CONFIG::getValue( "userbackend", "database" )); +OC_USER::useBackend( OC_CONFIG::getValue( "userbackend", "database" )); OC_GROUP::setBackend( OC_CONFIG::getValue( "groupbackend", "database" )); // Set up file system unless forbidden diff --git a/lib/user.php b/lib/user.php index 09501e59c58..2e11a30e85e 100644 --- a/lib/user.php +++ b/lib/user.php @@ -40,7 +40,7 @@ if( !OC_CONFIG::getValue( "installed", false )){ */ class OC_USER { // The backend used for user management - private static $_backend = null; + private static $_usedBackends = array(); // Backends available (except database) private static $_backends = array(); @@ -66,15 +66,25 @@ class OC_USER { public static function getBackends(){ return self::$_backends; } + + /** + * @brief gets used backends + * @returns array of backends + * + * Returns the names of all used backends. + */ + public static function getUsedBackends(){ + return array_keys(self::$_usedBackends); + } /** - * @brief Sets the backend + * @brief Adds the backend to the list of used backends * @param $backend default: database The backend to use for user managment * @returns true/false * * Set the User Authentication Module */ - public static function setBackend( $backend = 'database' ){ + public static function useBackend( $backend = 'database' ){ // You'll never know what happens if( null === $backend OR !is_string( $backend )){ $backend = 'database'; @@ -86,11 +96,11 @@ class OC_USER { case 'mysql': case 'sqlite': require_once('User/database.php'); - self::$_backend = new OC_USER_DATABASE(); + self::$_usedBackends[$backend] = new OC_USER_DATABASE(); break; default: $className = 'OC_USER_' . strToUpper($backend); - self::$_backend = new $className(); + self::$_usedBackends[$backend] = new $className(); break; } @@ -119,7 +129,7 @@ class OC_USER { return false; } // Check if user already exists - if( in_array( $uid, self::getUsers())){ + if( self::userExists($uid) ){ return false; } @@ -127,13 +137,17 @@ class OC_USER { $run = true; OC_HOOK::emit( "OC_USER", "pre_createUser", array( "run" => &$run, "uid" => $uid, "password" => $password )); - if( $run && self::$_backend->createUser( $uid, $password )){ - OC_HOOK::emit( "OC_USER", "post_createUser", array( "uid" => $uid, "password" => $password )); - return true; - } - else{ - return false; + if( $run ){ + //create the user in the first backend that supports creating users + foreach(self::$_usedBackends as $backend){ + $result=$backend->createUser($uid,$password); + if($result!==OC_USER_BACKEND_NOT_IMPLEMENTED){ + OC_HOOK::emit( "OC_USER", "post_createUser", array( "uid" => $uid, "password" => $password )); + return true; + } + } } + return false; } /** @@ -147,7 +161,11 @@ class OC_USER { $run = true; OC_HOOK::emit( "OC_USER", "pre_deleteUser", array( "run" => &$run, "uid" => $uid )); - if( $run && self::$_backend->deleteUser( $uid )){ + if( $run ){ + //delete the user from all backends + foreach(self::$_usedBackends as $backend){ + $backend->deleteUser($uid); + } // We have to delete the user from all groups foreach( OC_GROUP::getUserGroups( $uid ) as $i ){ OC_GROUP::removeFromGroup( $uid, $i ); @@ -174,7 +192,9 @@ class OC_USER { $run = true; OC_HOOK::emit( "OC_USER", "pre_login", array( "run" => &$run, "uid" => $uid )); - if( $run && self::$_backend->login( $uid, $password )){ + if( $run && self::checkPassword( $uid, $password )){ + $_SESSION['user_id'] = $uid; + OC_LOG::add( "core", $_SESSION['user_id'], "login" ); OC_HOOK::emit( "OC_USER", "post_login", array( "uid" => $uid )); return true; } @@ -191,7 +211,9 @@ class OC_USER { */ public static function logout(){ OC_HOOK::emit( "OC_USER", "logout", array()); - return self::$_backend->logout(); + OC_LOG::add( "core", $_SESSION['user_id'], "logout" ); + $_SESSION['user_id'] = false; + return true; } /** @@ -201,7 +223,12 @@ class OC_USER { * Checks if the user is logged in */ public static function isLoggedIn(){ - return self::$_backend->isLoggedIn(); + if( isset($_SESSION['user_id']) AND $_SESSION['user_id'] ){ + return true; + } + else{ + return false; + } } /** @@ -211,7 +238,7 @@ class OC_USER { * generates a password */ public static function generatePassword(){ - return substr( md5( uniqId().time()), 0, 10 ); + return uniqId(); } /** @@ -226,7 +253,12 @@ class OC_USER { $run = true; OC_HOOK::emit( "OC_USER", "pre_setPassword", array( "run" => &$run, "uid" => $uid, "password" => $password )); - if( $run && self::$_backend->setPassword( $uid, $password )){ + if( $run ){ + foreach(self::$_usedBackends as $backend){ + if($backend->userExists($uid)){ + $backend->setPassword($uid,$password); + } + } OC_HOOK::emit( "OC_USER", "post_setPassword", array( "uid" => $uid, "password" => $password )); return true; } @@ -244,7 +276,12 @@ class OC_USER { * Check if the password is correct without logging in the user */ public static function checkPassword( $uid, $password ){ - return self::$_backend->checkPassword( $uid, $password ); + foreach(self::$_usedBackends as $backend){ + $result=$backend->checkPassword( $uid, $password ); + if($result===true){ + return true; + } + } } /** @@ -254,6 +291,28 @@ class OC_USER { * Get a list of all users. */ public static function getUsers(){ - return self::$_backend->getUsers(); + $users=array(); + foreach(self::$_usedBackends as $backend){ + $result=$backend->getUsers(); + if($result!=OC_USER_BACKEND_NOT_IMPLEMENTED){ + $users=array_merge($users,$result); + } + } + return $users; + } + + /** + * @brief check if a user exists + * @param string $uid the username + * @return boolean + */ + public static function userExists($uid){ + foreach(self::$_usedBackends as $backend){ + $result=$backend->userExists($uid); + if($result===true){ + return true; + } + } + return false; } } -- cgit v1.2.3 From e047feb2ad90c3b103c92d35f794988767b2ba21 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Tue, 21 Jun 2011 22:16:41 +0200 Subject: install shipped apps also in "installed apps" page --- admin/apps.php | 3 +++ lib/installer.php | 38 ++++++++++++++++++++++++++++++++++++++ lib/setup.php | 28 +--------------------------- 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/admin/apps.php b/admin/apps.php index 5eec7e626d3..56e76d139d2 100644 --- a/admin/apps.php +++ b/admin/apps.php @@ -22,6 +22,7 @@ */ require_once('../lib/base.php'); +include_once('../lib/installer.php'); require( 'template.php' ); if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )){ header( "Location: ".OC_HELPER::linkTo( "", "index.php" )); @@ -42,6 +43,8 @@ if($installed){ $apps = OC_APPCONFIG::getApps(); $records = array(); + OC_INSTALLER::installShippedApps(false); + OC_APP::setActiveNavigationEntry( "core_apps_installed" ); foreach($apps as $app){ $info=OC_APP::getAppInfo("$SERVERROOT/apps/$app/appinfo/info.xml"); diff --git a/lib/installer.php b/lib/installer.php index 91b7ea7da67..a237caa0983 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -236,4 +236,42 @@ class OC_INSTALLER{ // TODO: write function return true; } + + /** + * @brief Installs shipped apps + * @param $enabled + * + * This function installs all apps found in the 'apps' directory; + * If $enabled is true, apps are installed as enabled. + * If $enabled is false, apps are installed as disabled. + */ + public static function installShippedApps( $enabled ){ + global $SERVERROOT; + $dir = opendir( "$SERVERROOT/apps" ); + while( false !== ( $filename = readdir( $dir ))){ + if( substr( $filename, 0, 1 ) != '.' and is_dir("$SERVERROOT/apps/$filename") ){ + if( file_exists( "$SERVERROOT/apps/$filename/appinfo/app.php" )){ + if(!OC_INSTALLER::isInstalled($filename)){ + //install the database + if(is_file("$SERVERROOT/apps/$filename/appinfo/database.xml")){ + OC_DB::createDbFromStructure("$SERVERROOT/apps/$filename/appinfo/database.xml"); + } + + //run appinfo/install.php + if(is_file("$SERVERROOT/apps/$filename/appinfo/install.php")){ + include("$SERVERROOT/apps/$filename/appinfo/install.php"); + } + $info=OC_APP::getAppInfo("$SERVERROOT/apps/$filename/appinfo/info.xml"); + OC_APPCONFIG::setValue($filename,'installed_version',$info['version']); + if( $enabled ){ + OC_APPCONFIG::setValue($filename,'enabled','yes'); + }else{ + OC_APPCONFIG::setValue($filename,'enabled','no'); + } + } + } + } + } + closedir( $dir ); + } } diff --git a/lib/setup.php b/lib/setup.php index bdb5dcc4e24..281f24db507 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -136,7 +136,7 @@ class OC_SETUP { OC_GROUP::addToGroup($username, 'admin'); //guess what this does - self::installShippedApps(); + OC_INSTALLER::installShippedApps(true); //create htaccess files for apache hosts self::createHtaccess(); //TODO detect if apache is used @@ -186,32 +186,6 @@ class OC_SETUP { $content = "deny from all"; file_put_contents(OC_CONFIG::getValue('datadirectory', $SERVERROOT.'/data').'/.htaccess', $content); } - - private static function installShippedApps(){ - global $SERVERROOT; - $dir = opendir( "$SERVERROOT/apps" ); - while( false !== ( $filename = readdir( $dir ))){ - if( substr( $filename, 0, 1 ) != '.' and is_dir("$SERVERROOT/apps/$filename") ){ - if( file_exists( "$SERVERROOT/apps/$filename/appinfo/app.php" )){ - if(!OC_INSTALLER::isInstalled($filename)){ - //install the database - if(is_file("$SERVERROOT/apps/$filename/appinfo/database.xml")){ - OC_DB::createDbFromStructure("$SERVERROOT/apps/$filename/appinfo/database.xml"); - } - - //run appinfo/install.php - if(is_file("$SERVERROOT/apps/$filename/appinfo/install.php")){ - include("$SERVERROOT/apps/$filename/appinfo/install.php"); - } - $info=OC_APP::getAppInfo("$SERVERROOT/apps/$filename/appinfo/info.xml"); - OC_APPCONFIG::setValue($filename,'installed_version',$info['version']); - OC_APPCONFIG::setValue($filename,'enabled','yes'); - } - } - } - } - closedir( $dir ); - } } ?> -- cgit v1.2.3 From 6a726e2488092b58d9e773f2771c4452ff337a63 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Tue, 21 Jun 2011 22:35:36 +0200 Subject: changed app enable status to buttons --- admin/css/apps.css | 9 +++++---- admin/js/apps.js | 19 ++++++++++--------- admin/templates/appsinst.php | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/admin/css/apps.css b/admin/css/apps.css index fbbd4fce4b5..cd427a3c536 100644 --- a/admin/css/apps.css +++ b/admin/css/apps.css @@ -13,16 +13,14 @@ table td.version, table td.enabled, table td.disabled text-align: center; } -table td.enabled +input[type="button"].enabled { color: #006600; - font-weight: bold; } -table td.disabled +input[type="button"].disabled { color: #660000; - font-weight: bold; } .preview @@ -65,3 +63,6 @@ table td.name a } +input[type="button"].appbutton { padding:0.1em 1em; border:1px solid #999; font-weight:bold; font-size:0.9em; cursor:pointer; } +input[type="button"]:hover.appbutton, form input[type="submit"]:focus { border:1px solid #999; background-color:#999; outline:0; } +input[type="button"]:active.appbutton { outline:0; } \ No newline at end of file diff --git a/admin/js/apps.js b/admin/js/apps.js index 4d8c68171bd..ee9d814eb0b 100644 --- a/admin/js/apps.js +++ b/admin/js/apps.js @@ -1,17 +1,18 @@ -$("div[x-use='appenableddiv']").live( "click", function(){ +$("input[x-use='appenablebutton']").live( "click", function(){ appid = $(this).parent().parent().attr("x-uid"); - if($(this).text() == "enabled"){ - $(this).html( "disabled" ); - $(this).parent().removeClass( "enabled" ); - $(this).parent().addClass( "disabled" ); + //alert("dsfsdfsdf"); + if($(this).val() == "enabled"){ + $(this).attr("value","disabled"); + $(this).removeClass( "enabled" ); + $(this).addClass( "disabled" ); //$.post( "ajax/disableapp.php", $(appid).serialize(), function(data){} ); $.post( "ajax/disableapp.php", { appid: appid }, function(data){ alert(data.status);}); } - else if($(this).text() == "disabled"){ - $(this).html( "enabled" ); - $(this).parent().removeClass( "disabled" ); - $(this).parent().addClass( "enabled" ); + else if($(this).val() == "disabled"){ + $(this).attr("value","enabled"); + $(this).removeClass( "disabled" ); + $(this).addClass( "enabled" ); $.post( "ajax/enableapp.php", { appid: appid }, function(data){ alert(data.status);} ); } }); \ No newline at end of file diff --git a/admin/templates/appsinst.php b/admin/templates/appsinst.php index 482273da1df..0e97df6add8 100644 --- a/admin/templates/appsinst.php +++ b/admin/templates/appsinst.php @@ -20,7 +20,7 @@
        t( $app['enabled'] ? 'enabled' : 'disabled' ); ?>
        ' class='appbutton prettybutton '/>
        \n"; + foreach ($res as $test => $stat) { + $code = substr($stat, 0, 4); + $color = ($code == 'pass') ? '#9f9' + : (($code == 'warn') ? '#ff9' : '#f99'); + $out .= sprintf("\n", $test, $color, $stat); + } + $out .= "
        %s%s
        "; + + wrap_html( $out ); +} + + +// Support functions + +/** + * Prefix the keys of an array with 'openid.' + * @param array $array + * @return array + */ +function append_openid ($array) { + $keys = array_keys($array); + $vals = array_values($array); + + $r = array(); + for ($i=0; $i $rl ) { + $r = str_repeat("0", $ll-$rl) . $r; + $o = $ll; + + } else { + $o = $ll; + } + + $v = ''; + $carry = 0; + + for ($i = $o-1; $i >= 0; $i--) { + $d = (int)$l[$i] + (int)$r[$i] + $carry; + if ($d <= 9) { + $carry = 0; + + } else { + $carry = 1; + $d -= 10; + } + $v = (string) $d . $v; + } + + if ($carry > 0) + $v = "1" . $v; + + return $v; +} + +/** + * Create a big math comparison function + * @param string $l + * @param string $r + * @return string + */ +function bmcomp($l, $r) { + if (function_exists('bccomp')) + return bccomp($l, $r); + + global $profile; + if ($profile['use_gmp']) + return gmp_strval(gmp_cmp($l, $r)); + + $l = strval($l); $r = strval($r); + $ll = strlen($l); $lr = strlen($r); + if ($ll != $lr) + return ($ll > $lr) ? 1 : -1; + + return strcmp($l, $r); +} + +/** + * Create a big math division function + * @param string $l + * @param string $r + * @param int $z + * @return string + * @url http://www.icosaedro.it/bigint Inspired by + */ +function bmdiv($l, $r, $z = 0) { + if (function_exists('bcdiv')) + return ($z == 0) ? bcdiv($l, $r) : bcmod($l, $r); + + global $profile; + if ($profile['use_gmp']) + return gmp_strval(($z == 0) ? gmp_div_q($l, $r) : gmp_mod($l, $r)); + + $l = strval($l); $r = strval($r); + $v = '0'; + + while (true) { + if( bmcomp($l, $r) < 0 ) + break; + + $delta = strlen($l) - strlen($r); + if ($delta >= 1) { + $zeroes = str_repeat("0", $delta); + $r2 = $r . $zeroes; + + if (strcmp($l, $r2) >= 0) { + $v = bmadd($v, "1" . $zeroes); + $l = bmsub($l, $r2); + + } else { + $zeroes = str_repeat("0", $delta - 1); + $v = bmadd($v, "1" . $zeroes); + $l = bmsub($l, $r . $zeroes); + } + + } else { + $l = bmsub($l, $r); + $v = bmadd($v, "1"); + } + } + + return ($z == 0) ? $v : $l; +} + +/** + * Create a big math multiplication function + * @param string $l + * @param string $r + * @return string + * @url http://www.icosaedro.it/bigint Inspired by + */ +function bmmul($l, $r) { + if (function_exists('bcmul')) + return bcmul($l, $r); + + global $profile; + if ($profile['use_gmp']) + return gmp_strval(gmp_mul($l, $r)); + + $l = strval($l); $r = strval($r); + + $v = '0'; + $z = ''; + + for( $i = strlen($r)-1; $i >= 0; $i-- ){ + $bd = (int) $r[$i]; + $carry = 0; + $p = ""; + for( $j = strlen($l)-1; $j >= 0; $j-- ){ + $ad = (int) $l[$j]; + $pd = $ad * $bd + $carry; + if( $pd <= 9 ){ + $carry = 0; + } else { + $carry = (int) ($pd / 10); + $pd = $pd % 10; + } + $p = (string) $pd . $p; + } + if( $carry > 0 ) + $p = (string) $carry . $p; + $p = $p . $z; + $z .= "0"; + $v = bmadd($v, $p); + } + + return $v; +} + +/** + * Create a big math modulus function + * @param string $value + * @param string $mod + * @return string + */ +function bmmod( $value, $mod ) { + if (function_exists('bcmod')) + return bcmod($value, $mod); + + global $profile; + if ($profile['use_gmp']) + return gmp_strval(gmp_mod($value, $mod)); + + $r = bmdiv($value, $mod, 1); + return $r; +} + +/** + * Create a big math power function + * @param string $value + * @param string $exponent + * @return string + */ +function bmpow ($value, $exponent) { + if (function_exists('bcpow')) + return bcpow($value, $exponent); + + global $profile; + if ($profile['use_gmp']) + return gmp_strval(gmp_pow($value, $exponent)); + + $r = '1'; + while ($exponent) { + $r = bmmul($r, $value, 100); + $exponent--; + } + return (string)rtrim($r, '0.'); +} + +/** + * Create a big math 'powmod' function + * @param string $value + * @param string $exponent + * @param string $mod + * @return string + * @url http://php.net/manual/en/function.bcpowmod.php#72704 Borrowed from + */ +function bmpowmod ($value, $exponent, $mod) { + if (function_exists('bcpowmod')) + return bcpowmod($value, $exponent, $mod); + + global $profile; + if ($profile['use_gmp']) + return gmp_strval(gmp_powm($value, $exponent, $mod)); + + $r = ''; + while ($exponent != '0') { + $t = bmmod($exponent, '4096'); + $r = substr("000000000000" . decbin(intval($t)), -12) . $r; + $exponent = bmdiv($exponent, '4096'); + } + + $r = preg_replace("!^0+!","",$r); + + if ($r == '') + $r = '0'; + $value = bmmod($value, $mod); + $erb = strrev($r); + $q = '1'; + $a[0] = $value; + + for ($i = 1; $i < strlen($erb); $i++) { + $a[$i] = bmmod( bmmul($a[$i-1], $a[$i-1]), $mod ); + } + + for ($i = 0; $i < strlen($erb); $i++) { + if ($erb[$i] == "1") { + $q = bmmod( bmmul($q, $a[$i]), $mod ); + } + } + + return($q); +} + +/** + * Create a big math subtraction function + * @param string $l + * @param string $r + * @return string + * @url http://www.icosaedro.it/bigint Inspired by + */ +function bmsub($l, $r) { + if (function_exists('bcsub')) + return bcsub($l, $r); + + global $profile; + if ($profile['use_gmp']) + return gmp_strval(gmp_sub($l, $r)); + + + $l = strval($l); $r = strval($r); + $ll = strlen($l); $rl = strlen($r); + + if ($ll < $rl) { + $l = str_repeat("0", $rl-$ll) . $l; + $o = $rl; + } elseif ( $ll > $rl ) { + $r = str_repeat("0", $ll-$rl) . (string)$r; + $o = $ll; + } else { + $o = $ll; + } + + if (strcmp($l, $r) >= 0) { + $sign = ''; + } else { + $x = $l; $l = $r; $r = $x; + $sign = '-'; + } + + $v = ''; + $carry = 0; + + for ($i = $o-1; $i >= 0; $i--) { + $d = ($l[$i] - $r[$i]) - $carry; + if ($d < 0) { + $carry = 1; + $d += 10; + } else { + $carry = 0; + } + $v = (string) $d . $v; + } + + return $sign . ltrim($v, '0'); +} + + +/** + * Get a binary value + * @param integer $n + * @return string + * @url http://openidenabled.com Borrowed from PHP-OpenID + */ +function bin ($n) { + $bytes = array(); + while (bmcomp($n, 0) > 0) { + array_unshift($bytes, bmmod($n, 256)); + $n = bmdiv($n, bmpow(2,8)); + } + + if ($bytes && ($bytes[0] > 127)) + array_unshift($bytes, 0); + + $b = ''; + foreach ($bytes as $byte) + $b .= pack('C', $byte); + + return $b; +} + + +/** + * Debug logging + * @param mixed $x + * @param string $m + */ +function debug ($x, $m = null) { + global $profile; + + if (! isset($profile['debug']) || $profile['debug'] === false) + return true; + + if (! is_writable(dirname($profile['logfile'])) &! is_writable($profile['logfile'])) + error_500('Cannot write to debug log: ' . $profile['logfile']); + + if (is_array($x)) { + ob_start(); + print_r($x); + $x = $m . ($m != null ? "\n" : '') . ob_get_clean(); + + } else { + $x .= "\n"; + } + + error_log($x . "\n", 3, $profile['logfile']); +} + + +/** + * Destroy a consumer's assoc handle + * @param string $id + */ +function destroy_assoc_handle ( $id ) { + debug("Destroying session: $id"); + + $sid = session_id(); + session_write_close(); + + session_id($id); + session_start(); + session_destroy(); + + session_id($sid); + session_start(); +} + + +/** + * Return an error message to the user + * @param string $message + */ +function error_400 ( $message = 'Bad Request' ) { + header("HTTP/1.1 400 Bad Request"); + wrap_html($message); +} + + +/** + * Return an error message to the user + * @param string $message + */ +function error_403 ( $message = 'Forbidden' ) { + header("HTTP/1.1 403 Forbidden"); + wrap_html($message); +} + + +/** + * Return an error message to the user + * @param string $message + */ +function error_500 ( $message = 'Internal Server Error' ) { + header("HTTP/1.1 500 Internal Server Error"); + wrap_html($message); +} + + +/** + * Return an error message to the consumer + * @param string $message + */ +function error_get ( $url, $message = 'Bad Request') { + wrap_keyed_redirect($url, array('mode' => 'error', 'error' => $message)); +} + + +/** + * Return an error message to the consumer + * @param string $message + */ +function error_post ( $message = 'Bad Request' ) { + header("HTTP/1.1 400 Bad Request"); + echo ('error:' . $message); + exit(0); +} + + +/** + * Do an HMAC + * @param string $key + * @param string $data + * @param string $hash + * @return string + * @url http://php.net/manual/en/function.sha1.php#39492 Borrowed from + */ +function hmac($key, $data, $hash = 'sha1_20') { + $blocksize=64; + + if (strlen($key) > $blocksize) + $key = $hash($key); + + $key = str_pad($key, $blocksize,chr(0x00)); + $ipad = str_repeat(chr(0x36),$blocksize); + $opad = str_repeat(chr(0x5c),$blocksize); + + $h1 = $hash(($key ^ $ipad) . $data); + $hmac = $hash(($key ^ $opad) . $h1); + return $hmac; +} + + +if (! function_exists('http_build_query')) { +/** + * Create function if missing + * @param array $array + * @return string + */ +function http_build_query ($array) { + $r = array(); + foreach ($array as $key => $val) + $r[] = sprintf('%s=%s', urlencode($key), urlencode($val)); + return implode('&', $r); +}} + + +/** + * Turn a binary back into a long + * @param string $b + * @return integer + * @url http://openidenabled.com Borrowed from PHP-OpenID + */ +function long($b) { + $bytes = array_merge(unpack('C*', $b)); + $n = 0; + foreach ($bytes as $byte) { + $n = bmmul($n, bmpow(2,8)); + $n = bmadd($n, $byte); + } + return $n; +} + + +/** + * Create a new consumer association + * @param integer $expiration + * @return array + */ +function new_assoc ( $expiration ) { + if (isset($_SESSION) && is_array($_SESSION)) { + $sid = session_id(); + $dat = session_encode(); + session_write_close(); + } + + session_start(); + session_regenerate_id('false'); + + $id = session_id(); + $shared_secret = new_secret(); + debug('Started new assoc session: ' . $id); + + $_SESSION = array(); + $_SESSION['expiration'] = $expiration; + $_SESSION['shared_secret'] = base64_encode($shared_secret); + + session_write_close(); + + if (isset($sid)) { + session_id($sid); + session_start(); + $_SESSION = array(); + session_decode($dat); + } + + return array($id, $shared_secret); +} + + +/** + * Create a new shared secret + * @return string + */ +function new_secret () { + $r = ''; + for($i=0; $i<20; $i++) + $r .= chr(mt_rand(0, 255)); + + debug("Generated new key: hash = '" . md5($r) . "', length = '" . strlen($r) . "'"); + return $r; +} + + +/** + * Random number generation + * @param integer max + * @return integer + */ +function random ( $max ) { + if (strlen($max) < 4) + return mt_rand(1, $max - 1); + + $r = ''; + for($i=1; $i= 0 && ($pr_host[$break] != '*' || substr_count(substr($pr_host, 0, $break), '.') < 2)) + return false; + + // now compare the paths + $break = str_diff_at($parts['child']['path'], $parts['parent']['path']); + if ($break >= 0 + && ($break < strlen($parts['parent']['path']) && $parts['parent']['path'][$break] != '*') + || ($break > strlen($parts['child']['path']))) + return false; + + return true; +} + + +/** + * Create a user session + * @global array $profile + * @global array $proto + */ +function user_session () { + global $proto, $profile; + + session_name('phpMyID_Server'); + @session_start(); + + $profile['authorized'] = (isset($_SESSION['auth_username']) + && $_SESSION['auth_username'] == $profile['auth_username']) + ? true + : false; + + debug('Started user session: ' . session_id() . ' Auth? ' . $profile['authorized']); +} + + +/** + * Return HTML + * @global string $charset + * @param string $message + */ +function wrap_html ( $message ) { + global $charset, $profile; + header('Content-Type: text/html; charset=' . $charset); + $html= ' + + +phpMyID + + +' . implode("\n", $profile['opt_headers']) . ' + + + + +

        ' . $message . '

        + + +'; + error_log($html); + echo $html; + exit(0); +} + + +/** + * Return a key-value pair in plain text + * @global string $charset + * @param array $keys + */ +function wrap_kv ( $keys ) { + global $charset; + + debug($keys, 'Wrapped key/vals'); + header('Content-Type: text/plain; charset=' . $charset); + foreach ($keys as $key => $value) + printf("%s:%s\n", $key, $value); + + exit(0); +} + + +/** + * Redirect, with OpenID keys + * @param string $url + * @param array @keys + */ +function wrap_keyed_redirect ($url, $keys) { + $keys = append_openid($keys); + debug($keys, 'Location keys'); + + $q = strpos($url, '?') ? '&' : '?'; + wrap_redirect($url . $q . http_build_query($keys)); +} + + +/** + * Redirect the browser + * @global string $charset + * @param string $url + */ +function wrap_redirect ($url) { + header('HTTP/1.1 302 Found'); + header('Location: ' . $url); + debug('Location: ' . $url); + exit(0); +} + +/** + * Return an HTML refresh + * @global string $charset + * @param string $url + */ +function wrap_refresh ($url) { + global $charset; + + header('Content-Type: text/html; charset=' . $charset); + echo ' + + +phpMyID + + + +

        Redirecting to ' . $url . '

        + + +'; + + debug('Refresh: ' . $url); + exit(0); +} + + +/** + * Implement binary x_or + * @param string $a + * @param string $b + * @return string + */ +function x_or ($a, $b) { + $r = ""; + + for ($i = 0; $i < strlen($b); $i++) + $r .= $a[$i] ^ $b[$i]; + debug("Xor size: " . strlen($r)); + return $r; +} + + + +/* + * App Initialization + */ +// Determine the charset to use +$GLOBALS['charset'] = 'iso-8859-1'; + +// Set the internal encoding +if (function_exists('mb_internal_encoding')) + mb_internal_encoding($charset); + +// Avoid problems with non-default arg_separator.output settings +// Credit for this goes to user 'prelog' on the forums +ini_set('arg_separator.output', '&'); + +// Do a check to be sure everything is set up correctly +self_check(); + + +/** + * Determine the HTTP request port + * @name $port + * @global integer $GLOBALS['port'] + */ +$GLOBALS['port'] = ((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' && $_SERVER['SERVER_PORT'] == 443) + || $_SERVER['SERVER_PORT'] == 80) + ? '' + : ':' . $_SERVER['SERVER_PORT']; + + +error_log($_SERVER['HTTP_HOST']); +/** + * Determine the HTTP request protocol + * @name $proto + * @global string $GLOBALS['proto'] + */ +$GLOBALS['proto'] = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http'; + +// Set the authorization state - DO NOT OVERRIDE +$profile['authorized'] = false; + +// Set a default IDP URL +if (! array_key_exists('idp_url', $profile)) + $profile['idp_url'] = sprintf("%s://%s%s%s", + $proto, + $_SERVER['SERVER_NAME'], + $port, + $_SERVER['PHP_SELF']); + +// Determine the requested URL - DO NOT OVERRIDE +$profile['req_url'] = sprintf("%s://%s%s", + $proto, + $_SERVER['HTTP_HOST'], +// $port,//host already includes the path + $_SERVER["REQUEST_URI"]); + +error_log($profile['req_url']); + +// Set the default allowance for testing +if (! array_key_exists('allow_test', $profile)) + $profile['allow_test'] = false; + +// Set the default allowance for gmp +if (! array_key_exists('allow_gmp', $profile)) + $profile['allow_gmp'] = false; + +// Set the default force bigmath - BAD IDEA to override this +if (! array_key_exists('force_bigmath', $profile)) + $profile['force_bigmath'] = false; + +// Determine if GMP is usable +$profile['use_gmp'] = (extension_loaded('gmp') && $profile['allow_gmp']) ? true : false; + +// Determine if I can perform big math functions +$profile['use_bigmath'] = (extension_loaded('bcmath') || $profile['use_gmp'] || $profile['force_bigmath']) ? true : false; + +// Set a default authentication domain +if (! array_key_exists('auth_domain', $profile)) + $profile['auth_domain'] = $profile['req_url'] . ' ' . $profile['idp_url']; + +// Set a default authentication realm +if (! array_key_exists('auth_realm', $profile)) + $profile['auth_realm'] = 'phpMyID'; + +// Determine the realm for digest authentication - DO NOT OVERRIDE +$profile['php_realm'] = $profile['auth_realm'] . (ini_get('safe_mode') ? '-' . getmyuid() : ''); + +// Set a default lifetime - the lesser of GC and cache time +if (! array_key_exists('lifetime', $profile)) { + $sce = session_cache_expire() * 60; + $gcm = ini_get('session.gc_maxlifetime'); + $profile['lifetime'] = $sce < $gcm ? $sce : $gcm; +} + +// Set a default log file +if (! array_key_exists('logfile', $profile)) + $profile['logfile'] = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $profile['auth_realm'] . '.debug.log'; + + +/* + * Optional Initialization + */ +// Setup optional headers +$profile['opt_headers'] = array(); + +// Determine if I should add microid stuff +if (array_key_exists('microid', $profile)) { + $hash = sha1($profile['idp_url']); + $values = is_array($profile['microid']) ? $profile['microid'] : array($profile['microid']); + + foreach ($values as $microid) { + preg_match('/^([a-z]+)/i', $microid, $mtx); + $profile['opt_headers'][] = sprintf('', $mtx[1], $proto, sha1(sha1($microid) . $hash)); + } +} + +// Determine if I should add pavatar stuff +if (array_key_exists('pavatar', $profile)) + $profile['opt_headers'][] = sprintf('', $profile['pavatar']); + + +/* + * Do it + */ +// Decide which runmode, based on user request or default +$run_mode = (isset($_REQUEST['openid_mode']) + && in_array($_REQUEST['openid_mode'], $known['openid_modes'])) + ? $_REQUEST['openid_mode'] + : 'no'; + +// Run in the determined runmode +debug("Run mode: $run_mode at: " . time()); +debug($_REQUEST, 'Request params'); +call_user_func($run_mode . '_mode'); +?> diff --git a/apps/user_openid/settings.php b/apps/user_openid/settings.php new file mode 100644 index 00000000000..76316de100c --- /dev/null +++ b/apps/user_openid/settings.php @@ -0,0 +1,24 @@ +assign('identity',$identity); +$tmpl->assign('user',OC_USER::getUser()); + +$tmpl->printPage(); + +?> diff --git a/apps/user_openid/templates/settings.php b/apps/user_openid/templates/settings.php new file mode 100644 index 00000000000..7a1b530fbca --- /dev/null +++ b/apps/user_openid/templates/settings.php @@ -0,0 +1,7 @@ +
        +
        + t( 'OpenID identity' );?> +
        + +
        +
        diff --git a/apps/user_openid/user.php b/apps/user_openid/user.php new file mode 100644 index 00000000000..9ca1fd47c92 --- /dev/null +++ b/apps/user_openid/user.php @@ -0,0 +1,34 @@ +. +* +*/ + +$USERNAME=substr($_SERVER["REQUEST_URI"],strpos($_SERVER["REQUEST_URI"],'.php/')+5); +if(strpos($USERNAME,'?')){ + $USERNAME=substr($USERNAME,0,strpos($USERNAME,'?')); +} + +require_once '../../lib/base.php'; + +require_once 'phpmyid.php'; + + +?> \ No newline at end of file diff --git a/apps/user_openid/user_openid.php b/apps/user_openid/user_openid.php new file mode 100644 index 00000000000..d4bcefeb26f --- /dev/null +++ b/apps/user_openid/user_openid.php @@ -0,0 +1,73 @@ +. + * + */ + +require_once('User/backend.php'); +require_once('class.openid.v3.php'); + +/** + * Class for user management in a SQL Database (e.g. MySQL, SQLite) + */ +class OC_USER_OPENID extends OC_USER_BACKEND { + /** + * @brief Check if the password is correct + * @param $uid The username + * @param $password The password + * @returns true/false + * + * Check if the password is correct without logging in the user + */ + public function checkPassword( $uid, $password ){ + global $WEBROOT; + // Get identity from user and redirect browser to OpenID Server + $openid = new SimpleOpenID; + $openid->SetIdentity($uid); + $openid->SetTrustRoot('http://' . $_SERVER["HTTP_HOST"]); + if ($openid->GetOpenIDServer()){ + $openid->SetApprovedURL('http://' . $_SERVER["HTTP_HOST"] . $WEBROOT); // Send Response from OpenID server to this script + $openid->Redirect(); // This will redirect user to OpenID Server + exit; + }else{ + $error = $openid->GetError(); + echo "ERROR CODE: " . $error['code'] . "
        "; + echo "ERROR DESCRIPTION: " . $error['description'] . "
        "; + } + exit; + } + + /** + * find the user that can be authenticated with an openid identity + */ + public static function findUserForIdentity($identity){ + $query=OC_DB::prepare('SELECT userid FROM *PREFIX*preferences WHERE appid=? AND configkey=? AND configvalue=?'); + $result=$query->execute(array('user_openid','identity',$identity))->fetchAll(); + if(count($result)>0){ + return $result[0]['userid']; + }else{ + return false; + } + } +} + + + +?> \ No newline at end of file -- cgit v1.2.3 From 1ce24d892b0e1ebb568930cee882d2be68c32240 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 23 Jun 2011 17:58:27 +0200 Subject: don't show errors when the login isn't an openid identity --- apps/user_openid/user_openid.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/user_openid/user_openid.php b/apps/user_openid/user_openid.php index d4bcefeb26f..ddf5cc9bc23 100644 --- a/apps/user_openid/user_openid.php +++ b/apps/user_openid/user_openid.php @@ -47,9 +47,7 @@ class OC_USER_OPENID extends OC_USER_BACKEND { $openid->Redirect(); // This will redirect user to OpenID Server exit; }else{ - $error = $openid->GetError(); - echo "ERROR CODE: " . $error['code'] . "
        "; - echo "ERROR DESCRIPTION: " . $error['description'] . "
        "; + return false; } exit; } -- cgit v1.2.3 From 6452f5b5cb76b4a26ae8f114a55d09cfd482be52 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Thu, 23 Jun 2011 18:18:48 +0200 Subject: OpenID now won't load if curl is not available --- apps/user_openid/appinfo/app.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php index fb3de10e2a8..2e238ed3f27 100644 --- a/apps/user_openid/appinfo/app.php +++ b/apps/user_openid/appinfo/app.php @@ -1,5 +1,10 @@ "user_openid_settings", 'order'=>1, "href" => OC_HELPER::linkTo( "user_openid", "settings.php" ), "name" => "OpenID")); -- cgit v1.2.3 From 8b76590f5db0c2c94dcf3e868d0e39494a1e39b1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 23 Jun 2011 18:23:06 +0200 Subject: fix creating users --- lib/user.php | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/user.php b/lib/user.php index 33ee5b8762a..25f555b47b1 100644 --- a/lib/user.php +++ b/lib/user.php @@ -166,7 +166,9 @@ class OC_USER { if( $run ){ //delete the user from all backends foreach(self::$_usedBackends as $backend){ - $backend->deleteUser($uid); + if($backend->implementsActions(OC_USER_BACKEND_DELETE_USER)){ + $backend->deleteUser($uid); + } } // We have to delete the user from all groups foreach( OC_GROUP::getUserGroups( $uid ) as $i ){ @@ -270,8 +272,10 @@ class OC_USER { if( $run ){ foreach(self::$_usedBackends as $backend){ - if($backend->userExists($uid)){ - $backend->setPassword($uid,$password); + if($backend->implementsActions(OC_USER_BACKEND_SET_PASSWORD)){ + if($backend->userExists($uid)){ + $backend->setPassword($uid,$password); + } } } OC_HOOK::emit( "OC_USER", "post_setPassword", array( "uid" => $uid, "password" => $password )); @@ -292,9 +296,11 @@ class OC_USER { */ public static function checkPassword( $uid, $password ){ foreach(self::$_usedBackends as $backend){ - $result=$backend->checkPassword( $uid, $password ); - if($result===true){ - return true; + if($backend->implementsActions(OC_USER_BACKEND_CHECK_PASSWORD)){ + $result=$backend->checkPassword( $uid, $password ); + if($result===true){ + return true; + } } } } @@ -322,9 +328,11 @@ class OC_USER { */ public static function userExists($uid){ foreach(self::$_usedBackends as $backend){ - $result=$backend->userExists($uid); - if($result===true){ - return true; + if($backend->implementsActions(OC_USER_BACKEND_USER_EXISTS)){ + $result=$backend->userExists($uid); + if($result===true){ + return true; + } } } return false; -- cgit v1.2.3 From 5aa8f16bbf95b3de867a4c5e3cf1e862885e5568 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Thu, 23 Jun 2011 23:14:09 +0200 Subject: forbid indexes --- .htaccess | 1 + 1 file changed, 1 insertion(+) diff --git a/.htaccess b/.htaccess index 58230365bf5..f2172f4357a 100644 --- a/.htaccess +++ b/.htaccess @@ -2,3 +2,4 @@ ErrorDocument 404 //owncloud/templates/404.php php_value upload_max_filesize 20M php_value post_max_size 20M SetEnv htaccessWorking true +Options -Indexes -- cgit v1.2.3 From 0bf67298d142b157712ce345e1d999ff2ab9ea49 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Thu, 23 Jun 2011 23:41:53 +0200 Subject: no indexing in generated htaccess --- lib/files.php | 1 + lib/setup.php | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/files.php b/lib/files.php index fca311833b5..0e7e44ec2ab 100644 --- a/lib/files.php +++ b/lib/files.php @@ -297,6 +297,7 @@ class OC_FILES { $content.= "php_value upload_max_filesize $size\n";//upload limit $content.= "php_value post_max_size $size\n"; $content.= "SetEnv htaccessWorking true\n"; + $content.= "Options -Indexes\n"; @file_put_contents($SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it } } diff --git a/lib/setup.php b/lib/setup.php index 0a8c9650cbc..a3cefad62b0 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -188,6 +188,7 @@ class OC_SETUP { $content.= "php_value upload_max_filesize 20M\n";//upload limit $content.= "php_value post_max_size 20M\n"; $content.= "SetEnv htaccessWorking true\n"; + $content.= "Options -Indexes\n"; @file_put_contents($SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it $content = "deny from all"; -- cgit v1.2.3 From 2073d3b08e97675a1f418b44a4e7c72039da2149 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Thu, 23 Jun 2011 23:47:46 +0200 Subject: fix 404 --- .htaccess | 2 +- core/templates/404.php | 2 +- lib/files.php | 2 +- lib/setup.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.htaccess b/.htaccess index f2172f4357a..c818c9ca2ea 100644 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,4 @@ -ErrorDocument 404 //owncloud/templates/404.php +ErrorDocument 404 //core/templates/404.php php_value upload_max_filesize 20M php_value post_max_size 20M SetEnv htaccessWorking true diff --git a/core/templates/404.php b/core/templates/404.php index b287571d166..b78828e6301 100644 --- a/core/templates/404.php +++ b/core/templates/404.php @@ -1,6 +1,6 @@ Date: Thu, 23 Jun 2011 22:51:25 +0200 Subject: Add user_ldap plugin --- apps/user_ldap/appinfo/app.php | 36 ++++++++++++++++++++ apps/user_ldap/appinfo/info.xml | 10 ++++++ apps/user_ldap/settings.php | 48 +++++++++++++++++++++++++++ apps/user_ldap/templates/settings.php | 24 ++++++++++++++ apps/user_ldap/user_ldap.php | 62 +++++++++++++++++++++++++++++++++++ 5 files changed, 180 insertions(+) create mode 100644 apps/user_ldap/appinfo/app.php create mode 100644 apps/user_ldap/appinfo/info.xml create mode 100644 apps/user_ldap/settings.php create mode 100644 apps/user_ldap/templates/settings.php create mode 100644 apps/user_ldap/user_ldap.php diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php new file mode 100644 index 00000000000..f7ce4f87a62 --- /dev/null +++ b/apps/user_ldap/appinfo/app.php @@ -0,0 +1,36 @@ +. +* +*/ + +require_once('apps/user_ldap/user_ldap.php'); + +// register user backend +OC_USER::useBackend( "LDAP" ); + +// add settings page to navigation +$entry = array( + 'id' => "user_ldap_settings", + 'order'=>1, + 'href' => OC_HELPER::linkTo( "user_ldap", "settings.php" ), + 'name' => 'LDAP' +); +OC_APP::addNavigationSubEntry( "core_users", $entry); diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml new file mode 100644 index 00000000000..9a6ee1436fc --- /dev/null +++ b/apps/user_ldap/appinfo/info.xml @@ -0,0 +1,10 @@ + + + user_ldap + LDAP user backend + Authenticate Users by LDAP + 0.1 + AGPL + Dominik Schmidt + 2 + diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php new file mode 100644 index 00000000000..22f817e7ca9 --- /dev/null +++ b/apps/user_ldap/settings.php @@ -0,0 +1,48 @@ +. + * + */ + +require_once('../../lib/base.php'); +require( 'template.php' ); + +if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ + header( "Location: ".OC_HELPER::linkTo( "index.php" )); + exit(); +} + +$params = array('ldap_host', 'ldap_dn', 'ldap_password', 'ldap_base', 'ldap_filter'); + +foreach($params as $param){ + if(isset($_POST[$param])){ + OC_APPCONFIG::setValue('user_ldap', $param, $_POST[$param]); + } +} +OC_APP::setActiveNavigationEntry( "user_ldap_settings" ); + + +// fill template +$tmpl = new OC_TEMPLATE( 'user_ldap', 'settings', 'admin' ); +foreach($params as $param){ + $value = OC_APPCONFIG::getValue('user_ldap', $param,''); + $tmpl->assign($param, $value); +} +$tmpl->printPage(); diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php new file mode 100644 index 00000000000..5f7ee671ce9 --- /dev/null +++ b/apps/user_ldap/templates/settings.php @@ -0,0 +1,24 @@ +
        +
        + LDAP +
        +
        + Host: * +
        +
        + DN: +
        +
        + Password: +
        +
        + Base: * +
        +
        + Filter * (use %uid placeholder): +
        +
        + +
        * required +
        +
        \ No newline at end of file diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php new file mode 100644 index 00000000000..52f88064292 --- /dev/null +++ b/apps/user_ldap/user_ldap.php @@ -0,0 +1,62 @@ +. + * + */ + +require_once('User/backend.php'); + +class OC_USER_LDAP extends OC_USER_BACKEND { + + public function checkPassword( $uid, $password ) { + $ldap_host = OC_APPCONFIG::getValue('user_ldap', 'ldap_host',''); + $ldap_dn = OC_APPCONFIG::getValue('user_ldap', 'ldap_dn',''); + $ldap_password = OC_APPCONFIG::getValue('user_ldap', 'ldap_password',''); + $ldap_base = OC_APPCONFIG::getValue('user_ldap', 'ldap_base',''); + $ldap_filter = OC_APPCONFIG::getValue('user_ldap', 'ldap_filter',''); + + // connect to server + $ds = ldap_connect( $ldap_host ); + if( !$ds ) + return false; + + // login for search + if(!empty($ldap_dn)) { + $ldap_login = @ldap_bind( $ds, $ldap_dn, $ldap_password ); + if(!$ldap_login) + return false; + } + + // get dn + $filter = str_replace("%uid", $uid, $ldap_filter); + $sr = ldap_search( $ds, $ldap_base, $filter ); + $entries = ldap_get_entries( $ds, $sr ); + + if( $entries["count"] == 0 ) + return false; + + $dn = $entries[0]["dn"]; + $result = @ldap_bind( $ds, $dn, $password ); + + return $result; + } +} + +?> -- cgit v1.2.3 From 612f8cb9546a0607defe7a0ff5fd8048bbfdf92c Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 23 Jun 2011 23:17:10 +0200 Subject: user_ldap: add port setting --- apps/user_ldap/appinfo/app.php | 3 +++ apps/user_ldap/settings.php | 6 +++++- apps/user_ldap/templates/settings.php | 3 +++ apps/user_ldap/user_ldap.php | 5 ++++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index f7ce4f87a62..67b61989f7f 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -23,6 +23,9 @@ require_once('apps/user_ldap/user_ldap.php'); +// define LDAP_DEFAULT_PORT +define("OC_USER_BACKEND_LDAP_DEFAULT_PORT", 389); + // register user backend OC_USER::useBackend( "LDAP" ); diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php index 22f817e7ca9..f7aff1b4614 100644 --- a/apps/user_ldap/settings.php +++ b/apps/user_ldap/settings.php @@ -29,7 +29,7 @@ if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )) exit(); } -$params = array('ldap_host', 'ldap_dn', 'ldap_password', 'ldap_base', 'ldap_filter'); +$params = array('ldap_host', 'ldap_port', 'ldap_dn', 'ldap_password', 'ldap_base', 'ldap_filter'); foreach($params as $param){ if(isset($_POST[$param])){ @@ -45,4 +45,8 @@ foreach($params as $param){ $value = OC_APPCONFIG::getValue('user_ldap', $param,''); $tmpl->assign($param, $value); } + +// ldap_port has a default value +$tmpl->assign( 'ldap_port', OC_APPCONFIG::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT)); + $tmpl->printPage(); diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 5f7ee671ce9..0145736e803 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -5,6 +5,9 @@
        Host: *
        +
        + Port: * +
        DN:
        diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 52f88064292..cd4a92a7b16 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -25,15 +25,18 @@ require_once('User/backend.php'); class OC_USER_LDAP extends OC_USER_BACKEND { + + public function checkPassword( $uid, $password ) { $ldap_host = OC_APPCONFIG::getValue('user_ldap', 'ldap_host',''); + $ldap_port = OC_APPCONFIG::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT); $ldap_dn = OC_APPCONFIG::getValue('user_ldap', 'ldap_dn',''); $ldap_password = OC_APPCONFIG::getValue('user_ldap', 'ldap_password',''); $ldap_base = OC_APPCONFIG::getValue('user_ldap', 'ldap_base',''); $ldap_filter = OC_APPCONFIG::getValue('user_ldap', 'ldap_filter',''); // connect to server - $ds = ldap_connect( $ldap_host ); + $ds = ldap_connect( $ldap_host, $ldap_port ); if( !$ds ) return false; -- cgit v1.2.3 From d4618d633a2240c15b19c8c2b40fb05f1d2d7334 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 23 Jun 2011 23:19:04 +0200 Subject: user_ldap: use input-type-password for ldap_password --- apps/user_ldap/templates/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 0145736e803..5dddb71a022 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -12,7 +12,7 @@ DN:
        - Password: + Password:
        Base: * -- cgit v1.2.3 From 5f29f8a8310823ed99b0d627ea03c9ff3e5efcb3 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 23 Jun 2011 23:41:02 +0200 Subject: user_ldap: implement userExists --- apps/user_ldap/user_ldap.php | 68 +++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index cd4a92a7b16..1718a307ccd 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -25,41 +25,69 @@ require_once('User/backend.php'); class OC_USER_LDAP extends OC_USER_BACKEND { + protected $ds; + // cached settings + protected $ldap_host; + protected $ldap_port; + protected $ldap_dn; + protected $ldap_password; + protected $ldap_base; + protected $ldap_filter; - public function checkPassword( $uid, $password ) { - $ldap_host = OC_APPCONFIG::getValue('user_ldap', 'ldap_host',''); - $ldap_port = OC_APPCONFIG::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT); - $ldap_dn = OC_APPCONFIG::getValue('user_ldap', 'ldap_dn',''); - $ldap_password = OC_APPCONFIG::getValue('user_ldap', 'ldap_password',''); - $ldap_base = OC_APPCONFIG::getValue('user_ldap', 'ldap_base',''); - $ldap_filter = OC_APPCONFIG::getValue('user_ldap', 'ldap_filter',''); + function __construct() { + $this->ldap_host = OC_APPCONFIG::getValue('user_ldap', 'ldap_host',''); + $this->ldap_port = OC_APPCONFIG::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT ); + $this->ldap_dn = OC_APPCONFIG::getValue('user_ldap', 'ldap_dn',''); + $this->ldap_password = OC_APPCONFIG::getValue('user_ldap', 'ldap_password',''); + $this->ldap_base = OC_APPCONFIG::getValue('user_ldap', 'ldap_base',''); + $this->ldap_filter = OC_APPCONFIG::getValue('user_ldap', 'ldap_filter',''); + } - // connect to server - $ds = ldap_connect( $ldap_host, $ldap_port ); - if( !$ds ) - return false; + private function getDs() { + if(!$this->ds) { + $this->ds = ldap_connect( $this->ldap_host, $this->ldap_port ); + } - // login for search - if(!empty($ldap_dn)) { - $ldap_login = @ldap_bind( $ds, $ldap_dn, $ldap_password ); + // login + if(!empty($this->ldap_dn)) { + $ldap_login = @ldap_bind( $this->ds, $this->ldap_dn, $this->ldap_password ); if(!$ldap_login) return false; } + return $this->ds; + } + + private function getDn( $uid ) { + // connect to server + $ds = $this->getDs(); + if( !$ds ) + return false; + // get dn - $filter = str_replace("%uid", $uid, $ldap_filter); - $sr = ldap_search( $ds, $ldap_base, $filter ); - $entries = ldap_get_entries( $ds, $sr ); + $filter = str_replace("%uid", $uid, $this->ldap_filter); + $sr = ldap_search( $this->getDs(), $this->ldap_base, $filter ); + $entries = ldap_get_entries( $this->getDs(), $sr ); if( $entries["count"] == 0 ) return false; - $dn = $entries[0]["dn"]; - $result = @ldap_bind( $ds, $dn, $password ); + return $entries[0]["dn"]; + } + public function checkPassword( $uid, $password ) { + $dn = $this->getDn( $uid ); + if( !$dn ) + return false; + + return @ldap_bind( $this->getDs(), $dn, $password ); + } - return $result; + public function userExists( $uid ) { + $dn = getDn($uid); + return !empty($dn); } + } ?> -- cgit v1.2.3 From 735738fe6fbdc3afb6a9fd1d5fbec36b5020f9aa Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 23 Jun 2011 23:54:39 +0200 Subject: user_ldap: close ldap connection in dtor --- apps/user_ldap/user_ldap.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 1718a307ccd..1ee9809b3bb 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -44,6 +44,12 @@ class OC_USER_LDAP extends OC_USER_BACKEND { $this->ldap_filter = OC_APPCONFIG::getValue('user_ldap', 'ldap_filter',''); } + function __destruct() { + // close the connection + if( $this->ds ) + ldap_unbind($this->ds); + } + private function getDs() { if(!$this->ds) { $this->ds = ldap_connect( $this->ldap_host, $this->ldap_port ); -- cgit v1.2.3 From 53cb4c16ed85b09706676540e8bf704188f32c41 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Fri, 24 Jun 2011 00:24:45 +0200 Subject: add template to openid request page --- apps/user_openid/phpmyid.php | 7 ++++--- apps/user_openid/templates/nomode.php | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 apps/user_openid/templates/nomode.php diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php index 719bbd954c0..330cd466c48 100644 --- a/apps/user_openid/phpmyid.php +++ b/apps/user_openid/phpmyid.php @@ -12,6 +12,8 @@ * @version 0.9 */ +require( 'template.php' ); + /** * Set a constant to indicate that phpMyID is running @@ -558,9 +560,8 @@ function logout_mode () { * @global array $profile */ function no_mode () { - global $profile; - - wrap_html('This is an OpenID server endpoint. For more information, see http://openid.net/
        Server: ' . $profile['idp_url'] . '
        Realm: ' . $profile['php_realm'] . '
        Login' . ($profile['allow_test'] === true ? ' | Test' : null)); + $tmpl = new OC_TEMPLATE( 'user_openid', 'nomode', 'guest' ); + $tmpl->printPage(); } diff --git a/apps/user_openid/templates/nomode.php b/apps/user_openid/templates/nomode.php new file mode 100644 index 00000000000..13a1a894931 --- /dev/null +++ b/apps/user_openid/templates/nomode.php @@ -0,0 +1,23 @@ + + +
        + " alt="ownCloud" /> +
          +
        • +
          +

          t('This is an OpenID server endpoint. For more information, see http://openid.net/'));?>

          +

          t('Server: ').$profile['idp_url']); ?> +

          t('Realm: ').$profile['php_realm']); ?> +

          t('Login')); ?> + + | Test + +

          +
        • +
        +
        + -- cgit v1.2.3 From 1aa8399915bc6148fab3ad8e3eae736e9a135c09 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 24 Jun 2011 17:06:02 +0200 Subject: show error on openid request page when no user is selected --- apps/user_openid/phpmyid.php | 4 +++- apps/user_openid/templates/nomode.php | 21 +++++++++++++-------- apps/user_openid/user.php | 4 ++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php index 330cd466c48..5b04684cd7d 100644 --- a/apps/user_openid/phpmyid.php +++ b/apps/user_openid/phpmyid.php @@ -560,7 +560,9 @@ function logout_mode () { * @global array $profile */ function no_mode () { + global $USERNAME; $tmpl = new OC_TEMPLATE( 'user_openid', 'nomode', 'guest' ); + $tmpl->assign('user',$USERNAME); $tmpl->printPage(); } @@ -1669,7 +1671,7 @@ if (! array_key_exists('auth_domain', $profile)) // Set a default authentication realm if (! array_key_exists('auth_realm', $profile)) - $profile['auth_realm'] = 'phpMyID'; + $profile['auth_realm'] = 'ownCloud'; // Determine the realm for digest authentication - DO NOT OVERRIDE $profile['php_realm'] = $profile['auth_realm'] . (ini_get('safe_mode') ? '-' . getmyuid() : ''); diff --git a/apps/user_openid/templates/nomode.php b/apps/user_openid/templates/nomode.php index 13a1a894931..f85d28cdc9b 100644 --- a/apps/user_openid/templates/nomode.php +++ b/apps/user_openid/templates/nomode.php @@ -5,17 +5,22 @@ global $profile; ?>
        - " alt="ownCloud" /> + " alt="ownCloud" />
        • -

          t('This is an OpenID server endpoint. For more information, see http://openid.net/'));?>

          -

          t('Server: ').$profile['idp_url']); ?> -

          t('Realm: ').$profile['php_realm']); ?> -

          t('Login')); ?> - - | Test - +

          t('This is an OpenID server endpoint. For more information, see '));?>http://openid.net/

          + +

          t('Identity: ').$profile['idp_url']); ?>

          +

          t('Realm: ').$profile['php_realm']); ?>

          +

          t('User: ').$_['user']); ?> +

          t('Login')); ?> + + Test + + +

          t('Error: No user Selected')); ?>

          +
        diff --git a/apps/user_openid/user.php b/apps/user_openid/user.php index 9ca1fd47c92..2199e5f9e58 100644 --- a/apps/user_openid/user.php +++ b/apps/user_openid/user.php @@ -28,6 +28,10 @@ if(strpos($USERNAME,'?')){ require_once '../../lib/base.php'; +if(!OC_USER::userExists($USERNAME)){ + $USERNAME=''; +} + require_once 'phpmyid.php'; -- cgit v1.2.3 From 4d11e920be943bdd60c86e46b8f6c922dea87c79 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 24 Jun 2011 18:02:19 +0200 Subject: provide an option to add custom elements to the header of templates --- core/templates/layout.admin.php | 12 ++++++++++++ core/templates/layout.guest.php | 13 +++++++++++++ core/templates/layout.user.php | 12 ++++++++++++ lib/template.php | 22 ++++++++++++++++++++-- 4 files changed, 57 insertions(+), 2 deletions(-) diff --git a/core/templates/layout.admin.php b/core/templates/layout.admin.php index 1fcd4568f8c..8668aa64fda 100644 --- a/core/templates/layout.admin.php +++ b/core/templates/layout.admin.php @@ -13,6 +13,18 @@ + + $value){ + echo "$name='$value' "; + }; + echo '>'; + echo $header['text']; + echo ''; + ?> + + diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index ce99b00b9f6..5655a64d8da 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -13,6 +13,19 @@ + + + $value){ + echo "$name='$value' "; + }; + echo '>'; + echo $header['text']; + echo ''; + ?> + + diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index f21db202a83..2a9a817498d 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -13,6 +13,18 @@ + + $value){ + echo "$name='$value' "; + }; + echo '>'; + echo $header['text']; + echo ''; + ?> + + diff --git a/lib/template.php b/lib/template.php index 69065e1ea16..992fa2de76c 100644 --- a/lib/template.php +++ b/lib/template.php @@ -76,6 +76,7 @@ class OC_TEMPLATE{ private $vars; // Vars private $template; // The path to the template private $l10n; // The l10n-Object + private $headers=array(); //custom headers /** * @brief Constructor @@ -151,6 +152,16 @@ class OC_TEMPLATE{ $this->vars[$key] = array( $value ); } } + + /** + * @brief Add a custom element to the header + * @param string tag tag name of the element + * @param array $attributes array of attrobutes for the element + * @param string $text the text content for the element + */ + public function addHeader( $tag, $attributes, $text=''){ + $this->headers[]=array('tag'=>$tag,'attributes'=>$attributes,'text'=>$text); + } /** * @brief Prints the proceeded template @@ -195,7 +206,9 @@ class OC_TEMPLATE{ $search=new OC_TEMPLATE( 'core', 'part.searchbox'); $search->assign('searchurl',OC_HELPER::linkTo( 'search', 'index.php' )); $page->assign('searchbox', $search->fetchPage()); - // Add menu data + + // Add custom headers + $page->assign('headers',$this->headers); // Add navigation entry $page->assign( "navigation", OC_APP::getNavigation()); @@ -206,6 +219,10 @@ class OC_TEMPLATE{ $search=new OC_TEMPLATE( 'core', 'part.searchbox'); $search->assign('searchurl',OC_HELPER::linkTo( 'search', 'index.php' )); $page->assign('searchbox', $search->fetchPage()); + + // Add custom headers + $page->assign('headers',$this->headers); + // Add menu data if( OC_GROUP::inGroup( $_SESSION["user_id"], "admin" )){ $page->assign( "adminnavigation", OC_APP::getAdminNavigation()); @@ -215,7 +232,8 @@ class OC_TEMPLATE{ else { $page = new OC_TEMPLATE( "core", "layout.guest" ); - // Add data if required + // Add custom headers + $page->assign('headers',$this->headers); } // Add the css and js files -- cgit v1.2.3 From 7d2784c4c3145c8dcf15fb357f2325ae29d65717 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 24 Jun 2011 18:02:51 +0200 Subject: add openid headers to openid request page --- apps/user_openid/phpmyid.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php index 5b04684cd7d..69cd7111625 100644 --- a/apps/user_openid/phpmyid.php +++ b/apps/user_openid/phpmyid.php @@ -560,8 +560,10 @@ function logout_mode () { * @global array $profile */ function no_mode () { - global $USERNAME; + global $USERNAME, $profile; $tmpl = new OC_TEMPLATE( 'user_openid', 'nomode', 'guest' ); + $tmpl->addHeader('link',array('rel'=>'openid.server', 'href'=>$profile['req_url'])); + $tmpl->addHeader('link',array('rel'=>'openid.delegate', 'href'=>$profile['idp_url'])); $tmpl->assign('user',$USERNAME); $tmpl->printPage(); } -- cgit v1.2.3 From 2098cbd8222fe7657fec5538798426495a9b9888 Mon Sep 17 00:00:00 2001 From: Aamir Khan Date: Sat, 25 Jun 2011 01:14:28 +0530 Subject: redirect_url to be respected in linkTo function --- lib/helper.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) mode change 100644 => 100755 lib/helper.php diff --git a/lib/helper.php b/lib/helper.php old mode 100644 new mode 100755 index 8cd6ebf75a5..96d5bfad826 --- a/lib/helper.php +++ b/lib/helper.php @@ -29,11 +29,12 @@ class OC_HELPER { * @brief Creates an url * @param $app app * @param $file file + * @param $redirect_url redirect_url variable is appended to the URL * @returns the url * * Returns a url to the given app and file. */ - public static function linkTo( $app, $file ){ + public static function linkTo( $app, $file , $redirect_url=NULL ){ global $WEBROOT; global $SERVERROOT; @@ -41,20 +42,26 @@ class OC_HELPER { $app .= '/'; // Check if the app is in the app folder if( file_exists( $SERVERROOT . '/apps/'. $app.$file )){ - return $WEBROOT . '/apps/' . $app . $file; + $urlLinkTo = $WEBROOT . '/apps/' . $app . $file; } else{ - return $WEBROOT . '/' . $app . $file; + $urlLinkTo = $WEBROOT . '/' . $app . $file; } } else{ if( file_exists( $SERVERROOT . '/core/'. $file )){ - return $WEBROOT . '/core/'.$file; + $urlLinkTo = $WEBROOT . '/core/'.$file; } else{ - return $WEBROOT . '/'.$file; + $urlLinkTo = $WEBROOT . '/'.$file; } } + + if($redirect_url) + return $urlLinkTo.'?redirect_url='.$redirect_url; + else + return $urlLinkTo; + } /** -- cgit v1.2.3 From 155f62bcf6082264f402d634ebbef9fe78dda3a3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 24 Jun 2011 22:06:40 +0200 Subject: allow plugins/apps to add custom headers to all pages --- lib/base.php | 11 +++++++++++ lib/template.php | 16 +++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/lib/base.php b/lib/base.php index 0453e272a4b..6aac2d9855d 100644 --- a/lib/base.php +++ b/lib/base.php @@ -120,6 +120,7 @@ if(!$error and !$RUNTIME_NOAPPS ){ class OC_UTIL { public static $scripts=array(); public static $styles=array(); + public static $headers=array(); private static $fsSetup=false; // Can be set up @@ -231,6 +232,16 @@ class OC_UTIL { } } + /** + * @brief Add a custom element to the header + * @param string tag tag name of the element + * @param array $attributes array of attrobutes for the element + * @param string $text the text content for the element + */ + public static function addHeader( $tag, $attributes, $text=''){ + self::$headers[]=array('tag'=>$tag,'attributes'=>$attributes,'text'=>$text); + } + /** * formats a timestamp in the "right" way * diff --git a/lib/template.php b/lib/template.php index 992fa2de76c..9393fe6908e 100644 --- a/lib/template.php +++ b/lib/template.php @@ -206,9 +206,6 @@ class OC_TEMPLATE{ $search=new OC_TEMPLATE( 'core', 'part.searchbox'); $search->assign('searchurl',OC_HELPER::linkTo( 'search', 'index.php' )); $page->assign('searchbox', $search->fetchPage()); - - // Add custom headers - $page->assign('headers',$this->headers); // Add navigation entry $page->assign( "navigation", OC_APP::getNavigation()); @@ -220,9 +217,6 @@ class OC_TEMPLATE{ $search->assign('searchurl',OC_HELPER::linkTo( 'search', 'index.php' )); $page->assign('searchbox', $search->fetchPage()); - // Add custom headers - $page->assign('headers',$this->headers); - // Add menu data if( OC_GROUP::inGroup( $_SESSION["user_id"], "admin" )){ $page->assign( "adminnavigation", OC_APP::getAdminNavigation()); @@ -232,8 +226,6 @@ class OC_TEMPLATE{ else { $page = new OC_TEMPLATE( "core", "layout.guest" ); - // Add custom headers - $page->assign('headers',$this->headers); } // Add the css and js files @@ -259,7 +251,13 @@ class OC_TEMPLATE{ $page->append( "cssfiles", "$WEBROOT/core/$style.css" ); } } - + + // Add custom headers + $page->assign('headers',$this->headers); + foreach(OC_UTIL::$headers as $header){ + $page->append('headers',$header); + } + // Add css files and js files $page->assign( "content", $data ); return $page->fetchPage(); -- cgit v1.2.3 From 4ac25942dee332b3227501e50525101a5f85fc6b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 24 Jun 2011 22:07:26 +0200 Subject: you can now use your owncloud url as openid provider --- apps/user_openid/appinfo/app.php | 4 ++++ apps/user_openid/phpmyid.php | 50 +++++++++++++++++++++++++--------------- apps/user_openid/user.php | 11 ++++++++- 3 files changed, 45 insertions(+), 20 deletions(-) diff --git a/apps/user_openid/appinfo/app.php b/apps/user_openid/appinfo/app.php index 2e238ed3f27..d6eacfc0a3a 100644 --- a/apps/user_openid/appinfo/app.php +++ b/apps/user_openid/appinfo/app.php @@ -5,6 +5,10 @@ if (!in_array ('curl', get_loaded_extensions())){ return; } +$urlBase=((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST']; +OC_UTIL::addHeader('link',array('rel'=>'openid.server', 'href'=>$urlBase.OC_HELPER::linkTo( "user_openid", "user.php" ).'/')); +OC_UTIL::addHeader('link',array('rel'=>'openid.delegate', 'href'=>$urlBase.OC_HELPER::linkTo( "user_openid", "user.php" ).'/')); + require_once 'apps/user_openid/user_openid.php'; OC_APP::addSettingsPage( array( "id" => "user_openid_settings", 'order'=>1, "href" => OC_HELPER::linkTo( "user_openid", "settings.php" ), "name" => "OpenID")); diff --git a/apps/user_openid/phpmyid.php b/apps/user_openid/phpmyid.php index 69cd7111625..7991b87c6d8 100644 --- a/apps/user_openid/phpmyid.php +++ b/apps/user_openid/phpmyid.php @@ -198,16 +198,18 @@ function associate_mode () { function authorize_mode () { global $profile; global $USERNAME; + global $IDENTITY; // this is a user session // the user needs refresh urls in their session to access this mode if (! isset($_SESSION['post_auth_url']) || ! isset($_SESSION['cancel_auth_url'])) error_500('You may not access this mode directly.'); - + + $profile['idp_url']=$IDENTITY; if (isset($_SERVER['PHP_AUTH_USER']) && $profile['authorized'] === false && $_SERVER['PHP_AUTH_USER']==$USERNAME) { if (OC_USER::checkPassword($USERNAME, $_SERVER['PHP_AUTH_PW'])) {// successful login! - + error_log('success'); // return to the refresh url if they get in $_SESSION['openid_auth']=true; $_SESSION['openid_user']=$USERNAME; @@ -367,7 +369,7 @@ function checkid ( $wait ) { } // transfer the user to the url accept mode if they're paranoid - if ($wait == 1 && isset($profile['paranoid']) && $profile['paranoid'] === true && (! session_is_registered('accepted_url') || $_SESSION['accepted_url'] != $trust_root)) { + if ($wait == 1 && isset($profile['paranoid']) && $profile['paranoid'] === true && (! isset($_SESSION['accepted_url']) || $_SESSION['accepted_url'] != $trust_root)) { $_SESSION['cancel_accept_url'] = $cancel_url; $_SESSION['post_accept_url'] = $profile['req_url']; $_SESSION['unaccepted_url'] = $trust_root; @@ -381,11 +383,11 @@ function checkid ( $wait ) { } // make sure i am this identifier - if ($identity != $profile['idp_url']) { - debug("Invalid identity: $identity"); - debug("IdP URL: " . $profile['idp_url']); - error_get($return_to, "Invalid identity: '$identity'"); - } +// if ($identity != $profile['idp_url']) { +// debug("Invalid identity: $identity"); +// debug("IdP URL: " . $profile['idp_url']); +// error_get($return_to, "Invalid identity: '$identity'"); +// } // begin setting up return keys $keys = array( @@ -393,9 +395,9 @@ function checkid ( $wait ) { ); // if the user is not logged in, transfer to the authorization mode - if ($_SESSION['openid_auth'] === false || $USERNAME != $_SESSION['openid_user']) { + if ($USERNAME=='' || $_SESSION['openid_auth'] === false || $USERNAME != $_SESSION['openid_user']) { // users can only be logged in to one url at a time - $_SESSION['auth_username'] = null; + $_SESSION['openid_user'] = null; $_SESSION['auth_url'] = null; if ($wait) { @@ -562,6 +564,9 @@ function logout_mode () { function no_mode () { global $USERNAME, $profile; $tmpl = new OC_TEMPLATE( 'user_openid', 'nomode', 'guest' ); + if(substr($profile['req_url'],-1,1)!=='/'){//the identity should always end with a / + $profile['req_url'].='/'; + } $tmpl->addHeader('link',array('rel'=>'openid.server', 'href'=>$profile['req_url'])); $tmpl->addHeader('link',array('rel'=>'openid.delegate', 'href'=>$profile['idp_url'])); $tmpl->assign('user',$USERNAME); @@ -1267,11 +1272,11 @@ function secret ( $handle ) { session_start(); debug('Started session to acquire key: ' . session_id()); - $secret = session_is_registered('shared_secret') + $secret = isset($_SESSION['shared_secret']) ? base64_decode($_SESSION['shared_secret']) : false; - $expiration = session_is_registered('expiration') + $expiration = isset($_SESSION['expiration']) ? $_SESSION['expiration'] : null; @@ -1632,22 +1637,29 @@ $GLOBALS['proto'] = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'h // Set the authorization state - DO NOT OVERRIDE $profile['authorized'] = false; +global $IDENTITY; +global $USERNAME; + // Set a default IDP URL if (! array_key_exists('idp_url', $profile)) - $profile['idp_url'] = sprintf("%s://%s%s%s", - $proto, - $_SERVER['SERVER_NAME'], - $port, - $_SERVER['PHP_SELF']); + $profile['idp_url'] = $IDENTITY; -// Determine the requested URL - DO NOT OVERRIDE +//Determine the requested URL - DO NOT OVERRIDE $profile['req_url'] = sprintf("%s://%s%s", $proto, $_SERVER['HTTP_HOST'], // $port,//host already includes the path $_SERVER["REQUEST_URI"]); -error_log($profile['req_url']); +$fullId=urlencode('.php/'.$USERNAME); +$incompleteId=urlencode('.php/'); + +if(!strpos($profile['req_url'],$fullId)){ + $profile['req_url']=str_replace($incompleteId,$fullId,$profile['req_url']); +} + +error_log('inc id: '.$fullId); +error_log('req url: '.$profile['req_url']); // Set the default allowance for testing if (! array_key_exists('allow_test', $profile)) diff --git a/apps/user_openid/user.php b/apps/user_openid/user.php index 2199e5f9e58..52af9ba3a56 100644 --- a/apps/user_openid/user.php +++ b/apps/user_openid/user.php @@ -22,15 +22,24 @@ */ $USERNAME=substr($_SERVER["REQUEST_URI"],strpos($_SERVER["REQUEST_URI"],'.php/')+5); -if(strpos($USERNAME,'?')){ +if(strpos($USERNAME,'?')!==false){ $USERNAME=substr($USERNAME,0,strpos($USERNAME,'?')); } + +if($USERNAME=='' and isset($_SERVER['PHP_AUTH_USER'])){ + $USERNAME=$_SERVER['PHP_AUTH_USER']; +} + +$RUNTIME_NOAPPS=true; +$RUNTIME_NOAPPS=false; require_once '../../lib/base.php'; if(!OC_USER::userExists($USERNAME)){ $USERNAME=''; } +global $WEBROOT; +$IDENTITY=((isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$WEBROOT.'/apps/user_openid/user.php/'.$USERNAME; require_once 'phpmyid.php'; -- cgit v1.2.3 From f40a1cad8b55bafa08d7e96415d4d2f9c7059a38 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 26 Jun 2011 00:59:09 +0200 Subject: not all http server add index.php to $_SERVER[SCRIPT_NAME], do it manually this fixes incorect generated links in some cases --- lib/base.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index 6aac2d9855d..c5a0403e3b9 100644 --- a/lib/base.php +++ b/lib/base.php @@ -35,7 +35,11 @@ $SERVERROOT=substr(__FILE__,0,-13); $DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']); $SERVERROOT=str_replace("\\",'/',$SERVERROOT); $SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT)); -$WEBROOT=substr($_SERVER["SCRIPT_NAME"],0,strlen($_SERVER["SCRIPT_NAME"])-strlen($SUBURI)); +$scriptName=$_SERVER["SCRIPT_NAME"]; +if(substr($scriptName,-1)=='/'){//if the script isn't a file assume index.php + $scriptName.='index.php'; +} +$WEBROOT=substr($scriptName,0,strlen($scriptName)-strlen($SUBURI)); -- cgit v1.2.3 From f2845bbea877e6ddaba897879b0625c0535b5fe1 Mon Sep 17 00:00:00 2001 From: Kunal Ghosh Date: Sat, 2 Jul 2011 07:17:05 +0530 Subject: Fix to make the Unlock mechanism of WebDAV work. Previously when using unlock in cadaver etc was used the lock entry corresponding to the file was not deleted in the sqlite database table oc_locks. The error was because the delete query in the Unlock function was not getting executed :) --- lib/HTTP/WebDAV/Server/Filesystem.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/HTTP/WebDAV/Server/Filesystem.php b/lib/HTTP/WebDAV/Server/Filesystem.php index 164892c9d86..5f261643624 100644 --- a/lib/HTTP/WebDAV/Server/Filesystem.php +++ b/lib/HTTP/WebDAV/Server/Filesystem.php @@ -687,9 +687,14 @@ VALUES (?,?,?,?,?,'timeout',?,?)"); function UNLOCK(&$options) { $query = OC_DB::prepare("DELETE FROM *PREFIX*locks + WHERE path = '$options[path]' + AND token = '$options[token]'"); + /* + $query = OC_DB::prepare("DELETE FROM *PREFIX*locks WHERE path = ? AND token = ?"); - $query->execute(array($options[path]),$options[token]); + */ + $query->execute();#array($options[path]),$options[token]); return PEAR::isError($result) ? "409 Conflict" : "204 No Content"; } -- cgit v1.2.3 From 1daeb13dd9ac4367eadb1265e07e17fced74413d Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Sun, 3 Jul 2011 01:52:17 +0200 Subject: Usability improvements: -Added javascript to enable/disable radiobuttons -Added labels --- files/templates/admin.php | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/files/templates/admin.php b/files/templates/admin.php index 74b99b771c0..4dde9c510c4 100644 --- a/files/templates/admin.php +++ b/files/templates/admin.php @@ -1,16 +1,26 @@ -
        + + - t( 'Maximum upload size' ); ?> '/>
        + '/>
        - t( 'Allow public folders' ); ?>
        +
        - t( '(if public is enabled)' ); ?>
        - t( 'separated from webdav storage' ); ?>
        - t( 'let the user decide' ); ?>
        - t( 'folder "/public" in webdav storage' ); ?>
        - t( '(endif)' ); ?>
        +
        +
        +
        + +
        - t( 'Allow downloading shared files' ); ?>
        - t( 'Allow uploading in shared directory' ); ?>
        +
        +
        -- cgit v1.2.3 From f893f1461537dabe4a044de12f124739c349ae0f Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Mon, 4 Jul 2011 00:16:49 +0200 Subject: Improved the dutch l10n files --- l10n/nl/admin.po | 14 +++++++------- l10n/nl/core.po | 21 ++++++++++----------- l10n/nl/log.po | 4 ++-- l10n/nl/settings.po | 8 ++++---- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/l10n/nl/admin.po b/l10n/nl/admin.po index 2feccb46b97..275fd66860d 100644 --- a/l10n/nl/admin.po +++ b/l10n/nl/admin.po @@ -23,15 +23,15 @@ msgstr "Meer informatie" #: ../templates/app.php:24 msgid "INSTALL" -msgstr "Instaleer" +msgstr "Installeer" #: ../templates/app_noconn.php:6 ../templates/apps.php:6 msgid "Apps Repository" -msgstr "Applicatie Database" +msgstr "Applicatiedatabase" #: ../templates/app_noconn.php:7 msgid "Cannot connect to apps repository" -msgstr "Kan geen verbinding maken met de applicatie database" +msgstr "Kan geen verbinding maken met de applicatiedatabase" #: ../templates/apps.php:13 ../templates/users.php:6 ../templates/users.php:20 #: ../templates/users.php:50 @@ -48,7 +48,7 @@ msgstr "Administratie" #: ../templates/system.php:7 msgid "System Settings" -msgstr "Systeem Instellingen" +msgstr "Systeeminstellingen" #: ../templates/users.php:7 ../templates/users.php:46 msgid "Groups" @@ -56,7 +56,7 @@ msgstr "Groepen" #: ../templates/users.php:13 msgid "Add user" -msgstr "Voeg gebruiker toe" +msgstr "Gebruiker toevoegen" #: ../templates/users.php:21 msgid "Password" @@ -64,7 +64,7 @@ msgstr "Wachtwoord" #: ../templates/users.php:30 msgid "Create user" -msgstr "Maak gebruiker aan" +msgstr "Gebruiker aanmaken" #: ../templates/users.php:40 ../templates/users.php:68 msgid "remove" @@ -72,7 +72,7 @@ msgstr "verwijder" #: ../templates/users.php:58 msgid "Create group" -msgstr "Maak groep aan" +msgstr "Groep aanmaken" #: ../templates/users.php:94 msgid "Force new password:" diff --git a/l10n/nl/core.po b/l10n/nl/core.po index 9aa3851d86f..211d93503dd 100644 --- a/l10n/nl/core.po +++ b/l10n/nl/core.po @@ -27,11 +27,11 @@ msgstr "Welkom by ownCloud, jouw persoonlijke cloud" #: ../templates/installation.php:7 msgid "To finish the installation, please follow the steps below." -msgstr "Volg de volgende stappen om de instalatie af te ronden." +msgstr "Volg de volgende stappen om de installatie te voltooien." #: ../templates/installation.php:26 msgid "Create an admin account." -msgstr "Maak een administrator account. aan" +msgstr "Maak een administrator account aan" #: ../templates/installation.php:27 msgid "Login:" @@ -51,16 +51,15 @@ msgstr "Bepaal waar de gegevens opgeslagen moeten woorden." #: ../templates/installation.php:35 msgid "Data directory:" -msgstr "Gegevens map:" +msgstr "Gegevensmap:" #: ../templates/installation.php:39 msgid "Configure your database." -msgstr "Stel de database in." +msgstr "Stel je database in." #: ../templates/installation.php:43 msgid "I will use a SQLite database. You have nothing to do!" -msgstr "" -"Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." +msgstr "Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." #: ../templates/installation.php:46 msgid "SQLite" @@ -76,15 +75,15 @@ msgstr "Host:" #: ../templates/installation.php:60 msgid "Database name:" -msgstr "Database naam:" +msgstr "Databasenaam:" #: ../templates/installation.php:61 msgid "Table prefix:" -msgstr "Voorvoegsel voor tabelnaamen:" +msgstr "Voorvoegsel voor tabelnamen:" #: ../templates/installation.php:62 msgid "MySQL user login:" -msgstr "MySQL gebruikers naam." +msgstr "MySQL gebruikersnaam." #: ../templates/installation.php:63 msgid "MySQL user password:" @@ -92,7 +91,7 @@ msgstr "MySQL wachtwoord" #: ../templates/installation.php:68 msgid "Finish setup" -msgstr "Instalatie afronden" +msgstr "Installatie afronden" #: ../templates/layout.guest.php:20 msgid "" @@ -108,7 +107,7 @@ msgstr "Aanmelden mislukt." #: ../templates/logout.php:1 msgid "You are logged out." -msgstr "Je bent afgemend." +msgstr "Je bent afgemeld." #: ../templates/part.pagenavi.php:6 msgid "prev" diff --git a/l10n/nl/log.po b/l10n/nl/log.po index a071faeccfc..3bf2f43a920 100644 --- a/l10n/nl/log.po +++ b/l10n/nl/log.po @@ -59,9 +59,9 @@ msgstr "Wat" #: ../templates/index.php:27 msgid "When" -msgstr "Waneer" +msgstr "Wanneer" #: ../templates/index.php:45 msgid "Clear log entries before" -msgstr "Verwijder logboek element ouder dan" +msgstr "Verwijder logboekitem ouder dan" diff --git a/l10n/nl/settings.po b/l10n/nl/settings.po index 11c325d5fcb..088b2ef16e7 100644 --- a/l10n/nl/settings.po +++ b/l10n/nl/settings.po @@ -19,7 +19,7 @@ msgstr "" #: ../templates/index.php:3 msgid "Account information" -msgstr "Gebruiks gegevens" +msgstr "Gebruikersgegevens" #: ../templates/index.php:5 msgid "You're currently using" @@ -59,7 +59,7 @@ msgstr "Taal" #: ../ajax/changepassword.php:13 ../ajax/setlanguage.php:13 msgid "Authentication error" -msgstr "Authenticatie fout." +msgstr "Authenticatiefout." #: ../ajax/changepassword.php:19 msgid "You have to enter the old and the new password!" @@ -75,7 +75,7 @@ msgstr "Wachtwoord aangepast" #: ../ajax/changepassword.php:34 msgid "Unable to change password" -msgstr "Wachtwoord aanpassen is niet mogenlijk" +msgstr "Wachtwoord aanpassen is niet mogelijk" #: ../ajax/setlanguage.php:21 msgid "Language changed" @@ -83,4 +83,4 @@ msgstr "Taal aangepast" #: ../ajax/setlanguage.php:23 msgid "Invalid request" -msgstr "Ongeldige aanvraag" +msgstr "Ongeldig verzoek" -- cgit v1.2.3 From f989871501fd9b365aee843ec75b88acc3f8bd15 Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Mon, 4 Jul 2011 00:39:04 +0200 Subject: More nl l10n improvements --- admin/l10n/nl.php | 18 +++++++++--------- core/l10n/nl.php | 28 ++++++++++++++-------------- l10n/nl/admin.po | 4 ++-- l10n/nl/core.po | 16 ++++++++-------- l10n/nl/settings.po | 6 +++--- log/l10n/nl.php | 4 ++-- settings/l10n/nl.php | 14 +++++++------- 7 files changed, 45 insertions(+), 45 deletions(-) diff --git a/admin/l10n/nl.php b/admin/l10n/nl.php index a762559e08d..cfbc1b0f515 100644 --- a/admin/l10n/nl.php +++ b/admin/l10n/nl.php @@ -1,20 +1,20 @@ "Meer informatie", -"INSTALL" => "Instaleer", -"Apps Repository" => "Applicatie Database", -"Cannot connect to apps repository" => "Kan geen verbinding maken met de applicatie database", +"INSTALL" => "Installeer", +"Apps Repository" => "Applicatiedatabase", +"Cannot connect to apps repository" => "Kan geen verbinding maken met de applicatiedatabase", "Name" => "Naam", "Modified" => "Laatst aangepast", "Administration" => "Administratie", -"System Settings" => "Systeem Instellingen", +"System Settings" => "Systeeminstellingen", "Groups" => "Groepen", -"Add user" => "Voeg gebruiker toe", +"Add user" => "Gebruiker toevoegen", "Password" => "Wachtwoord", -"Create user" => "Maak gebruiker aan", +"Create user" => "Gebruiker aanmaken", "remove" => "verwijder", -"Create group" => "Maak groep aan", +"Create group" => "Groep aanmaken", "Force new password:" => "Forceer nieuw wachtwoord:", "Set" => "Ok", -"Do you really want to delete user" => "Weet je zeker dat je deze gebruiker wil verwijderen", -"Do you really want to delete group" => "Weet je zeker dat je deze groep wil verwijderen" +"Do you really want to delete user" => "Wilt u deze gebruiker verwijderen", +"Do you really want to delete group" => "Wilt u deze groep verwijderen" ); diff --git a/core/l10n/nl.php b/core/l10n/nl.php index bbffcd0831a..66d96505971 100644 --- a/core/l10n/nl.php +++ b/core/l10n/nl.php @@ -1,26 +1,26 @@ "Fout 404, Cloud niet gevonden.", -"Welcome to ownCloud, your personnal cloud." => "Welkom by ownCloud, jouw persoonlijke cloud", -"To finish the installation, please follow the steps below." => "Volg de volgende stappen om de instalatie af te ronden.", -"Create an admin account." => "Maak een administrator account. aan", +"Welcome to ownCloud, your personnal cloud." => "Welkom by ownCloud, uw persoonlijke cloud", +"To finish the installation, please follow the steps below." => "Volg de volgende stappen om de installatie te voltooien.", +"Create an admin account." => "Maak een beheerdersaccount aan", "Login:" => "Gebruikersnaam:", "Password:" => "Wachtwoord:", "Advanced" => "Geavanceerd", -"Set where to store the data." => "Bepaal waar de gegevens opgeslagen moeten woorden.", -"Data directory:" => "Gegevens map:", -"Configure your database." => "Stel de database in.", -"I will use a SQLite database. You have nothing to do!" => "Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen.", +"Set where to store the data." => "Bepaal de opslaglocatie.", +"Data directory:" => "Gegevensmap:", +"Configure your database." => "Configureer uw database.", +"I will use a SQLite database. You have nothing to do!" => "Er zal een SQLite database gebruikt worden. U hoeft geen verdere instellingen te maken.", "SQLite" => "SQLite", -"I will use a MySQL database." => "Er zal een MySQL database gebruikt woorden.", +"I will use a MySQL database." => "Er zal een MySQL database gebruikt worden.", "Host:" => "Host:", -"Database name:" => "Database naam:", -"Table prefix:" => "Voorvoegsel voor tabelnaamen:", -"MySQL user login:" => "MySQL gebruikers naam.", +"Database name:" => "Databasenaam:", +"Table prefix:" => "Voorvoegsel voor tabelnamen:", +"MySQL user login:" => "MySQL gebruikersnaam.", "MySQL user password:" => "MySQL wachtwoord", -"Finish setup" => "Instalatie afronden", -"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud is een persoonlijke cloud die op je eigen server draait.

        ", +"Finish setup" => "Installatie afronden", +"ownCloud is a personal cloud which runs on your own server.

        " => "ownCloud is een persoonlijke cloud die op uw eigen server draait.

        ", "Login failed!" => "Aanmelden mislukt.", -"You are logged out." => "Je bent afgemend.", +"You are logged out." => "U bent afgemeld.", "prev" => "vorige", "next" => "volgende", "Search" => "Zoeken" diff --git a/l10n/nl/admin.po b/l10n/nl/admin.po index 275fd66860d..506d5906b8a 100644 --- a/l10n/nl/admin.po +++ b/l10n/nl/admin.po @@ -84,9 +84,9 @@ msgstr "Ok" #: ../templates/users.php:102 msgid "Do you really want to delete user" -msgstr "Weet je zeker dat je deze gebruiker wil verwijderen" +msgstr "Wilt u deze gebruiker verwijderen" #: ../templates/users.php:109 msgid "Do you really want to delete group" -msgstr "Weet je zeker dat je deze groep wil verwijderen" +msgstr "Wilt u deze groep verwijderen" diff --git a/l10n/nl/core.po b/l10n/nl/core.po index 211d93503dd..3923dcb413d 100644 --- a/l10n/nl/core.po +++ b/l10n/nl/core.po @@ -23,7 +23,7 @@ msgstr "Fout 404, Cloud niet gevonden." #: ../templates/installation.php:6 msgid "Welcome to ownCloud, your personnal cloud." -msgstr "Welkom by ownCloud, jouw persoonlijke cloud" +msgstr "Welkom by ownCloud, uw persoonlijke cloud" #: ../templates/installation.php:7 msgid "To finish the installation, please follow the steps below." @@ -31,7 +31,7 @@ msgstr "Volg de volgende stappen om de installatie te voltooien." #: ../templates/installation.php:26 msgid "Create an admin account." -msgstr "Maak een administrator account aan" +msgstr "Maak een beheerdersaccount aan" #: ../templates/installation.php:27 msgid "Login:" @@ -47,7 +47,7 @@ msgstr "Geavanceerd" #: ../templates/installation.php:34 msgid "Set where to store the data." -msgstr "Bepaal waar de gegevens opgeslagen moeten woorden." +msgstr "Bepaal de opslaglocatie." #: ../templates/installation.php:35 msgid "Data directory:" @@ -55,11 +55,11 @@ msgstr "Gegevensmap:" #: ../templates/installation.php:39 msgid "Configure your database." -msgstr "Stel je database in." +msgstr "Configureer uw database." #: ../templates/installation.php:43 msgid "I will use a SQLite database. You have nothing to do!" -msgstr "Er zan een SQLite database gebruikt woorden, je hoeft niks in te stellen." +msgstr "Er zal een SQLite database gebruikt worden. U hoeft geen verdere instellingen te maken." #: ../templates/installation.php:46 msgid "SQLite" @@ -67,7 +67,7 @@ msgstr "SQLite" #: ../templates/installation.php:53 msgid "I will use a MySQL database." -msgstr "Er zal een MySQL database gebruikt woorden." +msgstr "Er zal een MySQL database gebruikt worden." #: ../templates/installation.php:59 msgid "Host:" @@ -99,7 +99,7 @@ msgid "" "on your own server.

        " msgstr "" "ownCloud is een persoonlijke cloud die " -"op je eigen server draait.

        " +"op uw eigen server draait.

        " #: ../templates/login.php:6 msgid "Login failed!" @@ -107,7 +107,7 @@ msgstr "Aanmelden mislukt." #: ../templates/logout.php:1 msgid "You are logged out." -msgstr "Je bent afgemeld." +msgstr "U bent afgemeld." #: ../templates/part.pagenavi.php:6 msgid "prev" diff --git a/l10n/nl/settings.po b/l10n/nl/settings.po index 088b2ef16e7..866e8b702cd 100644 --- a/l10n/nl/settings.po +++ b/l10n/nl/settings.po @@ -23,7 +23,7 @@ msgstr "Gebruikersgegevens" #: ../templates/index.php:5 msgid "You're currently using" -msgstr "Je gebruikt momenteel" +msgstr "U gebruikt momenteel" #: ../templates/index.php:5 msgid "of your" @@ -39,7 +39,7 @@ msgstr "Wachtwoord aanpassen" #: ../templates/index.php:12 msgid "Your password got changed" -msgstr "Je wachtwoord is aangepast" +msgstr "Uw wachtwoord is aangepast" #: ../templates/index.php:15 msgid "Old password:" @@ -63,7 +63,7 @@ msgstr "Authenticatiefout." #: ../ajax/changepassword.php:19 msgid "You have to enter the old and the new password!" -msgstr "Je moet het oude en nieuwe wachtwoord invullen." +msgstr "U moet het oude en nieuwe wachtwoord invullen." #: ../ajax/changepassword.php:25 msgid "Your old password is wrong!" diff --git a/log/l10n/nl.php b/log/l10n/nl.php index 59e9fa04d2a..f381619b5fd 100644 --- a/log/l10n/nl.php +++ b/log/l10n/nl.php @@ -9,6 +9,6 @@ "Show:" => "Laat", "entries per page." => "resulaten per pagina zien", "What" => "Wat", -"When" => "Waneer", -"Clear log entries before" => "Verwijder logboek element ouder dan" +"When" => "Wanneer", +"Clear log entries before" => "Verwijder logboekitem ouder dan" ); diff --git a/settings/l10n/nl.php b/settings/l10n/nl.php index f05e7cc7c26..3c2f3dbd271 100644 --- a/settings/l10n/nl.php +++ b/settings/l10n/nl.php @@ -1,19 +1,19 @@ "Gebruiks gegevens", -"You're currently using" => "Je gebruikt momenteel", +"Account information" => "Gebruikersgegevens", +"You're currently using" => "U gebruikt momenteel", "of your" => "van de", "space" => "beschikbare ruimte.", "Change Password" => "Wachtwoord aanpassen", -"Your password got changed" => "Je wachtwoord is aangepast", +"Your password got changed" => "Uw wachtwoord is aangepast", "Old password:" => "Oud wachtwoord:", "New password" => "Nieuw wachtwoord", "Show new password" => "Toon nieuw wachtwoord", "Language" => "Taal", -"Authentication error" => "Authenticatie fout.", -"You have to enter the old and the new password!" => "Je moet het oude en nieuwe wachtwoord invullen.", +"Authentication error" => "Authenticatiefout.", +"You have to enter the old and the new password!" => "U moet het oude en nieuwe wachtwoord invullen.", "Your old password is wrong!" => "Het oude wachtwoord is verkeerd.", "Password changed" => "Wachtwoord aangepast", -"Unable to change password" => "Wachtwoord aanpassen is niet mogenlijk", +"Unable to change password" => "Wachtwoord aanpassen is niet mogelijk", "Language changed" => "Taal aangepast", -"Invalid request" => "Ongeldige aanvraag" +"Invalid request" => "Ongeldig verzoek" ); -- cgit v1.2.3 From 7f0dc638ae5bb651baa171825921055d95cb1c63 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Mon, 4 Jul 2011 19:04:15 +0200 Subject: Hopefully fix errors if ldap plugin is not configured --- apps/user_ldap/user_ldap.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 1ee9809b3bb..d6ed8c741e7 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -26,6 +26,7 @@ require_once('User/backend.php'); class OC_USER_LDAP extends OC_USER_BACKEND { protected $ds; + protected $configured = false; // cached settings protected $ldap_host; @@ -42,6 +43,17 @@ class OC_USER_LDAP extends OC_USER_BACKEND { $this->ldap_password = OC_APPCONFIG::getValue('user_ldap', 'ldap_password',''); $this->ldap_base = OC_APPCONFIG::getValue('user_ldap', 'ldap_base',''); $this->ldap_filter = OC_APPCONFIG::getValue('user_ldap', 'ldap_filter',''); + + if( !empty($this->ldap_host) + && !empty($this->ldap_port) + && !empty($this->ldap_dn) + && !empty($this->ldap_password) + && !empty($this->ldap_base) + && !empty($this->ldap_filter) + ) + { + $this->configured = true; + } } function __destruct() { @@ -66,6 +78,9 @@ class OC_USER_LDAP extends OC_USER_BACKEND { } private function getDn( $uid ) { + if(!$this->configured) + return false; + // connect to server $ds = $this->getDs(); if( !$ds ) @@ -90,7 +105,7 @@ class OC_USER_LDAP extends OC_USER_BACKEND { } public function userExists( $uid ) { - $dn = getDn($uid); + $dn = $this->getDn($uid); return !empty($dn); } -- cgit v1.2.3 From 53ae56097de2098a2ffd1a8dd1076825bc93305d Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Mon, 4 Jul 2011 21:46:20 +0200 Subject: applied Ryan's patch for Bug 276007 - Folder list does not get updated when creating the first folder. --- files/js/filelist.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/files/js/filelist.js b/files/js/filelist.js index 14cce8a3897..089a34581de 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -49,6 +49,10 @@ FileList={ } } } - $(fileElements[pos]).after(element); + if(fileElements.length){ + $(fileElements[pos]).after(element); + }else{ + $('#fileList').append(element); + } } -} \ No newline at end of file +} -- cgit v1.2.3