From c248bda1dcbef2068071904057b8410aa1eb0200 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 16 May 2015 17:40:33 +0200 Subject: fix missing language code parameter for admin plugin titles add unit test coverage --- _test/tests/inc/template_include_page.test.php | 77 +++++++++++++++++--------- inc/template.php | 4 +- 2 files changed, 54 insertions(+), 27 deletions(-) diff --git a/_test/tests/inc/template_include_page.test.php b/_test/tests/inc/template_include_page.test.php index 47d4d46f1..580221979 100644 --- a/_test/tests/inc/template_include_page.test.php +++ b/_test/tests/inc/template_include_page.test.php @@ -1,40 +1,67 @@ assertEquals('', $sidebar); + function test_localID() { + global $ID,$ACT; + + + $id = 'foo:bar'; + + $ACT = 'show'; + $this->assertEquals('foo:bar', tpl_pagetitle($id, true)); } - function testExistingSidebars() { - global $ID; + function test_globalID() { + global $ID,$ACT; + - saveWikiText('sidebar', 'topsidebar-test', ''); + $ID = 'foo:bar'; - $ID = 'foo:bar:baz:test'; - $sidebar = tpl_include_page('sidebar', false, true); - $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + $ACT = 'show'; + $this->assertEquals('foo:bar', tpl_pagetitle(null, true)); + } + + function test_adminTitle() { + global $ID,$ACT; - $ID = 'foo'; - $sidebar = tpl_include_page('sidebar', false, true); - $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + $ID = 'foo:bar'; + + $ACT = 'admin'; + $this->assertEquals('Admin', tpl_pagetitle(null, true)); + } - saveWikiText('foo:bar:sidebar', 'bottomsidebar-test', ''); + function test_adminPluginTitle() { + global $ID,$ACT,$INPUT,$conf; - $ID = 'foo:bar:baz:test'; - $sidebar = tpl_include_page('sidebar', false, true); - $this->assertTrue(strpos($sidebar, 'bottomsidebar-test') > 0); + if (!plugin_load('admin','config')) { + $this->markTestSkipped('Plugin Config not found, unable to test admin plugin titles'); + return; + } - $ID = 'foo:bar:test'; - $sidebar = tpl_include_page('sidebar', false, true); - $this->assertTrue(strpos($sidebar, 'bottomsidebar-test') > 0); + $ID = 'foo:bar'; + $ACT = 'admin'; + $conf['lang'] = 'en'; + $INPUT->set('page','config'); - $ID = 'foo'; - $sidebar = tpl_include_page('sidebar', false, true); - $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + $this->assertEquals('Configuration Settings', tpl_pagetitle(null, true)); } + function test_nonPageFunctionTitle() { + global $ID,$ACT; + + $ID = 'foo:bar'; + + $ACT = 'index'; + $this->assertEquals('Sitemap', tpl_pagetitle(null, true)); + } + + function test_pageFunctionTitle() { + global $ID,$ACT; + + $ID = 'foo:bar'; + + $ACT = 'revisions'; + $this->assertEquals('foo:bar - Old revisions', tpl_pagetitle(null, true)); + } } diff --git a/inc/template.php b/inc/template.php index fd8bff11a..39d06e895 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1035,7 +1035,7 @@ function tpl_pageinfo($ret = false) { * @return bool|string */ function tpl_pagetitle($id = null, $ret = false) { - global $ACT, $INPUT, $lang; + global $ACT, $INPUT, $conf, $lang; if(is_null($id)) { global $ID; @@ -1061,7 +1061,7 @@ function tpl_pagetitle($id = null, $ret = false) { // attempt to load the plugin if (($plugin = plugin_load('admin',$page)) !== null){ - $plugin_title = $plugin->getMenuText(); + $plugin_title = $plugin->getMenuText($conf['lang']); $page_title = $plugin_title ? $plugin_title : $page; } } -- cgit v1.2.3 From a61966c55d9d0ac4b800d65cfc6ee1aea44899b5 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 16 May 2015 19:07:23 +0200 Subject: Provide a function to return admin plugin for the page request. This was previously carried out in three separate places. Refactor that code to use the new function. Update tpl_pageTitle test to use a manager level admin plugin. --- _test/tests/inc/template_include_page.test.php | 8 +++---- inc/actions.php | 17 +++----------- inc/pluginutils.php | 31 ++++++++++++++++++++++++++ inc/template.php | 30 ++++++------------------- 4 files changed, 45 insertions(+), 41 deletions(-) diff --git a/_test/tests/inc/template_include_page.test.php b/_test/tests/inc/template_include_page.test.php index 580221979..7dd13ba23 100644 --- a/_test/tests/inc/template_include_page.test.php +++ b/_test/tests/inc/template_include_page.test.php @@ -34,17 +34,17 @@ class template_pagetitle_test extends DokuWikiTest { function test_adminPluginTitle() { global $ID,$ACT,$INPUT,$conf; - if (!plugin_load('admin','config')) { - $this->markTestSkipped('Plugin Config not found, unable to test admin plugin titles'); + if (!plugin_load('admin','revert')) { + $this->markTestSkipped('Revert plugin not found, unable to test admin plugin titles'); return; } $ID = 'foo:bar'; $ACT = 'admin'; $conf['lang'] = 'en'; - $INPUT->set('page','config'); + $INPUT->set('page','revert'); - $this->assertEquals('Configuration Settings', tpl_pagetitle(null, true)); + $this->assertEquals('Revert Manager', tpl_pagetitle(null, true)); } function test_nonPageFunctionTitle() { diff --git a/inc/actions.php b/inc/actions.php index 709c19ddd..b0753b22e 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -162,20 +162,9 @@ function act_dispatch(){ if($ACT == 'admin'){ // retrieve admin plugin name from $_REQUEST['page'] if (($page = $INPUT->str('page', '', true)) != '') { - $pluginlist = plugin_list('admin'); - if (in_array($page, $pluginlist)) { - // attempt to load the plugin - - if (($plugin = plugin_load('admin',$page)) !== null){ - /** @var DokuWiki_Admin_Plugin $plugin */ - if($plugin->forAdminOnly() && !$INFO['isadmin']){ - // a manager tried to load a plugin that's for admins only - $INPUT->remove('page'); - msg('For admins only',-1); - }else{ - $plugin->handle(); - } - } + /** @var $plugin DokuWiki_Admin_Plugin */ + if ($plugin = plugin_getRequestAdminPlugin()){ + $plugin->handle(); } } } diff --git a/inc/pluginutils.php b/inc/pluginutils.php index 4d591869d..60f79869f 100644 --- a/inc/pluginutils.php +++ b/inc/pluginutils.php @@ -103,3 +103,34 @@ function plugin_getcascade() { global $plugin_controller; return $plugin_controller->getCascade(); } + + +/** + * Return the currently operating admin plugin or null + * if not on an admin plugin page + * + * @return Doku_Plugin_Admin + */ +function plugin_getRequestAdminPlugin(){ + static $admin_plugin = false; + global $ACT,$INPUT,$INFO; + + if ($admin_plugin === false) { + if (($ACT == 'admin') && ($page = $INPUT->str('page', '', true)) != '') { + $pluginlist = plugin_list('admin'); + if (in_array($page, $pluginlist)) { + // attempt to load the plugin + /** @var $admin_plugin DokuWiki_Admin_Plugin */ + $admin_plugin = plugin_load('admin', $page); + // verify + if ($admin_plugin && $admin_plugin->forAdminOnly() && !$INFO['isadmin']) { + $admin_plugin = null; + $INPUT->remove('page'); + msg('For admins only',-1); + } + } + } + } + + return $admin_plugin; +} diff --git a/inc/template.php b/inc/template.php index 39d06e895..95dc52deb 100644 --- a/inc/template.php +++ b/inc/template.php @@ -218,18 +218,9 @@ function tpl_toc($return = false) { $toc = array(); } } elseif($ACT == 'admin') { - // try to load admin plugin TOC FIXME: duplicates code from tpl_admin - $plugin = null; - $class = $INPUT->str('page'); - if(!empty($class)) { - $pluginlist = plugin_list('admin'); - if(in_array($class, $pluginlist)) { - // attempt to load the plugin - /** @var $plugin DokuWiki_Admin_Plugin */ - $plugin = plugin_load('admin', $class); - } - } - if( ($plugin !== null) && (!$plugin->forAdminOnly() || $INFO['isadmin']) ) { + // try to load admin plugin TOC + /** @var $plugin DokuWiki_Admin_Plugin */ + if ($plugin = plugin_getRequestAdminPlugin()) { $toc = $plugin->getTOC(); $TOC = $toc; // avoid later rebuild } @@ -1054,17 +1045,10 @@ function tpl_pagetitle($id = null, $ret = false) { case 'admin' : $page_title = $lang['btn_admin']; // try to get the plugin name - // retrieve admin plugin name from $_REQUEST['page'] - if (($page = $INPUT->str('page', '', true)) != '') { - $pluginlist = plugin_list('admin'); - if (in_array($page, $pluginlist)) { - // attempt to load the plugin - - if (($plugin = plugin_load('admin',$page)) !== null){ - $plugin_title = $plugin->getMenuText($conf['lang']); - $page_title = $plugin_title ? $plugin_title : $page; - } - } + /** @var $plugin DokuWiki_Admin_Plugin */ + if ($plugin = plugin_getRequestAdminPlugin()){ + $plugin_title = $plugin->getMenuText($conf['lang']); + $page_title = $plugin_title ? $plugin_title : $plugin->getPluginName(); } break; -- cgit v1.2.3 From 1f3b9c4577b0d0fa91c26b01caab84ab3f20e1e4 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 16 May 2015 19:25:26 +0200 Subject: php7 compatibility: change revert plugin constructor to __construct --- lib/plugins/revert/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index 88d8cd93d..b61615d00 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -16,7 +16,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { /** * Constructor */ - function admin_plugin_revert(){ + function __construct(){ $this->setupLocale(); } -- cgit v1.2.3 From 45ae4bb83834a513e709b960747f964dba90392b Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 17 May 2015 12:56:51 +0200 Subject: Add filtering to remove blank entries from key/value config retrieval This applies to: - acronyms - entities - interwiki - mime - smileys --- inc/confutils.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/inc/confutils.php b/inc/confutils.php index 8643a056c..3e69b20be 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -49,6 +49,7 @@ function getMimeTypes() { static $mime = null; if ( !$mime ) { $mime = retrieveConfig('mime','confToHash'); + $mime = array_filter($mime); } return $mime; } @@ -62,6 +63,7 @@ function getAcronyms() { static $acronyms = null; if ( !$acronyms ) { $acronyms = retrieveConfig('acronyms','confToHash'); + $acronyms = array_filter($acronyms); } return $acronyms; } @@ -75,6 +77,7 @@ function getSmileys() { static $smileys = null; if ( !$smileys ) { $smileys = retrieveConfig('smileys','confToHash'); + $smileys = array_filter($smileys); } return $smileys; } @@ -88,6 +91,7 @@ function getEntities() { static $entities = null; if ( !$entities ) { $entities = retrieveConfig('entities','confToHash'); + $entities = array_filter($entities); } return $entities; } @@ -101,9 +105,11 @@ function getInterwiki() { static $wikis = null; if ( !$wikis ) { $wikis = retrieveConfig('interwiki','confToHash',array(true)); + $wikis = array_filter($wikis); + + //add sepecial case 'this' + $wikis['this'] = DOKU_URL.'{NAME}'; } - //add sepecial case 'this' - $wikis['this'] = DOKU_URL.'{NAME}'; return $wikis; } -- cgit v1.2.3 From 4c353447a306680af86c38db3ef592e29a0cbe60 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 17 May 2015 13:02:07 +0200 Subject: Support negating of config values include earlier in the cascade To negate a config value, prefix the value with an '!'. E.g. to disable recognition of the gopher scheme !gopher This applies to: - scheme - stopwords --- inc/confutils.php | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/inc/confutils.php b/inc/confutils.php index 3e69b20be..7d7c043fa 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -120,7 +120,7 @@ function getInterwiki() { function getWordblocks() { static $wordblocks = null; if ( !$wordblocks ) { - $wordblocks = retrieveConfig('wordblock','file'); + $wordblocks = retrieveConfig('wordblock','file',null,'array_merge_with_removal'); } return $wordblocks; } @@ -133,11 +133,11 @@ function getWordblocks() { function getSchemes() { static $schemes = null; if ( !$schemes ) { - $schemes = retrieveConfig('scheme','file'); + $schemes = retrieveConfig('scheme','file',null,'array_merge_with_removal'); + $schemes = array_map('trim', $schemes); + $schemes = preg_replace('/^#.*/', '', $schemes); + $schemes = array_filter($schemes); } - $schemes = array_map('trim', $schemes); - $schemes = preg_replace('/^#.*/', '', $schemes); - $schemes = array_filter($schemes); return $schemes; } @@ -202,7 +202,7 @@ function confToHash($file,$lower=false) { * @param array $params optional additional params to pass to the callback * @return array configuration values */ -function retrieveConfig($type,$fn,$params=null) { +function retrieveConfig($type,$fn,$params=null,$combine='array_merge') { global $config_cascade; if(!is_array($params)) $params = array(); @@ -214,7 +214,7 @@ function retrieveConfig($type,$fn,$params=null) { foreach ($config_cascade[$type][$config_group] as $file) { if (file_exists($file)) { $config = call_user_func_array($fn,array_merge(array($file),$params)); - $combined = array_merge($combined, $config); + $combined = $combine($combined, $config); } } } @@ -353,4 +353,27 @@ function conf_decodeString($str) { return $str; } } + +/** + * array combination function to remove negated values (prefixed by !) + * + * @param array $current + * @param array $new + * + * @return array the combined array, numeric keys reset + */ +function array_merge_with_removal($current, $new) { + foreach ($new as $val) { + if (substr($val,0,1) == '!') { + $idx = array_search(substr($val,1),$current); + if ($idx !== false) { + unset($current[$idx]); + } + } else { + $current[] = $val; + } + } + + return array_slice($current,0); +} //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From b9e2f0546e334add4084195d07568a352bee5091 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 17 May 2015 13:27:56 +0200 Subject: update test groups for the extension manager test --- lib/plugins/extension/_test/extension.test.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plugins/extension/_test/extension.test.php b/lib/plugins/extension/_test/extension.test.php index 453b95e79..d4f13201d 100644 --- a/lib/plugins/extension/_test/extension.test.php +++ b/lib/plugins/extension/_test/extension.test.php @@ -14,7 +14,9 @@ class mock_helper_plugin_extension_extension extends helper_plugin_extension_ext /** * @group plugin_extension + * @group admin_plugins * @group plugins + * @group bundled_plugins */ class helper_plugin_extension_extension_test extends DokuWikiTest { -- cgit v1.2.3 From a2237e348f84c81fd0f16da7aa55d1caeaf62a6b Mon Sep 17 00:00:00 2001 From: Noel Tilliot Date: Mon, 18 May 2015 17:21:45 +0200 Subject: translation update --- inc/lang/de/lang.php | 2 +- lib/plugins/authmysql/lang/de/lang.php | 8 ++++++++ lib/plugins/extension/lang/de/lang.php | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 lib/plugins/authmysql/lang/de/lang.php diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 7dd95eddd..f435a31bf 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -350,10 +350,10 @@ $lang['media_perm_read'] = 'Sie besitzen nicht die notwendigen Berechtigun $lang['media_perm_upload'] = 'Sie besitzen nicht die notwendigen Berechtigungen um Dateien hochzuladen.'; $lang['media_update'] = 'Neue Version hochladen'; $lang['media_restore'] = 'Diese Version wiederherstellen'; +$lang['media_acl_warning'] = 'Diese Liste ist möglicherweise nicht vollständig. Versteckte und durch ACL gesperrte Seiten werden nicht angezeigt.'; $lang['currentns'] = 'Aktueller Namensraum'; $lang['searchresult'] = 'Suchergebnisse'; $lang['plainhtml'] = 'HTML Klartext'; $lang['wikimarkup'] = 'Wiki Markup'; $lang['page_nonexist_rev'] = 'DIe Seite exitiert nicht unter %s. Sie wurde aber unter %s'; $lang['unable_to_parse_date'] = 'Parameter "%s" kann nicht geparsed werden.'; -$lang['media_acl_warning'] = 'Diese Liste ist möglicherweise nicht vollständig. Versteckte und durch ACL gesperrte Seiten werden nicht angezeigt.'; diff --git a/lib/plugins/authmysql/lang/de/lang.php b/lib/plugins/authmysql/lang/de/lang.php new file mode 100644 index 000000000..6160f60ea --- /dev/null +++ b/lib/plugins/authmysql/lang/de/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['usernotexists'] = 'Sorry, dieser Nutzer existiert nicht.'; diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index ce5495e24..ef3197513 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -8,6 +8,7 @@ * @author Simon * @author Hoisl * @author Dominik Mahr + * @author Noel Tilliot */ $lang['menu'] = 'Erweiterungen verwalten'; $lang['tab_plugins'] = 'Installierte Plugins'; @@ -29,6 +30,9 @@ $lang['btn_disable'] = 'Deaktivieren'; $lang['btn_install'] = 'Installieren'; $lang['btn_reinstall'] = 'Neu installieren'; $lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich löschen?'; +$lang['js']['display_viewoptions'] = 'Optionen anzeigen'; +$lang['js']['display_enabled'] = 'aktiviert'; +$lang['js']['display_disabled'] = 'deaktiviert'; $lang['search_for'] = 'Erweiterung suchen:'; $lang['search'] = 'Suchen'; $lang['extensionby'] = '%s von %s'; -- cgit v1.2.3 From f266a91942e3eb7558afe54062c5e6a7bbcdf9ee Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Mon, 18 May 2015 20:31:04 +0100 Subject: Ensure filtering only removes empty string values (not other values which PHP evaluates to false) --- inc/confutils.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/confutils.php b/inc/confutils.php index 7d7c043fa..e3805d74e 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -63,7 +63,7 @@ function getAcronyms() { static $acronyms = null; if ( !$acronyms ) { $acronyms = retrieveConfig('acronyms','confToHash'); - $acronyms = array_filter($acronyms); + $acronyms = array_filter($acronyms, 'strlen'); } return $acronyms; } @@ -77,7 +77,7 @@ function getSmileys() { static $smileys = null; if ( !$smileys ) { $smileys = retrieveConfig('smileys','confToHash'); - $smileys = array_filter($smileys); + $smileys = array_filter($smileys, 'strlen'); } return $smileys; } @@ -91,7 +91,7 @@ function getEntities() { static $entities = null; if ( !$entities ) { $entities = retrieveConfig('entities','confToHash'); - $entities = array_filter($entities); + $entities = array_filter($entities, 'strlen'); } return $entities; } @@ -105,7 +105,7 @@ function getInterwiki() { static $wikis = null; if ( !$wikis ) { $wikis = retrieveConfig('interwiki','confToHash',array(true)); - $wikis = array_filter($wikis); + $wikis = array_filter($wikis, 'strlen'); //add sepecial case 'this' $wikis['this'] = DOKU_URL.'{NAME}'; -- cgit v1.2.3 From 3a7669bd1068f34022db08228baeefae2b27d05b Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Mon, 18 May 2015 20:32:49 +0100 Subject: Ensure single value negation is not affected by white space differences --- inc/confutils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/confutils.php b/inc/confutils.php index e3805d74e..c587bed4d 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -365,12 +365,12 @@ function conf_decodeString($str) { function array_merge_with_removal($current, $new) { foreach ($new as $val) { if (substr($val,0,1) == '!') { - $idx = array_search(substr($val,1),$current); + $idx = array_search(trim(substr($val,1)),$current); if ($idx !== false) { unset($current[$idx]); } } else { - $current[] = $val; + $current[] = trim($val); } } -- cgit v1.2.3 From 10b38f10e6ce99d01c6ca30bcd9992699d6ee049 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Mon, 18 May 2015 20:34:47 +0100 Subject: Define the negation character in a constant --- inc/confutils.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/confutils.php b/inc/confutils.php index c587bed4d..4035d6dd4 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -6,6 +6,12 @@ * @author Harry Fuecks */ +/* + * line prefix used to negate single value config items + * (scheme.conf & stopwords.conf), e.g. + * !gopher + */ +const DOKU_CONF_NEGATION = '!'; /** * Returns the (known) extension and mimetype of a given filename @@ -364,7 +370,7 @@ function conf_decodeString($str) { */ function array_merge_with_removal($current, $new) { foreach ($new as $val) { - if (substr($val,0,1) == '!') { + if (substr($val,0,1) == DOKU_CONF_NEGATION) { $idx = array_search(trim(substr($val,1)),$current); if ($idx !== false) { unset($current[$idx]); -- cgit v1.2.3 From d242ec8cf4d02610bd45b1f52dec36549d3c7e43 Mon Sep 17 00:00:00 2001 From: Tomas Darius Davainis Date: Fri, 22 May 2015 07:06:06 +0200 Subject: translation update --- inc/lang/lt/lang.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php index 80ffb8a10..a9eb05260 100644 --- a/inc/lang/lt/lang.php +++ b/inc/lang/lt/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Linas Valiukas * @author Edmondas Girkantas * @author Arūnas Vaitekūnas @@ -160,7 +160,6 @@ $lang['qb_media'] = 'Paveikslėliai ir kitos bylos'; $lang['qb_sig'] = 'Įterpti parašą'; $lang['qb_smileys'] = 'Šypsenėlės'; $lang['qb_chars'] = 'Specialūs simboliai'; -$lang['js']['del_confirm'] = 'Ar tikrai ištrinti pažymėtą(us) įrašą(us)?'; $lang['metaedit'] = 'Redaguoti metaduomenis'; $lang['metasaveerr'] = 'Nepavyko išsaugoti metaduomenų'; $lang['metasaveok'] = 'Metaduomenys išsaugoti'; -- cgit v1.2.3 From bdca103af13cf846a195328c69264d3ec632056b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 22 May 2015 14:39:25 +0200 Subject: avoid accessing nonexistant array key. fixes #1165 --- inc/html.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 2564c3bd6..2f10e3c08 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1409,7 +1409,13 @@ function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { // last timestamp is not in changelog, retrieve timestamp from metadata // note: when page is removed, the metadata timestamp is zero - $r_rev = $r_rev ? $r_rev : $INFO['meta']['last_change']['date']; + if(!$r_rev) { + if(isset($INFO['meta']['last_change']['date'])) { + $r_rev = $INFO['meta']['last_change']['date']; + } else { + $r_rev = 0; + } + } //retrieve revisions with additional info list($l_revs, $r_revs) = $pagelog->getRevisionsAround($l_rev, $r_rev); -- cgit v1.2.3 From 18f4ec973d8b711f6687adb71ce03e77e5ab1f41 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 25 May 2015 10:41:49 +0200 Subject: fixed isBundled() check when remote info is unavailable --- lib/plugins/extension/helper/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index d089245b5..719249fbe 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -105,7 +105,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function isBundled() { if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; - return in_array($this->base, + return in_array($this->id, array( 'authad', 'authldap', 'authmysql', 'authpgsql', 'authplain', 'acl', 'info', 'extension', 'revert', 'popularity', 'config', 'safefnrecode', 'testing', 'template:dokuwiki' -- cgit v1.2.3 From 5875e534bcbccf90fe3767fc77d8ea2a76aad9bd Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Fri, 15 May 2015 15:49:11 +0200 Subject: Plugins can send usage data They just need to register to the PLUGIN_USAGE_DATA event, and then to add either a simple string, or an array of key / value. For example: function register(Doku_Event_Handler $controller) { $controller->register_hook('PLUGIN_USAGE_DATA', 'AFTER', $this, 'usage_data'); } function usage_data(&$event){ $event->data['my_plugin_name'] = 'my usage data'; //or: $event->data['my_plugin_name'] = array ('k1' => 'v1', 'k2' => 'v2'); } --- lib/plugins/popularity/helper.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 8673fb5af..55264010f 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -253,9 +253,26 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { $data['php_exectime'] = $phptime; $data['php_extension'] = get_loaded_extensions(); + // plugin usage data + $this->_add_plugin_usage_data($data); + return $data; } + protected function _add_plugin_usage_data(&$data){ + $pluginsData = array(); + trigger_event('PLUGIN_POPULARITY_DATA_SETUP', $pluginsData); + foreach($pluginsData as $plugin => $d){ + if ( is_array($d) ) { + foreach($d as $key => $value){ + $data['plugin_' . $plugin . '_' . $key] = $value; + } + } else { + $data['plugin_' . $plugin] = $d; + } + } + } + /** * Callback to search and count the content of directories in DokuWiki * -- cgit v1.2.3 From edc61c3ad8e143dbc6aaf62829b2241e6393606e Mon Sep 17 00:00:00 2001 From: Ikuo Obataya Date: Thu, 28 May 2015 03:36:03 +0200 Subject: translation update --- inc/lang/ja/lang.php | 3 +++ lib/plugins/authad/lang/ja/lang.php | 3 +++ lib/plugins/authldap/lang/ja/settings.php | 1 + lib/plugins/extension/lang/ja/lang.php | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index 67a69c3de..290bb175b 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -77,6 +77,7 @@ $lang['regmissing'] = '全ての項目を入力してください。' $lang['reguexists'] = 'このユーザー名は既に存在しています。'; $lang['regsuccess'] = '新しいユーザーが作成されました。パスワードは登録したメールアドレス宛てに送付されます。'; $lang['regsuccess2'] = '新しいユーザーが作成されました。'; +$lang['regfail'] = 'ユーザーを作成できませんでした。'; $lang['regmailfail'] = 'パスワードのメール送信に失敗しました。お手数ですが管理者まで連絡をお願いします。'; $lang['regbadmail'] = 'メールアドレスが有効ではありません。'; $lang['regbadpass'] = '確認用のパスワードが正しくありません。'; @@ -91,6 +92,7 @@ $lang['profdeleteuser'] = 'アカウントの削除'; $lang['profdeleted'] = 'このwikiからあなたのユーザーアカウントは削除済です。'; $lang['profconfdelete'] = 'このwikiから自分のアカウント抹消を希望します。
この操作は取消すことができません。'; $lang['profconfdeletemissing'] = '確認のチェックボックスがチェックされていません。'; +$lang['proffail'] = 'ユーザー情報は更新されませんでした。'; $lang['pwdforget'] = 'パスワードをお忘れですか?パスワード再発行'; $lang['resendna'] = 'パスワードの再発行は出来ません。'; $lang['resendpwd'] = '新しいパスワードをセット'; @@ -336,6 +338,7 @@ $lang['media_perm_read'] = 'ファイルを閲覧する権限がありま $lang['media_perm_upload'] = 'ファイルをアップロードする権限がありません。'; $lang['media_update'] = '新しいバージョンをアップロード'; $lang['media_restore'] = 'このバージョンを復元'; +$lang['media_acl_warning'] = 'ACL制限や非表示ページは表示されないので、このリストは完全でない場合があります。'; $lang['currentns'] = '現在の名前空間'; $lang['searchresult'] = '検索結果'; $lang['plainhtml'] = 'プレーンHTML'; diff --git a/lib/plugins/authad/lang/ja/lang.php b/lib/plugins/authad/lang/ja/lang.php index 91c4f046a..e82ca3791 100644 --- a/lib/plugins/authad/lang/ja/lang.php +++ b/lib/plugins/authad/lang/ja/lang.php @@ -5,6 +5,9 @@ * * @author PzF_X * @author Osaka + * @author Ikuo Obataya */ $lang['domain'] = 'ログオン時のドメイン'; $lang['authpwdexpire'] = 'あなたのパスワードは、あと%d日で有効期限が切れます。パスワードを変更してください。'; +$lang['passchangefail'] = 'パスワードを変更できませんでした。パスワードのルールに合わなかったのかもしれません。'; +$lang['connectfail'] = 'Active Directoryサーバーに接続できませんでした。'; diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php index 6cff0ea67..717b5a6d9 100644 --- a/lib/plugins/authldap/lang/ja/settings.php +++ b/lib/plugins/authldap/lang/ja/settings.php @@ -7,6 +7,7 @@ * @author Hideaki SAWADA * @author Hideaki SAWADA * @author PzF_X + * @author Ikuo Obataya */ $lang['server'] = 'LDAPサーバー。ホスト名(localhost)又は完全修飾URL(ldap://server.tld:389)'; $lang['port'] = '上記が完全修飾URLでない場合、LDAPサーバーポート'; diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php index ce6ed2b97..42334c767 100644 --- a/lib/plugins/extension/lang/ja/lang.php +++ b/lib/plugins/extension/lang/ja/lang.php @@ -6,6 +6,7 @@ * @author Hideaki SAWADA * @author PzF_X * @author Satoshi Sahara + * @author Ikuo Obataya */ $lang['menu'] = '拡張機能管理'; $lang['tab_plugins'] = 'インストール済プラグイン'; @@ -27,6 +28,9 @@ $lang['btn_disable'] = '無効化'; $lang['btn_install'] = 'インストール'; $lang['btn_reinstall'] = '再インストール'; $lang['js']['reallydel'] = 'この拡張機能を本当にアンインストールしますか?'; +$lang['js']['display_enabled'] = '有効'; +$lang['js']['display_disabled'] = '無効'; +$lang['js']['display_updatable'] = '更新可能'; $lang['search_for'] = '拡張機能の検索:'; $lang['search'] = '検索'; $lang['extensionby'] = '%s 作者: %s'; -- cgit v1.2.3 From 4286c64e98499b93056c09498c10709f8909befd Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 28 May 2015 12:18:36 +0100 Subject: update confToHash() inline documentation for new parameter --- inc/confutils.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/confutils.php b/inc/confutils.php index 4035d6dd4..8b61a8d5b 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -206,6 +206,11 @@ function confToHash($file,$lower=false) { * @param string $type the configuration settings to be read, must correspond to a key/array in $config_cascade * @param callback $fn the function used to process the configuration file into an array * @param array $params optional additional params to pass to the callback + * @param callback $combine the function used to combine arrays of values read from different configuration files; + * the function takes two parameters, + * $combined - the already read & merged configuration values + * $new - array of config values from the config cascade file being currently processed + * and returns an array of the merged configuration values. * @return array configuration values */ function retrieveConfig($type,$fn,$params=null,$combine='array_merge') { -- cgit v1.2.3 From 2b2b4cfeaa8d7ae4ba8315b27379063862a067cf Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 29 May 2015 12:20:35 +0200 Subject: Upgrade to jQuery 1.11.3 and jQueryUI 1.11.4 closes #1175 --- inc/lang/ar/jquery.ui.datepicker.js | 13 +- inc/lang/el/jquery.ui.datepicker.js | 2 +- inc/lang/fa/jquery.ui.datepicker.js | 24 +- inc/lang/fr/jquery.ui.datepicker.js | 2 +- inc/lang/ka/jquery.ui.datepicker.js | 35 + inc/lang/ta/jquery.ui.datepicker.js | 37 + .../jquery-ui-theme/images/animated-overlay.gif | Bin 1738 -> 0 bytes .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 78 -> 251 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 74 -> 247 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 184 -> 374 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 73 -> 246 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 126 -> 301 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 121 -> 301 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 186 -> 371 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 122 -> 319 bytes .../images/ui-icons_222222_256x240.png | Bin 3778 -> 7006 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 3778 -> 4599 bytes .../images/ui-icons_454545_256x240.png | Bin 3778 -> 7071 bytes .../images/ui-icons_888888_256x240.png | Bin 3778 -> 7092 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 3778 -> 4599 bytes lib/scripts/jquery/jquery-ui-theme/smoothness.css | 24 +- lib/scripts/jquery/jquery-ui.js | 1823 ++++++++++++-------- lib/scripts/jquery/jquery-ui.min.js | 20 +- lib/scripts/jquery/jquery.js | 195 ++- lib/scripts/jquery/jquery.min.js | 9 +- lib/scripts/jquery/update.sh | 10 +- 26 files changed, 1391 insertions(+), 803 deletions(-) create mode 100644 inc/lang/ka/jquery.ui.datepicker.js create mode 100644 inc/lang/ta/jquery.ui.datepicker.js delete mode 100644 lib/scripts/jquery/jquery-ui-theme/images/animated-overlay.gif diff --git a/inc/lang/ar/jquery.ui.datepicker.js b/inc/lang/ar/jquery.ui.datepicker.js index c93fed48d..c9ee84a54 100644 --- a/inc/lang/ar/jquery.ui.datepicker.js +++ b/inc/lang/ar/jquery.ui.datepicker.js @@ -1,6 +1,7 @@ /* Arabic Translation for jQuery UI date picker plugin. */ -/* Khaled Alhourani -- me@khaledalhourani.com */ -/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */ +/* Used in most of Arab countries, primarily in Bahrain, Kuwait, Oman, Qatar, Saudi Arabia and the United Arab Emirates, Egypt, Sudan and Yemen. */ +/* Written by Mohammed Alshehri -- m@dralshehri.com */ + (function( factory ) { if ( typeof define === "function" && define.amd ) { @@ -18,15 +19,15 @@ datepicker.regional['ar'] = { prevText: '<السابق', nextText: 'التالي>', currentText: 'اليوم', - monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران', - 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + monthNames: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', + 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + dayNamesShort: ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], weekHeader: 'أسبوع', dateFormat: 'dd/mm/yy', - firstDay: 6, + firstDay: 0, isRTL: true, showMonthAfterYear: false, yearSuffix: ''}; diff --git a/inc/lang/el/jquery.ui.datepicker.js b/inc/lang/el/jquery.ui.datepicker.js index a852a77d7..362e248f8 100644 --- a/inc/lang/el/jquery.ui.datepicker.js +++ b/inc/lang/el/jquery.ui.datepicker.js @@ -16,7 +16,7 @@ datepicker.regional['el'] = { closeText: 'Κλείσιμο', prevText: 'Προηγούμενος', nextText: 'Επόμενος', - currentText: 'Τρέχων Μήνας', + currentText: 'Σήμερα', monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος', 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'], monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν', diff --git a/inc/lang/fa/jquery.ui.datepicker.js b/inc/lang/fa/jquery.ui.datepicker.js index 8ffd66411..71f8a2852 100644 --- a/inc/lang/fa/jquery.ui.datepicker.js +++ b/inc/lang/fa/jquery.ui.datepicker.js @@ -19,18 +19,18 @@ datepicker.regional['fa'] = { nextText: 'بعدی>', currentText: 'امروز', monthNames: [ - 'فروردين', - 'ارديبهشت', - 'خرداد', - 'تير', - 'مرداد', - 'شهريور', - 'مهر', - 'آبان', - 'آذر', - 'دی', - 'بهمن', - 'اسفند' + 'ژانویه', + 'فوریه', + 'مارس', + 'آوریل', + 'مه', + 'ژوئن', + 'ژوئیه', + 'اوت', + 'سپتامبر', + 'اکتبر', + 'نوامبر', + 'دسامبر' ], monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], dayNames: [ diff --git a/inc/lang/fr/jquery.ui.datepicker.js b/inc/lang/fr/jquery.ui.datepicker.js index 2f5ff3cbe..6b6e0b35f 100644 --- a/inc/lang/fr/jquery.ui.datepicker.js +++ b/inc/lang/fr/jquery.ui.datepicker.js @@ -21,7 +21,7 @@ datepicker.regional['fr'] = { currentText: 'Aujourd\'hui', monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], - monthNamesShort: ['janv.', 'févr.', 'mars', 'avril', 'mai', 'juin', + monthNamesShort: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'], dayNames: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'], dayNamesShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'], diff --git a/inc/lang/ka/jquery.ui.datepicker.js b/inc/lang/ka/jquery.ui.datepicker.js new file mode 100644 index 000000000..69103542b --- /dev/null +++ b/inc/lang/ka/jquery.ui.datepicker.js @@ -0,0 +1,35 @@ +/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Lado Lomidze (lado.lomidze@gmail.com). */ +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "../datepicker" ], factory ); + } else { + + // Browser globals + factory( jQuery.datepicker ); + } +}(function( datepicker ) { + +datepicker.regional['ka'] = { + closeText: 'დახურვა', + prevText: '< წინა', + nextText: 'შემდეგი >', + currentText: 'დღეს', + monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'], + monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'], + dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'], + dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'], + dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'], + weekHeader: 'კვირა', + dateFormat: 'dd-mm-yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; +datepicker.setDefaults(datepicker.regional['ka']); + +return datepicker.regional['ka']; + +})); diff --git a/inc/lang/ta/jquery.ui.datepicker.js b/inc/lang/ta/jquery.ui.datepicker.js new file mode 100644 index 000000000..113a20849 --- /dev/null +++ b/inc/lang/ta/jquery.ui.datepicker.js @@ -0,0 +1,37 @@ +/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by S A Sureshkumar (saskumar@live.com). */ +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "../datepicker" ], factory ); + } else { + + // Browser globals + factory( jQuery.datepicker ); + } +}(function( datepicker ) { + +datepicker.regional['ta'] = { + closeText: 'மூடு', + prevText: 'முன்னையது', + nextText: 'அடுத்தது', + currentText: 'இன்று', + monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி', + 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'], + monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி', + 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'], + dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'], + dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'], + dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'], + weekHeader: 'Не', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; +datepicker.setDefaults(datepicker.regional['ta']); + +return datepicker.regional['ta']; + +})); diff --git a/lib/scripts/jquery/jquery-ui-theme/images/animated-overlay.gif b/lib/scripts/jquery/jquery-ui-theme/images/animated-overlay.gif deleted file mode 100644 index d441f75eb..000000000 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/animated-overlay.gif and /dev/null differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png index f5c2d583d..03b1d7216 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png index e36540bbf..882c78c4f 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png index 8225e3e18..e17b8809c 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png index 3e56dbdca..de3b7cc4d 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png index d5265f4dd..74ff8a2f5 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png index 1d509f45a..08cf4c38a 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png index 38349845c..e7b6f8322 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png index a374f7501..fea66d4dd 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png index a13f9b4dd..e556b9a90 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_222222_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png index 945c3d704..54f652fec 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_2e83ff_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png index 60ec1c692..1a2b52e89 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_454545_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png index 48de3ed6b..88c31424b 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_888888_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png index b987966e0..8da7fb082 100644 Binary files a/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png and b/lib/scripts/jquery/jquery-ui-theme/images/ui-icons_cd0a0a_256x240.png differ diff --git a/lib/scripts/jquery/jquery-ui-theme/smoothness.css b/lib/scripts/jquery/jquery-ui-theme/smoothness.css index 93a79cad2..2fa859a43 100644 --- a/lib/scripts/jquery/jquery-ui-theme/smoothness.css +++ b/lib/scripts/jquery/jquery-ui-theme/smoothness.css @@ -1,8 +1,8 @@ -/*! jQuery UI - v1.11.0 - 2014-06-26 +/*! jQuery UI - v1.11.4 - 2015-03-11 * http://jqueryui.com * Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px -* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ /* Layout helpers ----------------------------------*/ @@ -48,7 +48,7 @@ left: 0; position: absolute; opacity: 0; - filter:Alpha(Opacity=0); + filter:Alpha(Opacity=0); /* support: IE8 */ } .ui-front { @@ -274,7 +274,7 @@ button.ui-button::-moz-focus-inner { } .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { - width: 49%; + width: 45%; } .ui-datepicker table { width: 100%; @@ -514,9 +514,9 @@ button.ui-button::-moz-focus-inner { height: 100%; } .ui-progressbar .ui-progressbar-overlay { - background: url("images/animated-overlay.gif"); + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); height: 100%; - filter: alpha(opacity=25); + filter: alpha(opacity=25); /* support: IE8 */ opacity: 0.25; } .ui-progressbar-indeterminate .ui-progressbar-value { @@ -672,7 +672,7 @@ button.ui-button::-moz-focus-inner { background-position: 0 0; } -/* For IE8 - See #6727 */ +/* support: IE8 - See #6727 */ .ui-slider.ui-state-disabled .ui-slider-handle, .ui-slider.ui-state-disabled .ui-slider-range { filter: inherit; @@ -954,18 +954,18 @@ body .ui-tooltip { .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; - filter:Alpha(Opacity=70); + filter:Alpha(Opacity=70); /* support: IE8 */ font-weight: normal; } .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; - filter:Alpha(Opacity=35); + filter:Alpha(Opacity=35); /* support: IE8 */ background-image: none; } .ui-state-disabled .ui-icon { - filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ } /* Icons @@ -1213,13 +1213,13 @@ body .ui-tooltip { .ui-widget-overlay { background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; opacity: .3; - filter: Alpha(Opacity=30); + filter: Alpha(Opacity=30); /* support: IE8 */ } .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x; opacity: .3; - filter: Alpha(Opacity=30); + filter: Alpha(Opacity=30); /* support: IE8 */ border-radius: 8px; } diff --git a/lib/scripts/jquery/jquery-ui.js b/lib/scripts/jquery/jquery-ui.js index 670e39a8f..31ee9cd81 100644 --- a/lib/scripts/jquery/jquery-ui.js +++ b/lib/scripts/jquery/jquery-ui.js @@ -1,7 +1,7 @@ -/*! jQuery UI - v1.11.0 - 2014-06-26 +/*! jQuery UI - v1.11.4 - 2015-03-11 * http://jqueryui.com * Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js -* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ (function( factory ) { if ( typeof define === "function" && define.amd ) { @@ -15,10 +15,10 @@ } }(function( $ ) { /*! - * jQuery UI Core 1.11.0 + * jQuery UI Core 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -30,7 +30,7 @@ $.ui = $.ui || {}; $.extend( $.ui, { - version: "1.11.0", + version: "1.11.4", keyCode: { BACKSPACE: 8, @@ -54,15 +54,16 @@ $.extend( $.ui, { // plugins $.fn.extend({ - scrollParent: function() { + scrollParent: function( includeHidden ) { var position = this.css( "position" ), excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, scrollParent = this.parents().filter( function() { var parent = $( this ); if ( excludeStaticParent && parent.css( "position" ) === "static" ) { return false; } - return (/(auto|scroll)/).test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); }).eq( 0 ); return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; @@ -99,10 +100,10 @@ function focusable( element, isTabIndexNotNaN ) { if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { return false; } - img = $( "img[usemap=#" + mapName + "]" )[0]; + img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; return !!img && visible( img ); } - return ( /input|select|textarea|button|object/.test( nodeName ) ? + return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? !element.disabled : "a" === nodeName ? element.href || isTabIndexNotNaN : @@ -308,10 +309,10 @@ $.ui.plugin = { /*! - * jQuery UI Widget 1.11.0 + * jQuery UI Widget 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -324,11 +325,18 @@ var widget_uuid = 0, $.cleanData = (function( orig ) { return function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + var events, elem, i; + for ( i = 0; (elem = elems[i]) != null; i++ ) { try { - $( elem ).triggerHandler( "remove" ); + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} + } catch ( e ) {} } orig( elems ); }; @@ -482,11 +490,6 @@ $.widget.bridge = function( name, object ) { args = widget_slice.call( arguments, 1 ), returnValue = this; - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - if ( isMethodCall ) { this.each(function() { var methodValue, @@ -511,6 +514,12 @@ $.widget.bridge = function( name, object ) { } }); } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat(args) ); + } + this.each(function() { var instance = $.data( this, fullName ); if ( instance ) { @@ -546,10 +555,6 @@ $.Widget.prototype = { this.element = $( element ); this.uuid = widget_uuid++; this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); this.bindings = $(); this.hoverable = $(); @@ -572,6 +577,11 @@ $.Widget.prototype = { this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); } + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + this._create(); this._trigger( "create", null, this._getCreateEventData() ); this._init(); @@ -734,8 +744,14 @@ $.Widget.prototype = { }, _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; element.unbind( eventName ).undelegate( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); }, _delay: function( handler, delay ) { @@ -841,10 +857,10 @@ var widget = $.widget; /*! - * jQuery UI Mouse 1.11.0 + * jQuery UI Mouse 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -858,7 +874,7 @@ $( document ).mouseup( function() { }); var mouse = $.widget("ui.mouse", { - version: "1.11.0", + version: "1.11.4", options: { cancel: "input,textarea,button,select,option", distance: 1, @@ -899,6 +915,8 @@ var mouse = $.widget("ui.mouse", { return; } + this._mouseMoved = false; + // we may have missed mouseup (out of window) (this._mouseStarted && this._mouseUp(event)); @@ -952,13 +970,23 @@ var mouse = $.widget("ui.mouse", { }, _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); + // Only check for mouseups outside the document if you've moved inside the document + // at least once. This prevents the firing of mouseup in the case of IE<9, which will + // fire a mousemove event if content is placed under the cursor. See #7778 + // Support: IE <9 + if ( this._mouseMoved ) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { + return this._mouseUp(event); + + // Iframe mouseup check - mouseup occurred in another document + } else if ( !event.which ) { + return this._mouseUp( event ); + } + } - // Iframe mouseup check - mouseup occurred in another document - } else if ( !event.which ) { - return this._mouseUp( event ); + if ( event.which || event.button ) { + this._mouseMoved = true; } if (this._mouseStarted) { @@ -1015,10 +1043,10 @@ var mouse = $.widget("ui.mouse", { /*! - * jQuery UI Position 1.11.0 + * jQuery UI Position 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -1129,8 +1157,11 @@ $.position = { offset: withinElement.offset() || { left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), - width: isWindow ? withinElement.width() : withinElement.outerWidth(), - height: isWindow ? withinElement.height() : withinElement.outerHeight() + + // support: jQuery 1.6.x + // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows + width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), + height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() }; } }; @@ -1451,12 +1482,12 @@ $.ui.position = { newOverBottom; if ( overTop < 0 ) { newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; - if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { + if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { position.top += myOffset + atOffset + offset; } } else if ( overBottom > 0 ) { newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; - if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { + if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { position.top += myOffset + atOffset + offset; } } @@ -1519,10 +1550,10 @@ var position = $.ui.position; /*! - * jQuery UI Accordion 1.11.0 + * jQuery UI Accordion 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -1531,7 +1562,7 @@ var position = $.ui.position; var accordion = $.widget( "ui.accordion", { - version: "1.11.0", + version: "1.11.4", options: { active: 0, animate: {}, @@ -1765,13 +1796,22 @@ var accordion = $.widget( "ui.accordion", { }, _processPanels: function() { + var prevHeaders = this.headers, + prevPanels = this.panels; + this.headers = this.element.find( this.options.header ) .addClass( "ui-accordion-header ui-state-default ui-corner-all" ); - this.headers.next() + this.panels = this.headers.next() .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) .filter( ":not(.ui-accordion-content-active)" ) .hide(); + + // Avoid memory leaks (#10056) + if ( prevPanels ) { + this._off( prevHeaders.not( this.headers ) ); + this._off( prevPanels.not( this.panels ) ); + } }, _refresh: function() { @@ -1980,7 +2020,10 @@ var accordion = $.widget( "ui.accordion", { toHide.attr({ "aria-hidden": "true" }); - toHide.prev().attr( "aria-selected", "false" ); + toHide.prev().attr({ + "aria-selected": "false", + "aria-expanded": "false" + }); // if we're switching panels, remove the old header from the tab order // if we're opening from collapsed state, remove the previous header from the tab order // if we're collapsing, then keep the collapsing header in the tab order @@ -1991,7 +2034,7 @@ var accordion = $.widget( "ui.accordion", { }); } else if ( toShow.length ) { this.headers.filter(function() { - return $( this ).attr( "tabIndex" ) === 0; + return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; }) .attr( "tabIndex", -1 ); } @@ -2001,8 +2044,8 @@ var accordion = $.widget( "ui.accordion", { .prev() .attr({ "aria-selected": "true", - tabIndex: 0, - "aria-expanded": "true" + "aria-expanded": "true", + tabIndex: 0 }); }, @@ -2010,6 +2053,7 @@ var accordion = $.widget( "ui.accordion", { var total, easing, duration, that = this, adjust = 0, + boxSizing = toShow.css( "box-sizing" ), down = toShow.length && ( !toHide.length || ( toShow.index() < toHide.index() ) ), animate = this.options.animate || {}, @@ -2052,7 +2096,9 @@ var accordion = $.widget( "ui.accordion", { step: function( now, fx ) { fx.now = Math.round( now ); if ( fx.prop !== "height" ) { - adjust += fx.now; + if ( boxSizing === "content-box" ) { + adjust += fx.now; + } } else if ( that.options.heightStyle !== "content" ) { fx.now = Math.round( total - toHide.outerHeight() - adjust ); adjust = 0; @@ -2080,10 +2126,10 @@ var accordion = $.widget( "ui.accordion", { /*! - * jQuery UI Menu 1.11.0 + * jQuery UI Menu 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -2092,7 +2138,7 @@ var accordion = $.widget( "ui.accordion", { var menu = $.widget( "ui.menu", { - version: "1.11.0", + version: "1.11.4", defaultElement: "
    ", delay: 300, options: { @@ -2167,6 +2213,12 @@ var menu = $.widget( "ui.menu", { } }, "mouseenter .ui-menu-item": function( event ) { + // Ignore mouse events while typeahead is active, see #10458. + // Prevents focusing the wrong item when typeahead causes a scroll while the mouse + // is over an item in the menu + if ( this.previousFilter ) { + return; + } var target = $( event.currentTarget ); // Remove ui-state-active class from siblings of the newly focused menu item // to avoid a jump caused by adjacent elements both having a class with a border @@ -2246,13 +2298,9 @@ var menu = $.widget( "ui.menu", { }, _keydown: function( event ) { - var match, prev, character, skip, regex, + var match, prev, character, skip, preventDefault = true; - function escape( value ) { - return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); - } - switch ( event.keyCode ) { case $.ui.keyCode.PAGE_UP: this.previousPage( event ); @@ -2301,10 +2349,7 @@ var menu = $.widget( "ui.menu", { character = prev + character; } - regex = new RegExp( "^" + escape( character ), "i" ); - match = this.activeMenu.find( this.options.items ).filter(function() { - return regex.test( $( this ).text() ); - }); + match = this._filterMenuItems( character ); match = skip && match.index( this.active.next() ) !== -1 ? this.active.nextAll( ".ui-menu-item" ) : match; @@ -2313,22 +2358,15 @@ var menu = $.widget( "ui.menu", { // to move down the menu to the first item that starts with that character if ( !match.length ) { character = String.fromCharCode( event.keyCode ); - regex = new RegExp( "^" + escape( character ), "i" ); - match = this.activeMenu.find( this.options.items ).filter(function() { - return regex.test( $( this ).text() ); - }); + match = this._filterMenuItems( character ); } if ( match.length ) { this.focus( event, match ); - if ( match.length > 1 ) { - this.previousFilter = character; - this.filterTimer = this._delay(function() { - delete this.previousFilter; - }, 1000 ); - } else { + this.previousFilter = character; + this.filterTimer = this._delay(function() { delete this.previousFilter; - } + }, 1000 ); } else { delete this.previousFilter; } @@ -2700,15 +2738,29 @@ var menu = $.widget( "ui.menu", { this.collapseAll( event, true ); } this._trigger( "select", event, ui ); + }, + + _filterMenuItems: function(character) { + var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), + regex = new RegExp( "^" + escapedCharacter, "i" ); + + return this.activeMenu + .find( this.options.items ) + + // Only match on items, not dividers or other content (#10571) + .filter( ".ui-menu-item" ) + .filter(function() { + return regex.test( $.trim( $( this ).text() ) ); + }); } }); /*! - * jQuery UI Autocomplete 1.11.0 + * jQuery UI Autocomplete 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -2717,7 +2769,7 @@ var menu = $.widget( "ui.menu", { $.widget( "ui.autocomplete", { - version: "1.11.0", + version: "1.11.4", defaultElement: "", options: { appendTo: null, @@ -2820,7 +2872,9 @@ $.widget( "ui.autocomplete", { break; case keyCode.ESCAPE: if ( this.menu.element.is( ":visible" ) ) { - this._value( this.term ); + if ( !this.isMultiLine ) { + this._value( this.term ); + } this.close( event ); // Different browsers have different default behavior for escape // Single press can mean undo or clear @@ -2956,7 +3010,7 @@ $.widget( "ui.autocomplete", { // Announce the value in the liveRegion label = ui.item.attr( "aria-label" ) || item.value; - if ( label && jQuery.trim( label ).length ) { + if ( label && $.trim( label ).length ) { this.liveRegion.children().hide(); $( "
    " ).text( label ).appendTo( this.liveRegion ); } @@ -3315,10 +3369,10 @@ var autocomplete = $.ui.autocomplete; /*! - * jQuery UI Button 1.11.0 + * jQuery UI Button 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -3354,7 +3408,7 @@ var lastActive, }; $.widget( "ui.button", { - version: "1.11.0", + version: "1.11.4", defaultElement: "