From 97f5f73730142fc823209497af42c0eae1b4114c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 27 Mar 2020 08:16:12 +0100 Subject: [PATCH 01/33] process of user can be deleted again, instead of transfered to another user --- CHANGELOG | 2 ++ op/op.UsrMgr.php | 10 +++++++--- views/bootstrap/class.RemoveUserFromProcesses.php | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 26255d950..1533979d8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,8 @@ - fix removal of roles (Closes: #465) - fix password forgotten process - fix setting role of new user and retrieving role of existing user +- processes of users can be deleted again, instead of only transfered to + another user -------------------------------------------------------------------------------- Changes in version 6.0.8 diff --git a/op/op.UsrMgr.php b/op/op.UsrMgr.php index ff1f106dc..f0aef6184 100644 --- a/op/op.UsrMgr.php +++ b/op/op.UsrMgr.php @@ -205,9 +205,13 @@ else if ($action == "removefromprocesses") { UI::exitError(getMLText("admin_tools"),getMLText("cannot_delete_yourself")); } - $userToAssign = $dms->getUser($_POST["assignTo"]); - if (!is_object($userToAssign)) { - UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + if(!empty($_POST["assignTo"])) { + $userToAssign = $dms->getUser($_POST["assignTo"]); + if (!is_object($userToAssign)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id")); + } + } else { + $userToAssign = null; } $userToRemove = $dms->getUser($userid); diff --git a/views/bootstrap/class.RemoveUserFromProcesses.php b/views/bootstrap/class.RemoveUserFromProcesses.php index a7443c3cc..6eb78b68d 100644 --- a/views/bootstrap/class.RemoveUserFromProcesses.php +++ b/views/bootstrap/class.RemoveUserFromProcesses.php @@ -52,7 +52,7 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style { isGuest() || ($currUser->getID() == $rmuser->getID()) ) continue; From b80ffbf7c348250fef5a323be885e718f9401fd3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Apr 2020 14:04:24 +0200 Subject: [PATCH 02/33] set data-allow-clear for select2 --- views/bootstrap/class.Settings.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index d00cd23b9..a8ecb3e3d 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -512,7 +512,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); case "categories": $categories = $dms->getDocumentCategories(); if($categories) { - echo ""; if($allowempty) echo ""; foreach($categories as $category) { @@ -527,7 +527,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); case "users": $users = $dms->getAllUsers(); if($users) { - echo ""; if($allowempty) echo ""; foreach($users as $curuser) { @@ -542,7 +542,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); case "groups": $recs = $dms->getAllGroups(); if($recs) { - echo ""; if($allowempty) echo ""; foreach($recs as $rec) { @@ -557,7 +557,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); case "attributedefinitions": $recs = $dms->getAllAttributeDefinitions(); if($recs) { - echo ""; if($allowempty) echo ""; foreach($recs as $rec) { From 6f60445ca8574b0a51b1820006020a2e1724af5c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Apr 2020 14:05:33 +0200 Subject: [PATCH 03/33] set data-allow-clear on select2 --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 5917f5b81..6f58067dd 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1408,7 +1408,7 @@ $(document).ready(function() { if($attrdef->getMultipleValues()) { $content .= "[]\" multiple"; } else { - $content .= "\""; + $content .= "\" data-allow-clear=\"true\""; } $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." class=\"chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; if(!$attrdef->getMultipleValues()) { From 0fac1646d46fd48038c02e8d4858ac7af5fc8c13 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Apr 2020 16:56:20 +0200 Subject: [PATCH 04/33] set $docAccess before checking the workflow mode --- views/bootstrap/class.AddDocument.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 9308d235e..c0857ba27 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -192,6 +192,10 @@ $(document).ready(function() { $this->warningMsg($msg); $this->contentHeading(getMLText("add_document")); + // Retrieve a list of all users and groups that have review / approve + // privileges. + $docAccess = $folder->getReadAccessList($enableadminrevapp, $enableownerrevapp); + $txt = $this->callHook('addDocumentPreForm'); if(is_string($txt)) echo $txt; @@ -450,9 +454,6 @@ $(document).ready(function() { } $this->warningMsg(getMLText("add_doc_workflow_warning")); } elseif($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { - // Retrieve a list of all users and groups that have review / approve - // privileges. - $docAccess = $folder->getReadAccessList($enableadminrevapp, $enableownerrevapp); if($workflowmode == 'traditional') { $this->contentSubHeading(getMLText("assign_reviewers")); From c69490daba3baec60abdb196110532ea98b5ea3f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Apr 2020 18:29:11 +0200 Subject: [PATCH 05/33] translate headers, use DateTime for Excel dates --- inc/inc.ClassDownloadMgr.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index 116784230..8e30b9ed1 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -49,7 +49,7 @@ class SeedDMS_Download_Mgr { function __construct($tmpdir = '') { $this->tmpdir = $tmpdir; $this->items = array(); - $this->header = array('Dokumenten-Nr.', 'Dokumentenname', 'Dateiname', 'Status', 'Int. Version', 'Prüfer', 'Prüfdatum', 'Prüfkommentar', 'Prüfstatus', 'Freigeber', 'Freigabedatum', 'Freigabekommentar', 'Freigabestatus'); + $this->header = array(getMLText('download_header_document_no'), getMLText('download_header_document_name'), getMLText('download_header_filename'), getMLText('download_header_state'), getMLText('download_header_internal_version'), getMLText('download_header_reviewer'), getMLText('download_header_review_date'), getMLText('download_header_review_comment'), getMLText('download_header_review_state'), getMLText('download_header_approver'), getMLText('download_header_approval_date'), getMLText('download_header_approval_comment'), getMLText('download_header_approval_state')); $this->extracols = array(); $this->rawcontents = array(); $this->extraheader = array(); @@ -115,7 +115,7 @@ class SeedDMS_Download_Mgr { } $tcol = $col; $sheet->setCellValueByColumnAndRow($tcol++, $l, $reqName); - $sheet->setCellValueByColumnAndRow($tcol, $l, ($r['status']==1 || $r['status']==-1) ? PHPExcel_Shared_Date::PHPToExcel(makeTsFromLongDate($r['date'])) : ""); + $sheet->setCellValueByColumnAndRow($tcol, $l, ($r['status']==1 || $r['status']==-1) ? PHPExcel_Shared_Date::PHPToExcel(new DateTime($r['date'])) : null); $sheet->getStyleByColumnAndRow($tcol++, $l)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX22); $sheet->setCellValueByColumnAndRow($tcol++, $l, $r['comment']); $sheet->setCellValueByColumnAndRow($tcol++, $l, getReviewStatusText($r["status"])); @@ -146,7 +146,7 @@ class SeedDMS_Download_Mgr { } $tcol = $col; $sheet->setCellValueByColumnAndRow($tcol++, $k, $reqName); - $sheet->setCellValueByColumnAndRow($tcol, $k, ($r['status']==1 || $r['status']==-1) ?PHPExcel_Shared_Date::PHPToExcel(makeTsFromLongDate($r['date'])) : ""); + $sheet->setCellValueByColumnAndRow($tcol, $k, ($r['status']==1 || $r['status']==-1) ?PHPExcel_Shared_Date::PHPToExcel(new DateTime($r['date'])) : null); $sheet->getStyleByColumnAndRow($tcol++, $k)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX22); $sheet->setCellValueByColumnAndRow($tcol++, $k, $r['comment']); $sheet->setCellValueByColumnAndRow($tcol++, $k, getApprovalStatusText($r["status"])); From 48cc8d80e8f4bade4ed1cc1c59dad8b163bc05b9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Apr 2020 18:29:48 +0200 Subject: [PATCH 06/33] use SeedDMS_Core_Document::isType() to check for documents --- views/bootstrap/class.Search.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index c016dae33..045dc900d 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -83,7 +83,7 @@ $(document).ready( function() { if($extraheader = $this->callHook('extraDownloadHeader')) $downmgr->addHeader($extraheader); foreach($entries as $entry) { - if(get_class($entry) == $dms->getClassname('document')) { + if($entry->isType('document')) { $extracols = $this->callHook('extraDownloadColumns', $entry); if(isset($_GET['includecontent']) && $_GET['includecontent'] && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) { $downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent); @@ -156,10 +156,10 @@ $(document).ready( function() { if($showsinglesearchhit && count($entries) == 1) { $entry = $entries[0]; - if(get_class($entry) == $dms->getClassname('document')) { + if($entry->isType('document')) { header('Location: ../out/out.ViewDocument.php?documentid='.$entry->getID()); exit; - } elseif(get_class($entry) == $dms->getClassname('folder')) { + } elseif($entry->isType('folder')) { header('Location: ../out/out.ViewFolder.php?folderid='.$entry->getID()); exit; } From 9f0bc73372316518bdb8162f51937a00880d306e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Apr 2020 18:36:24 +0200 Subject: [PATCH 07/33] add item for 6.0.9 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 1533979d8..ad76c3db2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - fix setting role of new user and retrieving role of existing user - processes of users can be deleted again, instead of only transfered to another user +- fix export of search results, headers of excel file can be translated -------------------------------------------------------------------------------- Changes in version 6.0.8 From bb53cb89b1dfc2d62236dc709e6b31ff73926617 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Apr 2020 07:41:25 +0200 Subject: [PATCH 08/33] various minor updates and new translations --- languages/ar_EG/lang.inc | 18 ++++++- languages/bg_BG/lang.inc | 14 +++++ languages/ca_ES/lang.inc | 14 +++++ languages/cs_CZ/lang.inc | 18 ++++++- languages/de_DE/lang.inc | 16 +++++- languages/el_GR/lang.inc | 14 +++++ languages/en_GB/lang.inc | 18 ++++++- languages/es_ES/lang.inc | 42 ++++++++++----- languages/fr_FR/lang.inc | 111 +++++++++++++++++++++++---------------- languages/hr_HR/lang.inc | 14 +++++ languages/hu_HU/lang.inc | 14 +++++ languages/it_IT/lang.inc | 14 +++++ languages/ko_KR/lang.inc | 14 +++++ languages/lo_LA/lang.inc | 14 +++++ languages/nb_NO/lang.inc | 14 +++++ languages/nl_NL/lang.inc | 14 +++++ languages/pl_PL/lang.inc | 14 +++++ languages/pt_BR/lang.inc | 14 +++++ languages/ro_RO/lang.inc | 14 +++++ languages/ru_RU/lang.inc | 14 +++++ languages/sk_SK/lang.inc | 14 +++++ languages/sv_SE/lang.inc | 14 +++++ languages/tr_TR/lang.inc | 14 +++++ languages/uk_UA/lang.inc | 14 +++++ languages/zh_CN/lang.inc | 14 +++++ languages/zh_TW/lang.inc | 14 +++++ 26 files changed, 437 insertions(+), 66 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index ae7220910..47b2da50e 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (2262) +// Translators: Admin (2263) $text = array( '2_factor_auth' => 'توثيق ذو عاملين', @@ -415,7 +415,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'صلاحيات موروثة', 'download' => 'تنزيل', 'download_extension' => 'تنزيل طويل', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'تنزيل روابط', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'إصلاح كل المستندات والمجلدات.', 'do_object_setchecksum' => 'تحديد فحص اخطاء', 'do_object_setfilesize' => 'تحديد حجم الملف', @@ -1042,7 +1056,7 @@ URL: [url]', 'revision_status' => 'حالة المراجعة', 'revision_submit_email_body' => 'تم تقديم مراجعة محتوى البريد الإلكتروني', 'revision_submit_email_subject' => 'تم تقديم مراجعة موضوع البريد الإلكتروني', -'revision_summary' => '', +'revision_summary' => 'ﻢﻠﺨﺻ ﻡﺭﺎﺠﻋﺓ', 'revisors' => 'المراجعين', 'revisor_already_assigned' => 'تم تعيين المراجع', 'revisor_already_removed' => 'تم إزالة المراجع', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 4f27cc2d6..1067d9a64 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -368,7 +368,21 @@ $text = array( 'does_not_inherit_access_msg' => 'Наследване нивото на достъп', 'download' => 'Изтегли', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Поправи всички папки и документи', 'do_object_setchecksum' => 'Установи контролна сума', 'do_object_setfilesize' => 'Установи размер на файла', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 2b735ada6..5725b1e66 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -373,7 +373,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'heretar l\'accés', 'download' => 'Descarregar', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => '', 'do_object_setchecksum' => '', 'do_object_setfilesize' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index a23eea917..f87111f16 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1530), kreml (579) +// Translators: Admin (1531), kreml (579) $text = array( '2_factor_auth' => 'dvoufaktorové ověření', @@ -439,7 +439,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Zdědit přístup', 'download' => 'Stáhnout', 'download_extension' => 'Stáhnout rozšíření jako soubor ZIP', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'Odkazy ke stažení', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Opravit všechny složky a dokumenty.', 'do_object_setchecksum' => 'Nastavit kontrolní součet', 'do_object_setfilesize' => 'Nastavit velikost souboru', @@ -803,7 +817,7 @@ URL: [url]', 'my_documents' => 'Moje dokumenty', 'my_transmittals' => 'Moje přenosy', 'name' => 'Název', -'nb_NO' => '', +'nb_NO' => 'Norština Bokmal', 'needs_correction' => 'Vyžaduje opravu', 'needs_workflow_action' => 'Tento dokument vyžaduje vaši pozornost. Zkontrolujte prosím kartu workflow.', 'network_drive' => 'Síťové úložiště', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index da0921a65..3d2f8129f 100644 --- a/languages/de_DE/lang.inc +++ b/languages/de_DE/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (2750), dgrutsch (22) +// Translators: Admin (2764), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -439,7 +439,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Berechtigungen wieder erben', 'download' => 'Download', 'download_extension' => 'Erweiterung als zip-Datei herunterladen', +'download_header_approval_comment' => 'Freigabekommentar', +'download_header_approval_date' => 'Freigabedatum', +'download_header_approval_state' => 'Freigabestatus', +'download_header_approver' => 'Freigeber', +'download_header_document_name' => 'Dokumentenname', +'download_header_document_no' => 'Dokumenten-Nr.', +'download_header_filename' => 'Dateiname', +'download_header_internal_version' => 'Int. Version', +'download_header_reviewer' => 'Prüfer', +'download_header_review_comment' => 'Prüfkommentar', +'download_header_review_date' => 'Prüfdatum', +'download_header_review_state' => 'Prüfstatus', +'download_header_status' => 'Status', 'download_links' => 'Download Links', +'do_no_transfer_to_user' => 'Prozesse nicht auf anderen Benutzer übertragen', 'do_object_repair' => 'Repariere alle Ordner und Dokumente.', 'do_object_setchecksum' => 'Setze Check-Summe', 'do_object_setfilesize' => 'Setze Dateigröße', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 8a3654230..920be7066 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -368,7 +368,21 @@ $text = array( 'does_not_inherit_access_msg' => '', 'download' => '', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => '', 'do_object_setchecksum' => '', 'do_object_setfilesize' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 2a89d279e..2c3449812 100644 --- a/languages/en_GB/lang.inc +++ b/languages/en_GB/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1849), archonwang (3), dgrutsch (9), netixw (14) +// Translators: Admin (1864), archonwang (3), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -439,7 +439,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Inherit access', 'download' => 'Download', 'download_extension' => 'Download extension as zip file', +'download_header_approval_comment' => 'Approval comment', +'download_header_approval_date' => 'Approval date', +'download_header_approval_state' => 'Approval status', +'download_header_approver' => 'Approver', +'download_header_document_name' => 'Document name', +'download_header_document_no' => 'Document no', +'download_header_filename' => 'File name', +'download_header_internal_version' => 'Int. version', +'download_header_reviewer' => 'Reviewer', +'download_header_review_comment' => 'Review comment', +'download_header_review_date' => 'Review date', +'download_header_review_state' => 'Review state', +'download_header_status' => 'State', 'download_links' => 'Download links', +'do_no_transfer_to_user' => 'Do not transfer processes to user', 'do_object_repair' => 'Repair all folders and documents.', 'do_object_setchecksum' => 'Set checksum', 'do_object_setfilesize' => 'Set file size', @@ -803,7 +817,7 @@ URL: [url]', 'my_documents' => 'My Documents', 'my_transmittals' => 'My Transmittals', 'name' => 'Name', -'nb_NO' => 'Norwegian', +'nb_NO' => 'Norwegian (Bokmål)', 'needs_correction' => 'Needs correction', 'needs_workflow_action' => 'This document requires your attention. Please check the workflow tab.', 'network_drive' => 'Network drive', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 50800fe58..5ffad0349 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: acabello (20), Admin (1136), angel (123), francisco (2), jaimem (14) +// Translators: acabello (20), Admin (1149), angel (123), francisco (2), jaimem (14) $text = array( '2_factor_auth' => '', @@ -131,7 +131,7 @@ URL: [url]', 'approver_already_assigned' => '', 'approver_already_removed' => '', 'april' => 'Abril', -'archive' => '', +'archive' => 'Archivo', 'archive_creation' => 'Creación de archivo', 'archive_creation_warning' => 'Con esta operación usted puede crear un archivo que contenga los ficheros de las carpetas del DMS completo. Después de crearlo el archivo se guardará en la carpeta de datos de su servidor.
CUIDADO: un fichero creado como legible por humanos no podrá usarse como copia de seguridad del servidor.', 'ar_EG' => 'Arabe', @@ -331,7 +331,7 @@ URL: [url]', 'document' => 'Documento', 'documentcontent' => 'Contenido del documento', 'documents' => 'Documentos', -'documents_checked_out_by_you' => '', +'documents_checked_out_by_you' => 'Documentos verificados por usted', 'documents_expired' => 'Documentos Caducos', 'documents_in_process' => 'Documentos en proceso', 'documents_locked' => '', @@ -340,16 +340,16 @@ URL: [url]', 'documents_to_approve' => 'Documentos en espera de aprobación de usuarios', 'documents_to_correct' => '', 'documents_to_process' => '', -'documents_to_receipt' => '', +'documents_to_receipt' => 'Documentos en espera de confirmar su recepción', 'documents_to_review' => 'Documentos en espera de revisión de usuarios', -'documents_to_revise' => '', +'documents_to_revise' => 'Documentos en espera de su revisión', 'documents_to_trigger_workflow' => '', -'documents_user_draft' => '', -'documents_user_expiration' => '', -'documents_user_needs_correction' => '', -'documents_user_no_reception' => '', -'documents_user_obsolete' => '', -'documents_user_reception' => '', +'documents_user_draft' => 'Borradores', +'documents_user_expiration' => 'Documentos vencidos', +'documents_user_needs_correction' => 'Documentos que necesitan ser corregidos', +'documents_user_no_reception' => 'Documentos sin recepción', +'documents_user_obsolete' => 'Documentos obsoletos', +'documents_user_reception' => 'Documentos en espera de recepción', 'documents_user_rejected' => 'Documentos rechazados', 'documents_user_requiring_attention' => 'Documentos de su propiedad que requieren atención', 'documents_with_notification' => '', @@ -422,7 +422,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'heredar el acceso', 'download' => 'Descargar', 'download_extension' => 'Descargar como archivo zip', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Reparar todas las carpetas y documentos.', 'do_object_setchecksum' => 'Set checksum', 'do_object_setfilesize' => 'Asignar tamaño de fichero', @@ -954,7 +968,7 @@ Si continua teniendo problemas de acceso, por favor contacte con el administrado 'receipt_request_email_body' => '', 'receipt_request_email_subject' => '', 'receipt_status' => '', -'receipt_summary' => '', +'receipt_summary' => 'Resumen de recepción', 'receipt_update_failed' => '', 'recent_uploads' => 'Subidas recientes', 'reception' => '', @@ -1057,7 +1071,7 @@ URL: [url]', 'revision_status' => '', 'revision_submit_email_body' => '', 'revision_submit_email_subject' => '', -'revision_summary' => '', +'revision_summary' => 'Resumen de revisión', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -1689,7 +1703,7 @@ URL: [url]', 'takeOverIndApprovers' => '', 'takeOverIndReviewer' => 'Tomar control de la revisión de la última versión', 'takeOverIndReviewers' => '', -'tasks' => '', +'tasks' => 'Tareas', 'task_description' => '', 'task_disabled' => '', 'task_frequency' => '', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 2926f4653..10270fee0 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1102), jeromerobert (50), lonnnew (9), Oudiceval (823) +// Translators: Admin (1102), jeromerobert (50), lonnnew (9), Oudiceval (868) $text = array( '2_factor_auth' => 'Authentification forte', @@ -90,14 +90,14 @@ URL : [url]', 'and' => 'et', 'apply' => 'Appliquer', 'approvals_accepted' => '[no_approvals] approbations déjà confirmées', -'approvals_accepted_latest' => '', +'approvals_accepted_latest' => '(dont [no_approvals] dans la dernière version)', 'approvals_and_reviews_accepted' => '[no_approvals] approbations et [no_reviews] vérifications déjà confirmées', 'approvals_and_reviews_not_touched' => '[no_approvals] approbations et [no_reviews] vérifications non amorcées', 'approvals_and_reviews_rejected' => '[no_approvals] approbations et [no_reviews] vérifications déjà rejetées', 'approvals_not_touched' => '[no_approvals] approbations non amorcées', -'approvals_not_touched_latest' => '', +'approvals_not_touched_latest' => '(dont [no_approvals] dans la dernière version)', 'approvals_rejected' => '[no_approvals] approbations déjà rejetées', -'approvals_rejected_latest' => '', +'approvals_rejected_latest' => '(dont [no_approvals] dans la dernière version)', 'approvals_without_group' => 'Approbations sans groupe', 'approvals_without_user' => 'Approbations sans utilisateur', 'approval_deletion_email' => 'Demande d\'approbation supprimée', @@ -252,7 +252,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => 'Le fichier du document bloqué n’existe plus. Le déblocage est impossible.', 'checkedout_file_is_unchanged' => 'Le fichier du document bloqué est inchangé. Le déblocage n’est pas possible. Si vous ne souhaitez pas apporter de modifications, désactivez le blocage.', 'checkin_document' => 'Débloquer (check-in)', -'checkoutpath_does_not_exist' => '', +'checkoutpath_does_not_exist' => 'Le chemin de vérification n’existe pas', 'checkout_document' => 'Bloquer (check-out)', 'checkout_is_disabled' => 'Le blocage (check-out) de documents est désactivé dans la configuration.', 'choose_attrdef' => 'Choisissez une définition d\'attribut', @@ -401,7 +401,7 @@ Nouveau dossier: [new_folder_path] Utilisateur: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Document déplacé', -'document_not_checkedout' => '', +'document_not_checkedout' => 'Le document n’a pas été vérifié.', 'document_renamed_email' => 'Document renommé', 'document_renamed_email_body' => 'Document renommé Document: [name] @@ -439,7 +439,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Accès hérité', 'download' => 'Téléchargement', 'download_extension' => 'Télécharger l’extension en tant que fichier zip', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'Liens de téléchargement', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Réparer tous les dossiers et documents.', 'do_object_setchecksum' => 'Définir checksum', 'do_object_setfilesize' => 'Définir la taille du fichier', @@ -479,7 +493,7 @@ URL: [url]', 'edit_group' => 'Modifier un groupe', 'edit_online' => 'Modification en ligne', 'edit_online_warning' => 'L’enregistrement de vos modifications écrasera le contenu de la version actuelle au lieu de créer une nouvelle version.', -'edit_task' => '', +'edit_task' => 'Modifier la tâche', 'edit_transmittal_props' => 'Modifier les propriétés de la transmission', 'edit_user' => 'Modifier un utilisateur', 'edit_user_details' => 'Modifier les détails d\'utilisateur', @@ -541,7 +555,7 @@ Dossier parent : [folder_path] Utilisateur : [username] URL : [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Date d\'expiration modifiée', -'export' => '', +'export' => 'Exporter', 'extension_archive' => 'Extension', 'extension_changelog' => 'Journal des modifications', 'extension_loading' => 'Chargement des extensions…', @@ -742,12 +756,12 @@ URL: [url]', 'linked_to_document' => 'Lié au document', 'linked_to_this_version' => 'Lié à cette version', 'link_alt_updatedocument' => 'Pour déposer des fichiers de taille supérieure, utilisez la page d\'ajout multiple.', -'link_document' => '', +'link_document' => 'Lien vers le document', 'link_to_version' => 'Version', 'list_access_rights' => 'Liste des droits d’accès…', 'list_contains_no_access_docs' => 'La liste contient des documents auxquels vous n’avez pas accès et qui ne sont donc pas affichés.', 'list_hooks' => 'Liste livre', -'list_tasks' => '', +'list_tasks' => 'Liste des tâches', 'local_file' => 'Fichier local', 'locked_by' => 'Verrouillé par', 'lock_document' => 'Verrouiller', @@ -803,7 +817,7 @@ URL: [url]', 'my_documents' => 'Mes documents', 'my_transmittals' => 'Mes transmissions', 'name' => 'Nom', -'nb_NO' => '', +'nb_NO' => 'Norvégien bokmål', 'needs_correction' => 'Nécessite une correction', 'needs_workflow_action' => 'Ce document requiert votre attention. Consultez l\'onglet workflow.', 'network_drive' => 'Lecteur réseau', @@ -868,7 +882,7 @@ URL: [url]', 'no_backup_dir' => 'Le répertoire de sauvegarde n’est pas défini.', 'no_current_version' => 'Vous utilisez une ancienne version de SeedDMS. La dernière version disponible est la [latestversion].', 'no_default_keywords' => 'Aucun mot-clé disponible', -'no_docs_checked_out' => '', +'no_docs_checked_out' => 'Aucun document vérifié', 'no_docs_expired' => 'Aucun document expiré', 'no_docs_locked' => 'Aucun document verrouillé', 'no_docs_needs_correction' => 'Aucun document ne nécessite de correction', @@ -963,11 +977,11 @@ En cas de problème persistant, veuillez contacter votre administrateur.', 'quota_is_disabled' => 'Le support des quotas est actuellement désactivé dans les réglages. Affecter un quota utilisateur n’aura pas d’effet jusqu’à ce qu’il soit de nouveau activé.', 'quota_warning' => 'Votre quota d’espace disque est dépassé de [bytes]. Veuillez supprimer des documents ou d\'anciennes versions.', 'receipts_accepted' => '[no_receipts] réceptions déjà confirmées', -'receipts_accepted_latest' => '', +'receipts_accepted_latest' => '(dont [no_receipts] dans la dernière version)', 'receipts_not_touched' => '[no_receipts] réceptions non amorcées', -'receipts_not_touched_latest' => '', +'receipts_not_touched_latest' => '(dont [no_receipts] dans la dernière version)', 'receipts_rejected' => '[no_receipts] réceptions déjà rejetées', -'receipts_rejected_latest' => '', +'receipts_rejected_latest' => '(dont [no_receipts] dans la dernière version)', 'receipts_without_group' => 'Réceptions sans groupe', 'receipts_without_user' => 'Réceptions sans utilisateur', 'receipt_deletion_email_body' => 'L’utilisateur a été retiré de la liste des destinataires @@ -1030,7 +1044,7 @@ Dossier parent : [folder_path] Utilisateur : [username] URL : [url]', 'request_workflow_action_email_subject' => '[sitename] : [name] - Action de Workflow requise', -'reset_checkout' => '', +'reset_checkout' => 'Terminer la vérification', 'restrict_access' => 'Pas d\'accès', 'results_page' => 'Page de résultats', 'return_from_subworkflow' => 'Revenir du sous-workflow', @@ -1048,11 +1062,11 @@ URL : [url]', 'reviewer_already_assigned' => 'est déjà déclaré en tant qu’examinateur', 'reviewer_already_removed' => 'L’examinateur a déjà été retiré du processus de vérification ou a déjà soumis la vérification.', 'reviews_accepted' => '[no_reviews] vérifications déjà confirmées', -'reviews_accepted_latest' => '', +'reviews_accepted_latest' => '(dont [no_reviews] dans la dernière version)', 'reviews_not_touched' => '[no_reviews] vérifications non amorcées', -'reviews_not_touched_latest' => '', +'reviews_not_touched_latest' => '(dont [no_reviews] dans la dernière version)', 'reviews_rejected' => '[no_reviews] vérifications déjà rejetées', -'reviews_rejected_latest' => '', +'reviews_rejected_latest' => '(dont [no_reviews] dans la dernière version)', 'reviews_without_group' => 'Vérifications sans groupe', 'reviews_without_user' => 'Vérifications sans utilisateur', 'review_deletion_email' => 'Demande de vérification supprimée', @@ -1090,13 +1104,13 @@ URL : [url]', 'revise_document' => 'Réviser le document', 'revise_document_on' => 'Prochaine révision de la version du document le [date]', 'revisions_accepted' => '[no_revisions] révisions déjà confirmées', -'revisions_accepted_latest' => '', +'revisions_accepted_latest' => '(dont [no_revisions] dans la dernière version)', 'revisions_not_touched' => '[no_revisions] révisions non amorcées', -'revisions_not_touched_latest' => '', +'revisions_not_touched_latest' => '(dont [no_revisions] dans la dernière version)', 'revisions_pending' => '[no_revisions] révisions à venir en attente', -'revisions_pending_latest' => '', +'revisions_pending_latest' => '(dont [no_revisions] dans la dernière version)', 'revisions_rejected' => '[no_revisions] révisions déjà rejetées', -'revisions_rejected_latest' => '', +'revisions_rejected_latest' => '(dont [no_revisions] dans la dernière version)', 'revisions_without_group' => 'Révisions sans groupe', 'revisions_without_user' => 'Révisions sans utilisateur', 'revision_date' => 'Date de révision', @@ -1109,14 +1123,21 @@ Utilisateur : [username] URL : [url]', 'revision_request_email_subject' => '[sitename] : [name] - Demande de révision', 'revision_status' => 'État', -'revision_submit_email_body' => '', -'revision_submit_email_subject' => '', +'revision_submit_email_body' => 'Publié à nouveau +Document : [name] +Version : [version] +Dossier parent : [folder_path] +Statut : [status] +Commentaire : [comment] +Utilisateur : [username] +URL : [url]', +'revision_submit_email_subject' => '[sitename] : [name] - Publié à nouveau', 'revision_summary' => 'Récapitulatif révision', 'revisors' => 'Réviseurs', 'revisor_already_assigned' => 'L’utilisateur est déjà attribué en tant que réviseur.', 'revisor_already_removed' => 'Le réviseur a déjà été retiré du processus de révision ou a déjà révisé le document.', 'rewind_workflow' => 'Remonter le workflow', -'rewind_workflow_email_body' => '', +'rewind_workflow_email_body' => 'Le workflow a été reculé', 'rewind_workflow_email_subject' => '[sitename]: [name] - Le workflow a été réinitialisé', 'rewind_workflow_warning' => 'Si vous remonter à l\'état initial du workflow, le log de workflow de ce document sera supprimé et impossible à récupérer.', 'rm_attrdef' => 'Supprimer la définition d’attribut', @@ -1163,10 +1184,10 @@ URL : [url]', 'saturday' => 'Samedi', 'saturday_abbr' => 'Sam.', 'save' => 'Enregistrer', -'scheduler_class' => '', -'scheduler_class_description' => '', -'scheduler_class_parameter' => '', -'scheduler_class_tasks' => '', +'scheduler_class' => 'Classe', +'scheduler_class_description' => 'Description', +'scheduler_class_parameter' => 'Paramètre', +'scheduler_class_tasks' => 'Tâches de la classe', 'scheduler_task_mgr' => 'Planificateur', 'search' => 'Recherche', 'search_fulltext' => 'Rechercher dans le texte', @@ -1238,8 +1259,8 @@ Nom : [username] 'settings_Advanced' => 'Avancé', 'settings_advancedAcl' => 'Contrôle d’accès avancé', 'settings_advancedAcl_desc' => 'Le contrôle d’accès avancé permet d’activer/désactiver certains modules du logiciel. Il ne peut pas être utilisé pour les droits d’accès sur les documents et dossiers.', -'settings_allowChangeRevAppInProcess' => '', -'settings_allowChangeRevAppInProcess_desc' => '', +'settings_allowChangeRevAppInProcess' => 'Autoriser le changement de réviseurs / approbateurs après le début du processus', +'settings_allowChangeRevAppInProcess_desc' => 'Par défaut, les réviseurs et les approbateurs ne peuvent plus être modifiés une fois la soumission d’un examen ou d’une approbation. Cette option permettra aux administrateurs de le faire tant que le document n’est pas publié ou rejeté.', 'settings_allowReviewerOnly' => 'Permettre d’affecter l’examinateur uniquement', 'settings_allowReviewerOnly_desc' => 'Activer cette option pour permettre d’affecter un examinateur mais pas d’approbateur dans le mode de Workflow traditionnel.', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', @@ -1256,8 +1277,8 @@ Nom : [username] 'settings_calendarDefaultView' => 'Vue par défaut de l\'agenda', 'settings_calendarDefaultView_desc' => 'Vue par défaut de l\'agenda', 'settings_cannot_disable' => 'Le fichier ENABLE_INSTALL_TOOL ne peut pas être supprimé', -'settings_checkOutDir' => '', -'settings_checkOutDir_desc' => '', +'settings_checkOutDir' => 'Répertoire pour les documents vérifiés', +'settings_checkOutDir_desc' => 'Il s’agit du répertoire dans lequel le dernier contenu d’un document est copié si le document est vérifié. Si vous rendez ce répertoire accessible aux utilisateurs, ils peuvent modifier le fichier et le refaire vérifier une fois terminé.', 'settings_cmdTimeout' => 'Délai d\'expiration pour les commandes externes', 'settings_cmdTimeout_desc' => 'Cette durée en secondes détermine quand une commande externe (par exemple pour la création de l\'index de texte intégral) sera terminée.', 'settings_contentDir' => 'Répertoire du contenu', @@ -1333,8 +1354,8 @@ Nom : [username] 'settings_enableDuplicateSubFolderNames_desc' => 'Autorise plusieurs sous-dossiers de même nom dans un dossier.', 'settings_enableEmail' => 'E-mails', 'settings_enableEmail_desc' => 'Active/désactive la notification automatique par e-mail', -'settings_enableFilterReceipt' => '', -'settings_enableFilterReceipt_desc' => '', +'settings_enableFilterReceipt' => 'Éliminer des propriétaires, examinateurs… d’une liste de destinataires', +'settings_enableFilterReceipt_desc' => 'Activez cette option pour éliminer certains destinataires d’une liste s’ils sont entrés en tant que membres d’un groupe.', 'settings_enableFolderTree' => 'Activer l\'arborescence des dossiers', 'settings_enableFolderTree_desc' => 'Active/désactive l’arborescence des dossiers sur la page de consultation d’un dossier', 'settings_enableFullSearch' => 'Activer la recherche plein texte', @@ -1372,13 +1393,13 @@ Nom : [username] 'settings_enableRecursiveCount' => 'Décompte récursif des documents/dossiers', 'settings_enableRecursiveCount_desc' => 'Si activé, le nombre de documents et répertoires dans un répertoire est calculé en comptant récursivement le contenu des sous-répertoires auxquels l\'utilisateur a accès.', 'settings_enableRevisionOneVoteReject' => 'Rejet par un réviseur', -'settings_enableRevisionOneVoteReject_desc' => '', +'settings_enableRevisionOneVoteReject_desc' => 'Si cette option est activée, le statut du document sera défini sur « nécessite une correction » une fois que le premier réviseur a rejeté le document. Si elle est désactivée, le statut du document ne changera pas jusqu’à ce que tous les réviseurs aient terminé leur révision.', 'settings_enableRevisionOnVoteReject' => '', 'settings_enableRevisionOnVoteReject_desc' => '', 'settings_enableRevisionWorkflow' => 'Activer la révision des documents', 'settings_enableRevisionWorkflow_desc' => 'Activer afin de pouvoir lancer un flux de travail pour réviser un document après une période donnée.', -'settings_enableSelfReceipt' => '', -'settings_enableSelfReceipt_desc' => '', +'settings_enableSelfReceipt' => 'Permettre la réception de documents par l’utilisateur connecté', +'settings_enableSelfReceipt_desc' => 'Activez cette option si vous souhaitez que l’utilisateur actuellement connecté puisse être sélectionné comme destinataire du document.', 'settings_enableSelfRevApp' => 'Autoriser vérification/approbation par l’utilisateur actuel', 'settings_enableSelfRevApp_desc' => 'Activer cette option pour ajouter l’utilisateur actuel à la liste des examinateurs/approbateurs et pour les transitions de workflow.', 'settings_enableSessionList' => 'Activer la liste des utilisateurs en ligne', @@ -1811,7 +1832,7 @@ URL : [url]', 'tuesday' => 'Mardi', 'tuesday_abbr' => 'Mar.', 'type_of_hook' => '', -'type_to_filter' => '', +'type_to_filter' => 'Filtrer dans la liste', 'type_to_search' => 'Effectuer une recherche', 'uk_UA' => 'Ukrénien', 'under_folder' => 'Dans le dossier', @@ -1824,8 +1845,8 @@ URL : [url]', 'unknown_owner' => 'Identifiant de propriétaire inconnu', 'unknown_user' => 'Identifiant d\'utilisateur inconnu', 'unlinked_content' => 'Contenu non lié', -'unlinked_documents' => '', -'unlinked_folders' => '', +'unlinked_documents' => 'Documents non liés', +'unlinked_folders' => 'Dossiers non liés', 'unlinking_objects' => 'Déliage du contenu', 'unlock_cause_access_mode_all' => 'Vous pouvez encore le mettre à jour, car vous avez les droits d\'accès "tout". Le verrouillage sera automatiquement annulé.', 'unlock_cause_locking_user' => 'Vous pouvez encore le mettre à jour, car vous êtes le seul à l\'avoir verrouillé. Le verrouillage sera automatiquement annulé.', @@ -1867,7 +1888,7 @@ URL : [url]', 'versioning_file_creation' => 'Créer les fichiers de versionnage', 'versioning_file_creation_warning' => 'Cette opération permet de créer, pour chaque document, un fichier texte contenant les informations générales et l’historique des versions du document. Chaque fichier sera enregistré dans le répertoire du document. Ces fichiers ne sont pas nécessaires au bon fonctionnement de SeedDMS, mais ils peuvent être utiles en cas de transfert des fichiers vers un autre système.', 'versioning_info' => 'Versions', -'versiontolow' => '', +'versiontolow' => 'Version antérieure', 'version_comment' => 'Commentaire de la version', 'version_deleted_email' => 'Version supprimée', 'version_deleted_email_body' => 'Version supprimée @@ -1895,14 +1916,14 @@ URL: [url]', 'workflow_has_cycle' => 'Le workflow a une boucle', 'workflow_initstate' => 'Etat initial', 'workflow_in_use' => 'Ce workflow est actuellement utilisé par des documents.', -'workflow_layoutdata_saved' => '', +'workflow_layoutdata_saved' => 'Données de mise en page enregistrées', 'workflow_management' => 'Gestion des workflows', 'workflow_name' => 'Nom', 'workflow_no_doc_rejected_state' => 'L’état « rejeté » n’a été défini sur aucune action !', 'workflow_no_doc_released_state' => 'L’état « publié » n’a été défini sur aucune action !', 'workflow_no_initial_state' => 'Aucune transition ne débute par l’état initial défini pour ce workflow !', 'workflow_no_states' => 'Vous devez d\'abord définir des états de workflow avant d\'ajouter un workflow.', -'workflow_save_layout' => '', +'workflow_save_layout' => 'Enregistrer la mise en page', 'workflow_state' => 'État de workflow', 'workflow_states_management' => 'Gestion des états de workflow', 'workflow_state_docstatus' => 'Etat du document', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index 0c9ef8444..94690bcd0 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -427,7 +427,21 @@ Internet poveznica: [url]', 'does_not_inherit_access_msg' => 'Naslijedi nivo pristupa', 'download' => 'Preuzimanje', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Popravi sve mape i dokumente.', 'do_object_setchecksum' => 'Postavi kontrolnu sumu', 'do_object_setfilesize' => 'Postavi veličinu datoteke', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 2b8b6e467..3069755be 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -422,7 +422,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Hozzáférés öröklése', 'download' => 'Letöltés', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Valamennyi mappa és dokumentum helyreállítása.', 'do_object_setchecksum' => 'Ellenőrző összeg beállítása', 'do_object_setfilesize' => 'Állomány méret beállítása', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 12c684224..0bbd9dd3c 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -432,7 +432,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Imposta permessi ereditari', 'download' => 'Scarica', 'download_extension' => 'Scarica estensione come file zip', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'Collegamenti di scaricamento', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Ripara tutte le cartelle e i documenti.', 'do_object_setchecksum' => 'Imposta il checksum', 'do_object_setfilesize' => 'Imposta la dimensione del file', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index 76e25b4d3..b38ace664 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -428,7 +428,21 @@ URL: [url]', 'does_not_inherit_access_msg' => '액세스 상속', 'download' => '내려받기', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => '모든 폴더와 문서를 복구', 'do_object_setchecksum' => '오류 검사', 'do_object_setfilesize' => '파일 크기 설정', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index 80789272a..110499df6 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -425,7 +425,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'ໄດ້ຮັບສິດການເຂົ້າເຖິງ', 'download' => 'ດາວໂຫລດ', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'ດາວໂຫລດລິ້ງ', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'ສ້ອມແຊມໂຟລເດີ ແລະເອກະສານທັງໝົດ', 'do_object_setchecksum' => 'ຕັ້ງຄ່າການກວດສອບ', 'do_object_setfilesize' => 'ຕັ້ງຂະໜາດຟາຍ', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index 1e16ffe6e..a3f6fd1e2 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -439,7 +439,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Arvet ikke tilhørlighet', 'download' => 'Last ned', 'download_extension' => 'Last ned utvidelse som zip-fil', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'Nedlastings link', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Reparere alle mapper og dokumenter.', 'do_object_setchecksum' => 'Legg til checksum', 'do_object_setfilesize' => 'Angi filstørrelse', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 2985be9ef..19813d935 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -420,7 +420,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Erft toegang', 'download' => 'Download', 'download_extension' => 'Download extensie als zip file', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'Download-links', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Repareer alle mappen en documenten.', 'do_object_setchecksum' => 'Set checksum', 'do_object_setfilesize' => 'Voer bestandgrootte in', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 7ca6b1c47..ffe6745e3 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -415,7 +415,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Dziedzicz dostęp', 'download' => 'Pobierz', 'download_extension' => 'Pobierz rozszerzenie w pliku zip', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Napraw wszystkie katalogi i pliki.', 'do_object_setchecksum' => 'Ustaw sumę kontrolną', 'do_object_setfilesize' => 'Podaj rozmiar pliku', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 011f6fd25..684ae8ea2 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -439,7 +439,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Herdar acesso', 'download' => 'Download', 'download_extension' => 'Baixar extensão como arquivo zip', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'Links para download', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Reparar todas as pastas e documentos.', 'do_object_setchecksum' => 'Defina soma de verificação', 'do_object_setfilesize' => 'Defina o tamanho do arquivo', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index f7c5afce2..154436e38 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -427,7 +427,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Acces moștenit', 'download' => 'Descarca', 'download_extension' => 'Descarca extensia ca fisier zip', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Repară toate folderele și documentele.', 'do_object_setchecksum' => 'Setare sumă de control(checksum)', 'do_object_setfilesize' => 'Setare dimensiune fișier', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 76befd188..bfd407f93 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -427,7 +427,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Наследовать уровень доступа', 'download' => 'Загрузить', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Исправить все каталоги и документы', 'do_object_setchecksum' => 'Установить контрольную сумму', 'do_object_setfilesize' => 'Установить размер файла', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index fd6e447c2..688317ffc 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -439,7 +439,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Zdediť prístup', 'download' => 'Stiahnuť', 'download_extension' => 'Download extension as zip file', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'Odkazy na stiahnutie', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Opraviť všetky zložky a dokumenty.', 'do_object_setchecksum' => 'Nastaviť kontrolný súčet', 'do_object_setfilesize' => 'Nastaviť veľkosť súboru', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 0f7a42e49..51845b3f6 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -433,7 +433,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Ärv behörighet', 'download' => 'Ladda ner', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => 'Nedladdningslänkar', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Reparera alla kataloger och dokument.', 'do_object_setchecksum' => 'Lägg till checksumma', 'do_object_setfilesize' => 'Ange filstorlek', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index b1cc8b6f2..0b94bbeeb 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -421,7 +421,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Erişim haklarını devir al', 'download' => 'İndir', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Tüm klasörleri ve dokümanları onar.', 'do_object_setchecksum' => 'Sağlama (checksum) ayarla', 'do_object_setfilesize' => 'Dosya boyutu ayarla', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 29567c05e..a2e6c61cc 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -427,7 +427,21 @@ URL: [url]', 'does_not_inherit_access_msg' => 'Наслідувати рівень доступу', 'download' => 'Завантажити', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => 'Виправити всі каталоги і документи', 'do_object_setchecksum' => 'Встановити контрольну суму', 'do_object_setfilesize' => 'Встановити розмір файлу', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index c47b99f62..b69132580 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -421,7 +421,21 @@ URL: [url]', 'does_not_inherit_access_msg' => '继承访问权限', 'download' => '下载', 'download_extension' => '以ZIP格式下载扩展', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '下载链接', +'do_no_transfer_to_user' => '', 'do_object_repair' => '', 'do_object_setchecksum' => '', 'do_object_setfilesize' => '设置文件大小', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index a36432854..20507f490 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -372,7 +372,21 @@ URL: [url]', 'does_not_inherit_access_msg' => '繼承存取權限', 'download' => '下載', 'download_extension' => '', +'download_header_approval_comment' => '', +'download_header_approval_date' => '', +'download_header_approval_state' => '', +'download_header_approver' => '', +'download_header_document_name' => '', +'download_header_document_no' => '', +'download_header_filename' => '', +'download_header_internal_version' => '', +'download_header_reviewer' => '', +'download_header_review_comment' => '', +'download_header_review_date' => '', +'download_header_review_state' => '', +'download_header_status' => '', 'download_links' => '', +'do_no_transfer_to_user' => '', 'do_object_repair' => '', 'do_object_setchecksum' => '', 'do_object_setfilesize' => '設定檔案大小', From 2e58a9324f1e56f7b45d22a2fe56dd77e9ad96f9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Apr 2020 08:25:00 +0200 Subject: [PATCH 09/33] fix arcordeon for folder parameters --- views/bootstrap/class.Search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 045dc900d..4105c51d8 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -317,11 +317,11 @@ $(document).ready( function() {
-
+
From 4538858561803e3af4ba8d3756d8ea6735a08212 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Apr 2020 08:25:50 +0200 Subject: [PATCH 10/33] new entry for 6.0.9 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index ad76c3db2..d37e3677d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ - processes of users can be deleted again, instead of only transfered to another user - fix export of search results, headers of excel file can be translated +- fix arcordeon for folder filters on search page -------------------------------------------------------------------------------- Changes in version 6.0.8 From 5d1d406cc10582e989071371bb9c5cdf625335c1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Apr 2020 08:46:00 +0200 Subject: [PATCH 11/33] take out empty opition for owner in fulltext search form --- views/bootstrap/class.Search.php | 1 - 1 file changed, 1 deletion(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 4105c51d8..2adabd5ea 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -511,7 +511,6 @@ $(document).ready( function() { "; $total += $item['total']; } + echo ""; break; case 'docsaccumulated': foreach($data as $item) { echo ""; $total += $item['total']; } + echo ""; + break; + case 'sizeperuser': + foreach($data as $item) { + echo ""; + $total += $item['total']; + } + echo ""; break; } - echo ""; echo "
: ' + + ' spellcheck="false" role="searchbox" aria-autocomplete="list" />' + '' ); @@ -1955,14 +2000,18 @@ S2.define('select2/selection/search',[ Search.prototype.bind = function (decorated, container, $container) { var self = this; + var resultsId = container.id + '-results'; + decorated.call(this, container, $container); container.on('open', function () { + self.$search.attr('aria-controls', resultsId); self.$search.trigger('focus'); }); container.on('close', function () { self.$search.val(''); + self.$search.removeAttr('aria-controls'); self.$search.removeAttr('aria-activedescendant'); self.$search.trigger('focus'); }); @@ -1982,7 +2031,11 @@ S2.define('select2/selection/search',[ }); container.on('results:focus', function (params) { - self.$search.attr('aria-activedescendant', params.id); + if (params.data._resultId) { + self.$search.attr('aria-activedescendant', params.data._resultId); + } else { + self.$search.removeAttr('aria-activedescendant'); + } }); this.$selection.on('focusin', '.select2-search--inline', function (evt) { @@ -2016,6 +2069,12 @@ S2.define('select2/selection/search',[ } }); + this.$selection.on('click', '.select2-search--inline', function (evt) { + if (self.$search.val()) { + evt.stopPropagation(); + } + }); + // Try to detect the IE version should the `documentMode` property that // is stored on the document. This is only implemented in IE and is // slightly cleaner than doing a user agent check. @@ -2101,13 +2160,7 @@ S2.define('select2/selection/search',[ this.resizeSearch(); if (searchHadFocus) { - var isTagInput = this.$element.find('[data-select2-tag]').length; - if (isTagInput) { - // fix IE11 bug where tag input lost focus - this.$element.focus(); - } else { - this.$search.focus(); - } + this.$search.trigger('focus'); } }; @@ -2140,7 +2193,7 @@ S2.define('select2/selection/search',[ var width = ''; if (this.$search.attr('placeholder') !== '') { - width = this.$selection.find('.select2-selection__rendered').innerWidth(); + width = this.$selection.find('.select2-selection__rendered').width(); } else { var minimumWidth = this.$search.val().length + 1; @@ -2503,6 +2556,7 @@ S2.define('select2/diacritics',[ '\u019F': 'O', '\uA74A': 'O', '\uA74C': 'O', + '\u0152': 'OE', '\u01A2': 'OI', '\uA74E': 'OO', '\u0222': 'OU', @@ -2912,6 +2966,7 @@ S2.define('select2/diacritics',[ '\uA74B': 'o', '\uA74D': 'o', '\u0275': 'o', + '\u0153': 'oe', '\u01A3': 'oi', '\u0223': 'ou', '\uA74F': 'oo', @@ -3080,8 +3135,9 @@ S2.define('select2/diacritics',[ '\u03CD': '\u03C5', '\u03CB': '\u03C5', '\u03B0': '\u03C5', - '\u03C9': '\u03C9', - '\u03C2': '\u03C3' + '\u03CE': '\u03C9', + '\u03C2': '\u03C3', + '\u2019': '\'' }; return diacritics; @@ -3166,7 +3222,7 @@ S2.define('select2/data/select',[ if ($(data.element).is('option')) { data.element.selected = true; - this.$element.trigger('change'); + this.$element.trigger('input').trigger('change'); return; } @@ -3187,13 +3243,13 @@ S2.define('select2/data/select',[ } self.$element.val(val); - self.$element.trigger('change'); + self.$element.trigger('input').trigger('change'); }); } else { var val = data.id; this.$element.val(val); - this.$element.trigger('change'); + this.$element.trigger('input').trigger('change'); } }; @@ -3209,7 +3265,7 @@ S2.define('select2/data/select',[ if ($(data.element).is('option')) { data.element.selected = false; - this.$element.trigger('change'); + this.$element.trigger('input').trigger('change'); return; } @@ -3227,7 +3283,7 @@ S2.define('select2/data/select',[ self.$element.val(val); - self.$element.trigger('change'); + self.$element.trigger('input').trigger('change'); }); }; @@ -3420,15 +3476,19 @@ S2.define('select2/data/array',[ 'jquery' ], function (SelectAdapter, Utils, $) { function ArrayAdapter ($element, options) { - var data = options.get('data') || []; + this._dataToConvert = options.get('data') || []; ArrayAdapter.__super__.constructor.call(this, $element, options); - - this.addOptions(this.convertToOptions(data)); } Utils.Extend(ArrayAdapter, SelectAdapter); + ArrayAdapter.prototype.bind = function (container, $container) { + ArrayAdapter.__super__.bind.call(this, container, $container); + + this.addOptions(this.convertToOptions(this._dataToConvert)); + }; + ArrayAdapter.prototype.select = function (data) { var $option = this.$element.find('option').filter(function (i, elm) { return elm.value == data.id.toString(); @@ -3718,8 +3778,6 @@ S2.define('select2/data/tags',[ }; Tags.prototype._removeOldTags = function (_) { - var tag = this._lastTag; - var $options = this.$element.find('option[data-select2-tag]'); $options.each(function () { @@ -3794,7 +3852,7 @@ S2.define('select2/data/tokenizer',[ // Replace the search term if we have the search box if (this.$search.length) { this.$search.val(tokenData.term); - this.$search.focus(); + this.$search.trigger('focus'); } params.term = tokenData.term; @@ -3923,10 +3981,30 @@ S2.define('select2/data/maximumSelectionLength',[ decorated.call(this, $e, options); } + MaximumSelectionLength.prototype.bind = + function (decorated, container, $container) { + var self = this; + + decorated.call(this, container, $container); + + container.on('select', function () { + self._checkIfMaximumSelected(); + }); + }; + MaximumSelectionLength.prototype.query = function (decorated, params, callback) { var self = this; + this._checkIfMaximumSelected(function () { + decorated.call(self, params, callback); + }); + }; + + MaximumSelectionLength.prototype._checkIfMaximumSelected = + function (_, successCallback) { + var self = this; + this.current(function (currentData) { var count = currentData != null ? currentData.length : 0; if (self.maximumSelectionLength > 0 && @@ -3939,7 +4017,10 @@ S2.define('select2/data/maximumSelectionLength',[ }); return; } - decorated.call(self, params, callback); + + if (successCallback) { + successCallback(); + } }); }; @@ -3978,7 +4059,7 @@ S2.define('select2/dropdown',[ }; Dropdown.prototype.position = function ($dropdown, $container) { - // Should be implmented in subclasses + // Should be implemented in subclasses }; Dropdown.prototype.destroy = function () { @@ -4002,7 +4083,7 @@ S2.define('select2/dropdown/search',[ '' + '' + + ' spellcheck="false" role="searchbox" aria-autocomplete="list" />' + '' ); @@ -4017,6 +4098,8 @@ S2.define('select2/dropdown/search',[ Search.prototype.bind = function (decorated, container, $container) { var self = this; + var resultsId = container.id + '-results'; + decorated.call(this, container, $container); this.$search.on('keydown', function (evt) { @@ -4039,24 +4122,27 @@ S2.define('select2/dropdown/search',[ container.on('open', function () { self.$search.attr('tabindex', 0); + self.$search.attr('aria-controls', resultsId); - self.$search.focus(); + self.$search.trigger('focus'); window.setTimeout(function () { - self.$search.focus(); + self.$search.trigger('focus'); }, 0); }); container.on('close', function () { self.$search.attr('tabindex', -1); + self.$search.removeAttr('aria-controls'); + self.$search.removeAttr('aria-activedescendant'); self.$search.val(''); - self.$search.blur(); + self.$search.trigger('blur'); }); container.on('focus', function () { if (!container.isOpen()) { - self.$search.focus(); + self.$search.trigger('focus'); } }); @@ -4071,6 +4157,14 @@ S2.define('select2/dropdown/search',[ } } }); + + container.on('results:focus', function (params) { + if (params.data._resultId) { + self.$search.attr('aria-activedescendant', params.data._resultId); + } else { + self.$search.removeAttr('aria-activedescendant'); + } + }); }; Search.prototype.handleSearch = function (evt) { @@ -4155,6 +4249,7 @@ S2.define('select2/dropdown/infiniteScroll',[ if (this.showLoadingMore(data)) { this.$results.append(this.$loadingMore); + this.loadMoreIfNeeded(); } }; @@ -4173,25 +4268,27 @@ S2.define('select2/dropdown/infiniteScroll',[ self.loading = true; }); - this.$results.on('scroll', function () { - var isLoadMoreVisible = $.contains( - document.documentElement, - self.$loadingMore[0] - ); + this.$results.on('scroll', this.loadMoreIfNeeded.bind(this)); + }; - if (self.loading || !isLoadMoreVisible) { - return; - } + InfiniteScroll.prototype.loadMoreIfNeeded = function () { + var isLoadMoreVisible = $.contains( + document.documentElement, + this.$loadingMore[0] + ); - var currentOffset = self.$results.offset().top + - self.$results.outerHeight(false); - var loadingMoreOffset = self.$loadingMore.offset().top + - self.$loadingMore.outerHeight(false); + if (this.loading || !isLoadMoreVisible) { + return; + } - if (currentOffset + 50 >= loadingMoreOffset) { - self.loadMore(); - } - }); + var currentOffset = this.$results.offset().top + + this.$results.outerHeight(false); + var loadingMoreOffset = this.$loadingMore.offset().top + + this.$loadingMore.outerHeight(false); + + if (currentOffset + 50 >= loadingMoreOffset) { + this.loadMore(); + } }; InfiniteScroll.prototype.loadMore = function () { @@ -4212,7 +4309,7 @@ S2.define('select2/dropdown/infiniteScroll',[ var $option = $( '
  • ' + 'role="option" aria-disabled="true">' ); var message = this.options.get('translations').get('loadingMore'); @@ -4230,7 +4327,7 @@ S2.define('select2/dropdown/attachBody',[ '../utils' ], function ($, Utils) { function AttachBody (decorated, $element, options) { - this.$dropdownParent = options.get('dropdownParent') || $(document.body); + this.$dropdownParent = $(options.get('dropdownParent') || document.body); decorated.call(this, $element, options); } @@ -4238,27 +4335,14 @@ S2.define('select2/dropdown/attachBody',[ AttachBody.prototype.bind = function (decorated, container, $container) { var self = this; - var setupResultsEvents = false; - decorated.call(this, container, $container); container.on('open', function () { self._showDropdown(); self._attachPositioningHandler(container); - if (!setupResultsEvents) { - setupResultsEvents = true; - - container.on('results:all', function () { - self._positionDropdown(); - self._resizeDropdown(); - }); - - container.on('results:append', function () { - self._positionDropdown(); - self._resizeDropdown(); - }); - } + // Must bind after the results handlers to ensure correct sizing + self._bindContainerResultHandlers(container); }); container.on('close', function () { @@ -4307,6 +4391,44 @@ S2.define('select2/dropdown/attachBody',[ this.$dropdownContainer.detach(); }; + AttachBody.prototype._bindContainerResultHandlers = + function (decorated, container) { + + // These should only be bound once + if (this._containerResultsHandlersBound) { + return; + } + + var self = this; + + container.on('results:all', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + container.on('results:append', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + container.on('results:message', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + container.on('select', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + container.on('unselect', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + this._containerResultsHandlersBound = true; + }; + AttachBody.prototype._attachPositioningHandler = function (decorated, container) { var self = this; @@ -4383,16 +4505,26 @@ S2.define('select2/dropdown/attachBody',[ top: container.bottom }; - // Determine what the parent element is to use for calciulating the offset + // Determine what the parent element is to use for calculating the offset var $offsetParent = this.$dropdownParent; - // For statically positoned elements, we need to get the element + // For statically positioned elements, we need to get the element // that is determining the offset if ($offsetParent.css('position') === 'static') { $offsetParent = $offsetParent.offsetParent(); } - var parentOffset = $offsetParent.offset(); + var parentOffset = { + top: 0, + left: 0 + }; + + if ( + $.contains(document.body, $offsetParent[0]) || + $offsetParent[0].isConnected + ) { + parentOffset = $offsetParent.offset(); + } css.top -= parentOffset.top; css.left -= parentOffset.left; @@ -4562,7 +4694,7 @@ S2.define('select2/dropdown/closeOnSelect',[ var originalEvent = evt.originalEvent; // Don't close if the control key is being held - if (originalEvent && originalEvent.ctrlKey) { + if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) { return; } @@ -4616,6 +4748,9 @@ S2.define('select2/i18n/en',[],function () { }, searching: function () { return 'Searching…'; + }, + removeAllItems: function () { + return 'Remove all items'; } }; }); @@ -4854,66 +4989,29 @@ S2.define('select2/defaults',[ ); } - if (typeof options.language === 'string') { - // Check if the language is specified with a region - if (options.language.indexOf('-') > 0) { - // Extract the region information if it is included - var languageParts = options.language.split('-'); - var baseLanguage = languageParts[0]; + // If the defaults were not previously applied from an element, it is + // possible for the language option to have not been resolved + options.language = this._resolveLanguage(options.language); - options.language = [options.language, baseLanguage]; - } else { - options.language = [options.language]; + // Always fall back to English since it will always be complete + options.language.push('en'); + + var uniqueLanguages = []; + + for (var l = 0; l < options.language.length; l++) { + var language = options.language[l]; + + if (uniqueLanguages.indexOf(language) === -1) { + uniqueLanguages.push(language); } } - if ($.isArray(options.language)) { - var languages = new Translation(); - options.language.push('en'); + options.language = uniqueLanguages; - var languageNames = options.language; - - for (var l = 0; l < languageNames.length; l++) { - var name = languageNames[l]; - var language = {}; - - try { - // Try to load it with the original name - language = Translation.loadPath(name); - } catch (e) { - try { - // If we couldn't load it, check if it wasn't the full path - name = this.defaults.amdLanguageBase + name; - language = Translation.loadPath(name); - } catch (ex) { - // The translation could not be loaded at all. Sometimes this is - // because of a configuration problem, other times this can be - // because of how Select2 helps load all possible translation files. - if (options.debug && window.console && console.warn) { - console.warn( - 'Select2: The language file for "' + name + '" could not be ' + - 'automatically loaded. A fallback will be used instead.' - ); - } - - continue; - } - } - - languages.extend(language); - } - - options.translations = languages; - } else { - var baseTranslation = Translation.loadPath( - this.defaults.amdLanguageBase + 'en' - ); - var customTranslation = new Translation(options.language); - - customTranslation.extend(baseTranslation); - - options.translations = customTranslation; - } + options.translations = this._processTranslations( + options.language, + options.debug + ); return options; }; @@ -4980,13 +5078,14 @@ S2.define('select2/defaults',[ debug: false, dropdownAutoWidth: false, escapeMarkup: Utils.escapeMarkup, - language: EnglishTranslation, + language: {}, matcher: matcher, minimumInputLength: 0, maximumInputLength: 0, maximumSelectionLength: 0, minimumResultsForSearch: 0, selectOnClose: false, + scrollAfterSelect: false, sorter: function (data) { return data; }, @@ -5001,6 +5100,103 @@ S2.define('select2/defaults',[ }; }; + Defaults.prototype.applyFromElement = function (options, $element) { + var optionLanguage = options.language; + var defaultLanguage = this.defaults.language; + var elementLanguage = $element.prop('lang'); + var parentLanguage = $element.closest('[lang]').prop('lang'); + + var languages = Array.prototype.concat.call( + this._resolveLanguage(elementLanguage), + this._resolveLanguage(optionLanguage), + this._resolveLanguage(defaultLanguage), + this._resolveLanguage(parentLanguage) + ); + + options.language = languages; + + return options; + }; + + Defaults.prototype._resolveLanguage = function (language) { + if (!language) { + return []; + } + + if ($.isEmptyObject(language)) { + return []; + } + + if ($.isPlainObject(language)) { + return [language]; + } + + var languages; + + if (!$.isArray(language)) { + languages = [language]; + } else { + languages = language; + } + + var resolvedLanguages = []; + + for (var l = 0; l < languages.length; l++) { + resolvedLanguages.push(languages[l]); + + if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) { + // Extract the region information if it is included + var languageParts = languages[l].split('-'); + var baseLanguage = languageParts[0]; + + resolvedLanguages.push(baseLanguage); + } + } + + return resolvedLanguages; + }; + + Defaults.prototype._processTranslations = function (languages, debug) { + var translations = new Translation(); + + for (var l = 0; l < languages.length; l++) { + var languageData = new Translation(); + + var language = languages[l]; + + if (typeof language === 'string') { + try { + // Try to load it with the original name + languageData = Translation.loadPath(language); + } catch (e) { + try { + // If we couldn't load it, check if it wasn't the full path + language = this.defaults.amdLanguageBase + language; + languageData = Translation.loadPath(language); + } catch (ex) { + // The translation could not be loaded at all. Sometimes this is + // because of a configuration problem, other times this can be + // because of how Select2 helps load all possible translation files + if (debug && window.console && console.warn) { + console.warn( + 'Select2: The language file for "' + language + '" could ' + + 'not be automatically loaded. A fallback will be used instead.' + ); + } + } + } + } else if ($.isPlainObject(language)) { + languageData = new Translation(language); + } else { + languageData = language; + } + + translations.extend(languageData); + } + + return translations; + }; + Defaults.prototype.set = function (key, value) { var camelKey = $.camelCase(key); @@ -5030,6 +5226,10 @@ S2.define('select2/options',[ this.fromElement($element); } + if ($element != null) { + this.options = Defaults.applyFromElement(this.options, $element); + } + this.options = Defaults.apply(this.options); if ($element && $element.is('input')) { @@ -5053,14 +5253,6 @@ S2.define('select2/options',[ this.options.disabled = $e.prop('disabled'); } - if (this.options.language == null) { - if ($e.prop('lang')) { - this.options.language = $e.prop('lang').toLowerCase(); - } else if ($e.closest('[lang]').prop('lang')) { - this.options.language = $e.closest('[lang]').prop('lang'); - } - } - if (this.options.dir == null) { if ($e.prop('dir')) { this.options.dir = $e.prop('dir'); @@ -5098,20 +5290,43 @@ S2.define('select2/options',[ $e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl')); Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl')); - } var dataset = {}; + function upperCaseLetter(_, letter) { + return letter.toUpperCase(); + } + + // Pre-load all of the attributes which are prefixed with `data-` + for (var attr = 0; attr < $e[0].attributes.length; attr++) { + var attributeName = $e[0].attributes[attr].name; + var prefix = 'data-'; + + if (attributeName.substr(0, prefix.length) == prefix) { + // Get the contents of the attribute after `data-` + var dataName = attributeName.substring(prefix.length); + + // Get the data contents from the consistent source + // This is more than likely the jQuery data helper + var dataValue = Utils.GetData($e[0], dataName); + + // camelCase the attribute name to match the spec + var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter); + + // Store the data attribute contents into the dataset since + dataset[camelDataName] = dataValue; + } + } + // Prefer the element's `dataset` attribute if it exists // jQuery 1.x does not correctly handle data attributes with multiple dashes if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) { - dataset = $.extend(true, {}, $e[0].dataset, Utils.GetData($e[0])); - } else { - dataset = Utils.GetData($e[0]); + dataset = $.extend(true, {}, $e[0].dataset, dataset); } - var data = $.extend(true, {}, dataset); + // Prefer our internal data cache if it exists + var data = $.extend(true, {}, Utils.GetData($e[0]), dataset); data = Utils._convertData(data); @@ -5305,6 +5520,12 @@ S2.define('select2/core',[ return null; } + if (method == 'computedstyle') { + var computedStyle = window.getComputedStyle($element[0]); + + return computedStyle.width; + } + return method; }; @@ -5345,8 +5566,8 @@ S2.define('select2/core',[ if (observer != null) { this._observer = new observer(function (mutations) { - $.each(mutations, self._syncA); - $.each(mutations, self._syncS); + self._syncA(); + self._syncS(null, mutations); }); this._observer.observe(this.$element[0], { attributes: true, @@ -5468,7 +5689,7 @@ S2.define('select2/core',[ if (self.isOpen()) { if (key === KEYS.ESC || key === KEYS.TAB || (key === KEYS.UP && evt.altKey)) { - self.close(); + self.close(evt); evt.preventDefault(); } else if (key === KEYS.ENTER) { @@ -5502,7 +5723,7 @@ S2.define('select2/core',[ Select2.prototype._syncAttributes = function () { this.options.set('disabled', this.$element.prop('disabled')); - if (this.options.get('disabled')) { + if (this.isDisabled()) { if (this.isOpen()) { this.close(); } @@ -5513,7 +5734,7 @@ S2.define('select2/core',[ } }; - Select2.prototype._syncSubtree = function (evt, mutations) { + Select2.prototype._isChangeMutation = function (evt, mutations) { var changed = false; var self = this; @@ -5541,7 +5762,22 @@ S2.define('select2/core',[ } } else if (mutations.removedNodes && mutations.removedNodes.length > 0) { changed = true; + } else if ($.isArray(mutations)) { + $.each(mutations, function(evt, mutation) { + if (self._isChangeMutation(evt, mutation)) { + // We've found a change mutation. + // Let's escape from the loop and continue + changed = true; + return false; + } + }); } + return changed; + }; + + Select2.prototype._syncSubtree = function (evt, mutations) { + var changed = this._isChangeMutation(evt, mutations); + var self = this; // Only re-pull the data if we think there is a change if (changed) { @@ -5592,7 +5828,7 @@ S2.define('select2/core',[ }; Select2.prototype.toggleDropdown = function () { - if (this.options.get('disabled')) { + if (this.isDisabled()) { return; } @@ -5608,15 +5844,40 @@ S2.define('select2/core',[ return; } + if (this.isDisabled()) { + return; + } + this.trigger('query', {}); }; - Select2.prototype.close = function () { + Select2.prototype.close = function (evt) { if (!this.isOpen()) { return; } - this.trigger('close', {}); + this.trigger('close', { originalEvent : evt }); + }; + + /** + * Helper method to abstract the "enabled" (not "disabled") state of this + * object. + * + * @return {true} if the instance is not disabled. + * @return {false} if the instance is disabled. + */ + Select2.prototype.isEnabled = function () { + return !this.isDisabled(); + }; + + /** + * Helper method to abstract the "disabled" state of this object. + * + * @return {true} if the disabled option is true. + * @return {false} if the disabled option is false. + */ + Select2.prototype.isDisabled = function () { + return this.options.get('disabled'); }; Select2.prototype.isOpen = function () { @@ -5693,7 +5954,7 @@ S2.define('select2/core',[ }); } - this.$element.val(newVal).trigger('change'); + this.$element.val(newVal).trigger('input').trigger('change'); }; Select2.prototype.destroy = function () { @@ -6028,13 +6289,13 @@ S2.define('select2/compat/inputData',[ }); this.$element.val(data.id); - this.$element.trigger('change'); + this.$element.trigger('input').trigger('change'); } else { var value = this.$element.val(); value += this._valueSeparator + data.id; this.$element.val(value); - this.$element.trigger('change'); + this.$element.trigger('input').trigger('change'); } }; @@ -6057,7 +6318,7 @@ S2.define('select2/compat/inputData',[ } self.$element.val(values.join(self._valueSeparator)); - self.$element.trigger('change'); + self.$element.trigger('input').trigger('change'); }); }; diff --git a/styles/bootstrap/select2/js/select2.full.min.js b/styles/bootstrap/select2/js/select2.full.min.js index b64efebe7..fa781916e 100644 --- a/styles/bootstrap/select2/js/select2.full.min.js +++ b/styles/bootstrap/select2/js/select2.full.min.js @@ -1 +1,2 @@ -/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.__cache={};var e=0;return c.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},c.StoreData=function(a,b,d){var e=c.GetUniqueElementId(a);c.__cache[e]||(c.__cache[e]={}),c.__cache[e][b]=d},c.GetData=function(b,d){var e=c.GetUniqueElementId(b);return d?c.__cache[e]&&null!=c.__cache[e][d]?c.__cache[e][d]:a(b).data(d):c.__cache[e]},c.RemoveData=function(a){var b=c.GetUniqueElementId(a);null!=c.__cache[b]&&delete c.__cache[b]},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
      ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('
    • '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&a.inArray(f,e)>-1?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"treeitem","aria-selected":"false"};c.disabled&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]);for(var f in e){var g=e[f];d.setAttribute(f,g)}if(c.children){var h=a(d),i=document.createElement("strong");i.className="select2-results__group";a(i);this.template(c,i);for(var j=[],k=0;k",{class:"select2-results__options select2-results__options--nested"});n.append(j),h.append(i),h.append(n)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a),d=c+1;if(!(d>=b.length)){var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top+e.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=e.$results.scrollTop()+h-g;0===d?e.$results.scrollTop(0):h>g&&e.$results.scrollTop(i)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");if("true"===d.attr("aria-selected"))return void(e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{}));e.trigger("select",{originalEvent:c,data:f})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),this.$selection=c,c},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),window.setTimeout(function(){d.$selection.focus()},0),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target),e=d.closest(".select2");a(".select2.select2-container--open").each(function(){a(this),this!=e[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.attr("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
        '),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.options.get("disabled")){var d=a(this),e=d.parent(),g=c.GetData(e[0],"data");f.trigger("unselect",{originalEvent:b,data:g})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('
      • ×
      • ')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)return void this.$element.val(f);for(var h=0;h0||0===d.length)){var e=a('×');c.StoreData(e[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(e)}},d}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this;a.call(this,d,e),d.on("open",function(){f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){f.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void f.$selection.off("input.search input.searchcheck");f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void f.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;if(this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c){this.$element.find("[data-select2-tag]").length?this.$element.focus():this.$search.focus()}},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.blur()}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
      • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(!0,this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,d.GetData(a[0])):d.GetData(a[0]);var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(f=d(this))&&g.push(f)})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;if(this._isInitialized)return void b.call(this,c);this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery","../utils"],function(a,b){function c(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),t.on("open",function(){i.$search.attr("aria-controls",r),i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var i=this;this.current(function(e){var t=null!=e?e.length:0;0=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this,r=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",r),i.$search.trigger("focus"),window.setTimeout(function(){i.$search.trigger("focus")},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||i.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('
      • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.select2."+t.id,r="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(i,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ar.bottom+s,d={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(i="below"),u||!c||t?!c&&u&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("select2/compat/utils",["jquery"],function(s){return{syncCssClasses:function(e,t,n){var i,r,o=[];(i=s.trim(e.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&o.push(this)}),(i=s.trim(t.attr("class")))&&s((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(r=n(this))&&o.push(r)}),e.attr("class",o.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("containerCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(s,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var o=this.options.get("dropdownCss")||{};return s.isFunction(o)&&(o=o(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(o),t.addClass(n),t},e}),e.define("select2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),e.define("select2/compat/inputData",["jquery","../utils"],function(s,i){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `' + + ' spellcheck="false" role="searchbox" aria-autocomplete="list" />' + '' ); @@ -1955,14 +2000,18 @@ S2.define('select2/selection/search',[ Search.prototype.bind = function (decorated, container, $container) { var self = this; + var resultsId = container.id + '-results'; + decorated.call(this, container, $container); container.on('open', function () { + self.$search.attr('aria-controls', resultsId); self.$search.trigger('focus'); }); container.on('close', function () { self.$search.val(''); + self.$search.removeAttr('aria-controls'); self.$search.removeAttr('aria-activedescendant'); self.$search.trigger('focus'); }); @@ -1982,7 +2031,11 @@ S2.define('select2/selection/search',[ }); container.on('results:focus', function (params) { - self.$search.attr('aria-activedescendant', params.id); + if (params.data._resultId) { + self.$search.attr('aria-activedescendant', params.data._resultId); + } else { + self.$search.removeAttr('aria-activedescendant'); + } }); this.$selection.on('focusin', '.select2-search--inline', function (evt) { @@ -2016,6 +2069,12 @@ S2.define('select2/selection/search',[ } }); + this.$selection.on('click', '.select2-search--inline', function (evt) { + if (self.$search.val()) { + evt.stopPropagation(); + } + }); + // Try to detect the IE version should the `documentMode` property that // is stored on the document. This is only implemented in IE and is // slightly cleaner than doing a user agent check. @@ -2101,13 +2160,7 @@ S2.define('select2/selection/search',[ this.resizeSearch(); if (searchHadFocus) { - var isTagInput = this.$element.find('[data-select2-tag]').length; - if (isTagInput) { - // fix IE11 bug where tag input lost focus - this.$element.focus(); - } else { - this.$search.focus(); - } + this.$search.trigger('focus'); } }; @@ -2140,7 +2193,7 @@ S2.define('select2/selection/search',[ var width = ''; if (this.$search.attr('placeholder') !== '') { - width = this.$selection.find('.select2-selection__rendered').innerWidth(); + width = this.$selection.find('.select2-selection__rendered').width(); } else { var minimumWidth = this.$search.val().length + 1; @@ -2503,6 +2556,7 @@ S2.define('select2/diacritics',[ '\u019F': 'O', '\uA74A': 'O', '\uA74C': 'O', + '\u0152': 'OE', '\u01A2': 'OI', '\uA74E': 'OO', '\u0222': 'OU', @@ -2912,6 +2966,7 @@ S2.define('select2/diacritics',[ '\uA74B': 'o', '\uA74D': 'o', '\u0275': 'o', + '\u0153': 'oe', '\u01A3': 'oi', '\u0223': 'ou', '\uA74F': 'oo', @@ -3080,8 +3135,9 @@ S2.define('select2/diacritics',[ '\u03CD': '\u03C5', '\u03CB': '\u03C5', '\u03B0': '\u03C5', - '\u03C9': '\u03C9', - '\u03C2': '\u03C3' + '\u03CE': '\u03C9', + '\u03C2': '\u03C3', + '\u2019': '\'' }; return diacritics; @@ -3166,7 +3222,7 @@ S2.define('select2/data/select',[ if ($(data.element).is('option')) { data.element.selected = true; - this.$element.trigger('change'); + this.$element.trigger('input').trigger('change'); return; } @@ -3187,13 +3243,13 @@ S2.define('select2/data/select',[ } self.$element.val(val); - self.$element.trigger('change'); + self.$element.trigger('input').trigger('change'); }); } else { var val = data.id; this.$element.val(val); - this.$element.trigger('change'); + this.$element.trigger('input').trigger('change'); } }; @@ -3209,7 +3265,7 @@ S2.define('select2/data/select',[ if ($(data.element).is('option')) { data.element.selected = false; - this.$element.trigger('change'); + this.$element.trigger('input').trigger('change'); return; } @@ -3227,7 +3283,7 @@ S2.define('select2/data/select',[ self.$element.val(val); - self.$element.trigger('change'); + self.$element.trigger('input').trigger('change'); }); }; @@ -3420,15 +3476,19 @@ S2.define('select2/data/array',[ 'jquery' ], function (SelectAdapter, Utils, $) { function ArrayAdapter ($element, options) { - var data = options.get('data') || []; + this._dataToConvert = options.get('data') || []; ArrayAdapter.__super__.constructor.call(this, $element, options); - - this.addOptions(this.convertToOptions(data)); } Utils.Extend(ArrayAdapter, SelectAdapter); + ArrayAdapter.prototype.bind = function (container, $container) { + ArrayAdapter.__super__.bind.call(this, container, $container); + + this.addOptions(this.convertToOptions(this._dataToConvert)); + }; + ArrayAdapter.prototype.select = function (data) { var $option = this.$element.find('option').filter(function (i, elm) { return elm.value == data.id.toString(); @@ -3718,8 +3778,6 @@ S2.define('select2/data/tags',[ }; Tags.prototype._removeOldTags = function (_) { - var tag = this._lastTag; - var $options = this.$element.find('option[data-select2-tag]'); $options.each(function () { @@ -3794,7 +3852,7 @@ S2.define('select2/data/tokenizer',[ // Replace the search term if we have the search box if (this.$search.length) { this.$search.val(tokenData.term); - this.$search.focus(); + this.$search.trigger('focus'); } params.term = tokenData.term; @@ -3923,10 +3981,30 @@ S2.define('select2/data/maximumSelectionLength',[ decorated.call(this, $e, options); } + MaximumSelectionLength.prototype.bind = + function (decorated, container, $container) { + var self = this; + + decorated.call(this, container, $container); + + container.on('select', function () { + self._checkIfMaximumSelected(); + }); + }; + MaximumSelectionLength.prototype.query = function (decorated, params, callback) { var self = this; + this._checkIfMaximumSelected(function () { + decorated.call(self, params, callback); + }); + }; + + MaximumSelectionLength.prototype._checkIfMaximumSelected = + function (_, successCallback) { + var self = this; + this.current(function (currentData) { var count = currentData != null ? currentData.length : 0; if (self.maximumSelectionLength > 0 && @@ -3939,7 +4017,10 @@ S2.define('select2/data/maximumSelectionLength',[ }); return; } - decorated.call(self, params, callback); + + if (successCallback) { + successCallback(); + } }); }; @@ -3978,7 +4059,7 @@ S2.define('select2/dropdown',[ }; Dropdown.prototype.position = function ($dropdown, $container) { - // Should be implmented in subclasses + // Should be implemented in subclasses }; Dropdown.prototype.destroy = function () { @@ -4002,7 +4083,7 @@ S2.define('select2/dropdown/search',[ '' + '' + + ' spellcheck="false" role="searchbox" aria-autocomplete="list" />' + '' ); @@ -4017,6 +4098,8 @@ S2.define('select2/dropdown/search',[ Search.prototype.bind = function (decorated, container, $container) { var self = this; + var resultsId = container.id + '-results'; + decorated.call(this, container, $container); this.$search.on('keydown', function (evt) { @@ -4039,24 +4122,27 @@ S2.define('select2/dropdown/search',[ container.on('open', function () { self.$search.attr('tabindex', 0); + self.$search.attr('aria-controls', resultsId); - self.$search.focus(); + self.$search.trigger('focus'); window.setTimeout(function () { - self.$search.focus(); + self.$search.trigger('focus'); }, 0); }); container.on('close', function () { self.$search.attr('tabindex', -1); + self.$search.removeAttr('aria-controls'); + self.$search.removeAttr('aria-activedescendant'); self.$search.val(''); - self.$search.blur(); + self.$search.trigger('blur'); }); container.on('focus', function () { if (!container.isOpen()) { - self.$search.focus(); + self.$search.trigger('focus'); } }); @@ -4071,6 +4157,14 @@ S2.define('select2/dropdown/search',[ } } }); + + container.on('results:focus', function (params) { + if (params.data._resultId) { + self.$search.attr('aria-activedescendant', params.data._resultId); + } else { + self.$search.removeAttr('aria-activedescendant'); + } + }); }; Search.prototype.handleSearch = function (evt) { @@ -4155,6 +4249,7 @@ S2.define('select2/dropdown/infiniteScroll',[ if (this.showLoadingMore(data)) { this.$results.append(this.$loadingMore); + this.loadMoreIfNeeded(); } }; @@ -4173,25 +4268,27 @@ S2.define('select2/dropdown/infiniteScroll',[ self.loading = true; }); - this.$results.on('scroll', function () { - var isLoadMoreVisible = $.contains( - document.documentElement, - self.$loadingMore[0] - ); + this.$results.on('scroll', this.loadMoreIfNeeded.bind(this)); + }; - if (self.loading || !isLoadMoreVisible) { - return; - } + InfiniteScroll.prototype.loadMoreIfNeeded = function () { + var isLoadMoreVisible = $.contains( + document.documentElement, + this.$loadingMore[0] + ); - var currentOffset = self.$results.offset().top + - self.$results.outerHeight(false); - var loadingMoreOffset = self.$loadingMore.offset().top + - self.$loadingMore.outerHeight(false); + if (this.loading || !isLoadMoreVisible) { + return; + } - if (currentOffset + 50 >= loadingMoreOffset) { - self.loadMore(); - } - }); + var currentOffset = this.$results.offset().top + + this.$results.outerHeight(false); + var loadingMoreOffset = this.$loadingMore.offset().top + + this.$loadingMore.outerHeight(false); + + if (currentOffset + 50 >= loadingMoreOffset) { + this.loadMore(); + } }; InfiniteScroll.prototype.loadMore = function () { @@ -4212,7 +4309,7 @@ S2.define('select2/dropdown/infiniteScroll',[ var $option = $( '
      • ' + 'role="option" aria-disabled="true">' ); var message = this.options.get('translations').get('loadingMore'); @@ -4230,7 +4327,7 @@ S2.define('select2/dropdown/attachBody',[ '../utils' ], function ($, Utils) { function AttachBody (decorated, $element, options) { - this.$dropdownParent = options.get('dropdownParent') || $(document.body); + this.$dropdownParent = $(options.get('dropdownParent') || document.body); decorated.call(this, $element, options); } @@ -4238,27 +4335,14 @@ S2.define('select2/dropdown/attachBody',[ AttachBody.prototype.bind = function (decorated, container, $container) { var self = this; - var setupResultsEvents = false; - decorated.call(this, container, $container); container.on('open', function () { self._showDropdown(); self._attachPositioningHandler(container); - if (!setupResultsEvents) { - setupResultsEvents = true; - - container.on('results:all', function () { - self._positionDropdown(); - self._resizeDropdown(); - }); - - container.on('results:append', function () { - self._positionDropdown(); - self._resizeDropdown(); - }); - } + // Must bind after the results handlers to ensure correct sizing + self._bindContainerResultHandlers(container); }); container.on('close', function () { @@ -4307,6 +4391,44 @@ S2.define('select2/dropdown/attachBody',[ this.$dropdownContainer.detach(); }; + AttachBody.prototype._bindContainerResultHandlers = + function (decorated, container) { + + // These should only be bound once + if (this._containerResultsHandlersBound) { + return; + } + + var self = this; + + container.on('results:all', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + container.on('results:append', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + container.on('results:message', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + container.on('select', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + container.on('unselect', function () { + self._positionDropdown(); + self._resizeDropdown(); + }); + + this._containerResultsHandlersBound = true; + }; + AttachBody.prototype._attachPositioningHandler = function (decorated, container) { var self = this; @@ -4383,16 +4505,26 @@ S2.define('select2/dropdown/attachBody',[ top: container.bottom }; - // Determine what the parent element is to use for calciulating the offset + // Determine what the parent element is to use for calculating the offset var $offsetParent = this.$dropdownParent; - // For statically positoned elements, we need to get the element + // For statically positioned elements, we need to get the element // that is determining the offset if ($offsetParent.css('position') === 'static') { $offsetParent = $offsetParent.offsetParent(); } - var parentOffset = $offsetParent.offset(); + var parentOffset = { + top: 0, + left: 0 + }; + + if ( + $.contains(document.body, $offsetParent[0]) || + $offsetParent[0].isConnected + ) { + parentOffset = $offsetParent.offset(); + } css.top -= parentOffset.top; css.left -= parentOffset.left; @@ -4562,7 +4694,7 @@ S2.define('select2/dropdown/closeOnSelect',[ var originalEvent = evt.originalEvent; // Don't close if the control key is being held - if (originalEvent && originalEvent.ctrlKey) { + if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) { return; } @@ -4616,6 +4748,9 @@ S2.define('select2/i18n/en',[],function () { }, searching: function () { return 'Searching…'; + }, + removeAllItems: function () { + return 'Remove all items'; } }; }); @@ -4854,66 +4989,29 @@ S2.define('select2/defaults',[ ); } - if (typeof options.language === 'string') { - // Check if the language is specified with a region - if (options.language.indexOf('-') > 0) { - // Extract the region information if it is included - var languageParts = options.language.split('-'); - var baseLanguage = languageParts[0]; + // If the defaults were not previously applied from an element, it is + // possible for the language option to have not been resolved + options.language = this._resolveLanguage(options.language); - options.language = [options.language, baseLanguage]; - } else { - options.language = [options.language]; + // Always fall back to English since it will always be complete + options.language.push('en'); + + var uniqueLanguages = []; + + for (var l = 0; l < options.language.length; l++) { + var language = options.language[l]; + + if (uniqueLanguages.indexOf(language) === -1) { + uniqueLanguages.push(language); } } - if ($.isArray(options.language)) { - var languages = new Translation(); - options.language.push('en'); + options.language = uniqueLanguages; - var languageNames = options.language; - - for (var l = 0; l < languageNames.length; l++) { - var name = languageNames[l]; - var language = {}; - - try { - // Try to load it with the original name - language = Translation.loadPath(name); - } catch (e) { - try { - // If we couldn't load it, check if it wasn't the full path - name = this.defaults.amdLanguageBase + name; - language = Translation.loadPath(name); - } catch (ex) { - // The translation could not be loaded at all. Sometimes this is - // because of a configuration problem, other times this can be - // because of how Select2 helps load all possible translation files. - if (options.debug && window.console && console.warn) { - console.warn( - 'Select2: The language file for "' + name + '" could not be ' + - 'automatically loaded. A fallback will be used instead.' - ); - } - - continue; - } - } - - languages.extend(language); - } - - options.translations = languages; - } else { - var baseTranslation = Translation.loadPath( - this.defaults.amdLanguageBase + 'en' - ); - var customTranslation = new Translation(options.language); - - customTranslation.extend(baseTranslation); - - options.translations = customTranslation; - } + options.translations = this._processTranslations( + options.language, + options.debug + ); return options; }; @@ -4980,13 +5078,14 @@ S2.define('select2/defaults',[ debug: false, dropdownAutoWidth: false, escapeMarkup: Utils.escapeMarkup, - language: EnglishTranslation, + language: {}, matcher: matcher, minimumInputLength: 0, maximumInputLength: 0, maximumSelectionLength: 0, minimumResultsForSearch: 0, selectOnClose: false, + scrollAfterSelect: false, sorter: function (data) { return data; }, @@ -5001,6 +5100,103 @@ S2.define('select2/defaults',[ }; }; + Defaults.prototype.applyFromElement = function (options, $element) { + var optionLanguage = options.language; + var defaultLanguage = this.defaults.language; + var elementLanguage = $element.prop('lang'); + var parentLanguage = $element.closest('[lang]').prop('lang'); + + var languages = Array.prototype.concat.call( + this._resolveLanguage(elementLanguage), + this._resolveLanguage(optionLanguage), + this._resolveLanguage(defaultLanguage), + this._resolveLanguage(parentLanguage) + ); + + options.language = languages; + + return options; + }; + + Defaults.prototype._resolveLanguage = function (language) { + if (!language) { + return []; + } + + if ($.isEmptyObject(language)) { + return []; + } + + if ($.isPlainObject(language)) { + return [language]; + } + + var languages; + + if (!$.isArray(language)) { + languages = [language]; + } else { + languages = language; + } + + var resolvedLanguages = []; + + for (var l = 0; l < languages.length; l++) { + resolvedLanguages.push(languages[l]); + + if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) { + // Extract the region information if it is included + var languageParts = languages[l].split('-'); + var baseLanguage = languageParts[0]; + + resolvedLanguages.push(baseLanguage); + } + } + + return resolvedLanguages; + }; + + Defaults.prototype._processTranslations = function (languages, debug) { + var translations = new Translation(); + + for (var l = 0; l < languages.length; l++) { + var languageData = new Translation(); + + var language = languages[l]; + + if (typeof language === 'string') { + try { + // Try to load it with the original name + languageData = Translation.loadPath(language); + } catch (e) { + try { + // If we couldn't load it, check if it wasn't the full path + language = this.defaults.amdLanguageBase + language; + languageData = Translation.loadPath(language); + } catch (ex) { + // The translation could not be loaded at all. Sometimes this is + // because of a configuration problem, other times this can be + // because of how Select2 helps load all possible translation files + if (debug && window.console && console.warn) { + console.warn( + 'Select2: The language file for "' + language + '" could ' + + 'not be automatically loaded. A fallback will be used instead.' + ); + } + } + } + } else if ($.isPlainObject(language)) { + languageData = new Translation(language); + } else { + languageData = language; + } + + translations.extend(languageData); + } + + return translations; + }; + Defaults.prototype.set = function (key, value) { var camelKey = $.camelCase(key); @@ -5030,6 +5226,10 @@ S2.define('select2/options',[ this.fromElement($element); } + if ($element != null) { + this.options = Defaults.applyFromElement(this.options, $element); + } + this.options = Defaults.apply(this.options); if ($element && $element.is('input')) { @@ -5053,14 +5253,6 @@ S2.define('select2/options',[ this.options.disabled = $e.prop('disabled'); } - if (this.options.language == null) { - if ($e.prop('lang')) { - this.options.language = $e.prop('lang').toLowerCase(); - } else if ($e.closest('[lang]').prop('lang')) { - this.options.language = $e.closest('[lang]').prop('lang'); - } - } - if (this.options.dir == null) { if ($e.prop('dir')) { this.options.dir = $e.prop('dir'); @@ -5098,20 +5290,43 @@ S2.define('select2/options',[ $e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl')); Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl')); - } var dataset = {}; + function upperCaseLetter(_, letter) { + return letter.toUpperCase(); + } + + // Pre-load all of the attributes which are prefixed with `data-` + for (var attr = 0; attr < $e[0].attributes.length; attr++) { + var attributeName = $e[0].attributes[attr].name; + var prefix = 'data-'; + + if (attributeName.substr(0, prefix.length) == prefix) { + // Get the contents of the attribute after `data-` + var dataName = attributeName.substring(prefix.length); + + // Get the data contents from the consistent source + // This is more than likely the jQuery data helper + var dataValue = Utils.GetData($e[0], dataName); + + // camelCase the attribute name to match the spec + var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter); + + // Store the data attribute contents into the dataset since + dataset[camelDataName] = dataValue; + } + } + // Prefer the element's `dataset` attribute if it exists // jQuery 1.x does not correctly handle data attributes with multiple dashes if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) { - dataset = $.extend(true, {}, $e[0].dataset, Utils.GetData($e[0])); - } else { - dataset = Utils.GetData($e[0]); + dataset = $.extend(true, {}, $e[0].dataset, dataset); } - var data = $.extend(true, {}, dataset); + // Prefer our internal data cache if it exists + var data = $.extend(true, {}, Utils.GetData($e[0]), dataset); data = Utils._convertData(data); @@ -5305,6 +5520,12 @@ S2.define('select2/core',[ return null; } + if (method == 'computedstyle') { + var computedStyle = window.getComputedStyle($element[0]); + + return computedStyle.width; + } + return method; }; @@ -5345,8 +5566,8 @@ S2.define('select2/core',[ if (observer != null) { this._observer = new observer(function (mutations) { - $.each(mutations, self._syncA); - $.each(mutations, self._syncS); + self._syncA(); + self._syncS(null, mutations); }); this._observer.observe(this.$element[0], { attributes: true, @@ -5468,7 +5689,7 @@ S2.define('select2/core',[ if (self.isOpen()) { if (key === KEYS.ESC || key === KEYS.TAB || (key === KEYS.UP && evt.altKey)) { - self.close(); + self.close(evt); evt.preventDefault(); } else if (key === KEYS.ENTER) { @@ -5502,7 +5723,7 @@ S2.define('select2/core',[ Select2.prototype._syncAttributes = function () { this.options.set('disabled', this.$element.prop('disabled')); - if (this.options.get('disabled')) { + if (this.isDisabled()) { if (this.isOpen()) { this.close(); } @@ -5513,7 +5734,7 @@ S2.define('select2/core',[ } }; - Select2.prototype._syncSubtree = function (evt, mutations) { + Select2.prototype._isChangeMutation = function (evt, mutations) { var changed = false; var self = this; @@ -5541,7 +5762,22 @@ S2.define('select2/core',[ } } else if (mutations.removedNodes && mutations.removedNodes.length > 0) { changed = true; + } else if ($.isArray(mutations)) { + $.each(mutations, function(evt, mutation) { + if (self._isChangeMutation(evt, mutation)) { + // We've found a change mutation. + // Let's escape from the loop and continue + changed = true; + return false; + } + }); } + return changed; + }; + + Select2.prototype._syncSubtree = function (evt, mutations) { + var changed = this._isChangeMutation(evt, mutations); + var self = this; // Only re-pull the data if we think there is a change if (changed) { @@ -5592,7 +5828,7 @@ S2.define('select2/core',[ }; Select2.prototype.toggleDropdown = function () { - if (this.options.get('disabled')) { + if (this.isDisabled()) { return; } @@ -5608,15 +5844,40 @@ S2.define('select2/core',[ return; } + if (this.isDisabled()) { + return; + } + this.trigger('query', {}); }; - Select2.prototype.close = function () { + Select2.prototype.close = function (evt) { if (!this.isOpen()) { return; } - this.trigger('close', {}); + this.trigger('close', { originalEvent : evt }); + }; + + /** + * Helper method to abstract the "enabled" (not "disabled") state of this + * object. + * + * @return {true} if the instance is not disabled. + * @return {false} if the instance is disabled. + */ + Select2.prototype.isEnabled = function () { + return !this.isDisabled(); + }; + + /** + * Helper method to abstract the "disabled" state of this object. + * + * @return {true} if the disabled option is true. + * @return {false} if the disabled option is false. + */ + Select2.prototype.isDisabled = function () { + return this.options.get('disabled'); }; Select2.prototype.isOpen = function () { @@ -5693,7 +5954,7 @@ S2.define('select2/core',[ }); } - this.$element.val(newVal).trigger('change'); + this.$element.val(newVal).trigger('input').trigger('change'); }; Select2.prototype.destroy = function () { diff --git a/styles/bootstrap/select2/js/select2.min.js b/styles/bootstrap/select2/js/select2.min.js index e50529022..e42142643 100644 --- a/styles/bootstrap/select2/js/select2.min.js +++ b/styles/bootstrap/select2/js/select2.min.js @@ -1 +1,2 @@ -/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c.__cache={};var e=0;return c.GetUniqueElementId=function(a){var b=a.getAttribute("data-select2-id");return null==b&&(a.id?(b=a.id,a.setAttribute("data-select2-id",b)):(a.setAttribute("data-select2-id",++e),b=e.toString())),b},c.StoreData=function(a,b,d){var e=c.GetUniqueElementId(a);c.__cache[e]||(c.__cache[e]={}),c.__cache[e][b]=d},c.GetData=function(b,d){var e=c.GetUniqueElementId(b);return d?c.__cache[e]&&null!=c.__cache[e][d]?c.__cache[e][d]:a(b).data(d):c.__cache[e]},c.RemoveData=function(a){var b=c.GetUniqueElementId(a);null!=c.__cache[b]&&delete c.__cache[b]},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
          ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('
        • '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var c=this;this.data.current(function(d){var e=a.map(d,function(a){return a.id.toString()});c.$results.find(".select2-results__option[aria-selected]").each(function(){var c=a(this),d=b.GetData(this,"data"),f=""+d.id;null!=d.element&&d.element.selected||null==d.element&&a.inArray(f,e)>-1?c.attr("aria-selected","true"):c.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(c){var d=document.createElement("li");d.className="select2-results__option";var e={role:"treeitem","aria-selected":"false"};c.disabled&&(delete e["aria-selected"],e["aria-disabled"]="true"),null==c.id&&delete e["aria-selected"],null!=c._resultId&&(d.id=c._resultId),c.title&&(d.title=c.title),c.children&&(e.role="group",e["aria-label"]=c.text,delete e["aria-selected"]);for(var f in e){var g=e[f];d.setAttribute(f,g)}if(c.children){var h=a(d),i=document.createElement("strong");i.className="select2-results__group";a(i);this.template(c,i);for(var j=[],k=0;k",{class:"select2-results__options select2-results__options--nested"});n.append(j),h.append(i),h.append(n)}else this.template(c,d);return b.StoreData(d,"data",c),d},c.prototype.bind=function(c,d){var e=this,f=c.id+"-results";this.$results.attr("id",f),c.on("results:all",function(a){e.clear(),e.append(a.data),c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("results:append",function(a){e.append(a.data),c.isOpen()&&e.setClasses()}),c.on("query",function(a){e.hideMessages(),e.showLoading(a)}),c.on("select",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("unselect",function(){c.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),c.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),c.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),c.on("results:toggle",function(){var a=e.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),c.on("results:select",function(){var a=e.getHighlightedResults();if(0!==a.length){var c=b.GetData(a[0],"data");"true"==a.attr("aria-selected")?e.trigger("close",{}):e.trigger("select",{data:c})}}),c.on("results:previous",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a);if(!(c<=0)){var d=c-1;0===a.length&&(d=0);var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top,h=f.offset().top,i=e.$results.scrollTop()+(h-g);0===d?e.$results.scrollTop(0):h-g<0&&e.$results.scrollTop(i)}}),c.on("results:next",function(){var a=e.getHighlightedResults(),b=e.$results.find("[aria-selected]"),c=b.index(a),d=c+1;if(!(d>=b.length)){var f=b.eq(d);f.trigger("mouseenter");var g=e.$results.offset().top+e.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=e.$results.scrollTop()+h-g;0===d?e.$results.scrollTop(0):h>g&&e.$results.scrollTop(i)}}),c.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),c.on("results:message",function(a){e.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=e.$results.scrollTop(),c=e.$results.get(0).scrollHeight-b+a.deltaY,d=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=e.$results.height();d?(e.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(c){var d=a(this),f=b.GetData(this,"data");if("true"===d.attr("aria-selected"))return void(e.options.get("multiple")?e.trigger("unselect",{originalEvent:c,data:f}):e.trigger("close",{}));e.trigger("select",{originalEvent:c,data:f})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(c){var d=b.GetData(this,"data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:d,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var c=a('');return this._tabindex=0,null!=b.GetData(this.$element[0],"old-tabindex")?this._tabindex=b.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),c.attr("title",this.$element.attr("title")),c.attr("tabindex",this._tabindex),this.$selection=c,c},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),window.setTimeout(function(){d.$selection.focus()},0),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(c){a(document.body).on("mousedown.select2."+c.id,function(c){var d=a(c.target),e=d.closest(".select2");a(".select2.select2-container--open").each(function(){a(this),this!=e[0]&&b.GetData(this,"element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()})},e.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.attr("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
            '),a},d.prototype.bind=function(b,e){var f=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){f.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!f.options.get("disabled")){var d=a(this),e=d.parent(),g=c.GetData(e[0],"data");f.trigger("unselect",{originalEvent:b,data:g})}})},d.prototype.clear=function(){var a=this.$selection.find(".select2-selection__rendered");a.empty(),a.removeAttr("title")},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('
          • ×
          • ')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(a,b,c){function d(){}return d.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},d.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var d=this.$selection.find(".select2-selection__clear");if(0!==d.length){b.stopPropagation();var e=c.GetData(d[0],"data"),f=this.$element.val();this.$element.val(this.placeholder.id);var g={data:e};if(this.trigger("clear",g),g.prevented)return void this.$element.val(f);for(var h=0;h0||0===d.length)){var e=a('×');c.StoreData(e[0],"data",d),this.$selection.find(".select2-selection__rendered").prepend(e)}},d}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,d,e){var f=this;a.call(this,d,e),d.on("open",function(){f.$search.trigger("focus")}),d.on("close",function(){f.$search.val(""),f.$search.removeAttr("aria-activedescendant"),f.$search.trigger("focus")}),d.on("enable",function(){f.$search.prop("disabled",!1),f._transferTabIndex()}),d.on("disable",function(){f.$search.prop("disabled",!0)}),d.on("focus",function(a){f.$search.trigger("focus")}),d.on("results:focus",function(a){f.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){f.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){f._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),f.trigger("keypress",a),f._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===f.$search.val()){var d=f.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var e=b.GetData(d[0],"data");f.searchRemoveChoice(e),a.preventDefault()}}});var g=document.documentMode,h=g&&g<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(h)return void f.$selection.off("input.search input.searchcheck");f.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(h&&"input"===a.type)return void f.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&f.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;if(this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c){this.$element.find("[data-select2-tag]").length?this.$element.focus():this.$search.focus()}},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],g=["opening","closing","selecting","unselecting","clearing"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){"status"in d&&(0===d.status||"0"===d.status)||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.blur()}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
          • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){b.StoreData(this,"select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(c){var d=b.GetData(this,"select2-scroll-position");a(this).scrollTop(d.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(!0,this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),d.GetData(a[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),d.StoreData(a[0],"data",d.GetData(a[0],"select2Tags")),d.StoreData(a[0],"tags",!0)),d.GetData(a[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",d.GetData(a[0],"ajaxUrl")),d.StoreData(a[0],"ajax-Url",d.GetData(a[0],"ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,d.GetData(a[0])):d.GetData(a[0]);var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,d){null!=c.GetData(a[0],"select2")&&c.GetData(a[0],"select2").destroy(),this.$element=a,this.id=this._generateId(a),d=d||{},this.options=new b(d,a),e.__super__.constructor.call(this);var f=a.attr("tabindex")||0;c.StoreData(a[0],"old-tabindex",f),a.attr("tabindex","-1");var g=this.options.get("dataAdapter");this.dataAdapter=new g(a,this.options);var h=this.render();this._placeContainer(h);var i=this.options.get("selectionAdapter");this.selection=new i(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,h);var j=this.options.get("dropdownAdapter");this.dropdown=new j(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,h);var k=this.options.get("resultsAdapter");this.results=new k(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){l.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(a[0],"select2",this),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(b[0],"element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(a,b,c,d,e){if(null==a.fn.select2){var f=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,g=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=e.GetData(this,"select2");null==a&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=a[b].apply(a,g)}),a.inArray(b,f)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}); \ No newline at end of file +/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ +!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('
              ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h(''),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):ithis.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
                '),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('
              • ×
              • ')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('
              • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ai.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1 Date: Thu, 2 Apr 2020 12:38:16 +0200 Subject: [PATCH 13/33] add table with data below chart --- views/bootstrap/class.Charts.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index 0592214e2..b79a8a7d9 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -228,6 +228,29 @@ $(document).ready( function() {
                contentContainerEnd(); + echo ""; + echo ""; + $total = 0; + switch($type) { + case 'docspermonth': + case 'docsperuser': + case 'docspermimetype': + case 'docspercategory': + case 'docsperstatus': + foreach($data as $item) { + echo ""; + $total += $item['total']; + } + break; + case 'docsaccumulated': + foreach($data as $item) { + echo ""; + $total += $item['total']; + } + break; + } + echo ""; + echo "
                ".getMLText('chart_'.$type.'_title')."".getMLText('total')."
                ".htmlspecialchars($item['key'])."".$item['total']."
                ".date('Y-m-d', $item['key']/1000)."".$item['total']."
                ".$total."
                "; echo "\n"; if(!in_array($type, array('docspermonth', 'docsaccumulated'))) { @@ -245,4 +268,3 @@ $(document).ready( function() { $this->htmlEndPage(); } /* }}} */ } -?> From b602becdb8c7a9af75afd7c359a54275c6bfb7ec Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Apr 2020 13:53:11 +0200 Subject: [PATCH 14/33] add entry for 5.1.16 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 9ba124c08..a88451bce 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ - add new parameter $skipcont to hook folderListitem() - use standard output format for documents and folders on ManageNotify page - allow multiple dependencies on seeddms of extension +- add table with chart data below chart -------------------------------------------------------------------------------- Changes in version 5.1.15 From 3d128da722970f0524bb774175d2707cc496e1a3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Apr 2020 13:59:38 +0200 Subject: [PATCH 15/33] show table with total document size per user --- views/bootstrap/class.Charts.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index b79a8a7d9..1d87d07fe 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -241,15 +241,23 @@ $(document).ready( function() { echo "
                ".htmlspecialchars($item['key'])."".$item['total']."
                ".$total."
                ".date('Y-m-d', $item['key']/1000)."".$item['total']."
                ".$total."
                ".htmlspecialchars($item['key'])."".SeedDMS_Core_File::format_filesize($item['total'])."
                ".SeedDMS_Core_File::format_filesize($total)."
                ".$total."
                "; echo "
                \n"; From bdb7ad8a19b4a079f111d90cb590b9d75d7fe99f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 3 Apr 2020 18:16:50 +0200 Subject: [PATCH 16/33] fix dependencies --- ext/example/conf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/example/conf.php b/ext/example/conf.php index 05ac31fbc..1046fd6b0 100644 --- a/ext/example/conf.php +++ b/ext/example/conf.php @@ -49,7 +49,7 @@ $EXT_CONF['example'] = array( ), ), 'constraints' => array( - 'depends' => array('php' => '5.4.4-', 'seeddms' => '4.3.0-'), + 'depends' => array('php' => '5.6.40-', 'seeddms' => '5.1.0-'), ), 'icon' => 'icon.png', 'changelog' => 'changelog.md', From 82209c1ee42e50b4d0529648e03a7fd542b2f6ff Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 4 Apr 2020 11:59:43 +0200 Subject: [PATCH 17/33] do not calculated total for accumaled documents --- views/bootstrap/class.Charts.php | 1 - 1 file changed, 1 deletion(-) diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index 1d87d07fe..5794be916 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -248,7 +248,6 @@ $(document).ready( function() { echo "".date('Y-m-d', $item['key']/1000)."".$item['total'].""; $total += $item['total']; } - echo "".$total.""; break; case 'sizeperuser': foreach($data as $item) { From 82a60956ca681dceff673d1a9c7002317f872a24 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 6 Apr 2020 21:26:29 +0200 Subject: [PATCH 18/33] do now show tasks in menu if workflow is turned off completly --- views/bootstrap/class.Tasks.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Tasks.php b/views/bootstrap/class.Tasks.php index 7b1bcfe48..ce7b83011 100644 --- a/views/bootstrap/class.Tasks.php +++ b/views/bootstrap/class.Tasks.php @@ -136,7 +136,10 @@ class SeedDMS_View_Tasks extends SeedDMS_Bootstrap_Style { $dms = $this->params['dms']; $user = $this->params['user']; - $tasks = $this->__myTasks(); + if(!$tasks = $this->__myTasks()) { + echo ''; + return; + } $content = ''; $content .= "
                  \n"; From 5e27232dc409664db668fbddb331301f9964b462 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 6 Apr 2020 21:27:21 +0200 Subject: [PATCH 19/33] add entry for 5.1.16 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index a88451bce..06ff3b6e3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - use standard output format for documents and folders on ManageNotify page - allow multiple dependencies on seeddms of extension - add table with chart data below chart +- do now show tasks in menu if workflow is turned off completely -------------------------------------------------------------------------------- Changes in version 5.1.15 From 24925bf2deecd9a6f2abca9a48070f3d860b26a2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Apr 2020 07:50:22 +0200 Subject: [PATCH 20/33] get document from latestversion where ever the version is concerned latestVersion could be changed by a hook, which also changes the related document --- views/bootstrap/class.ViewDocument.php | 79 +++++++++++--------------- 1 file changed, 34 insertions(+), 45 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index d43569138..34f5c9b3e 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -383,7 +383,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { case 'application/pdf': $this->contentHeading(getMLText("preview")); ?> - + contentHeading(getMLText("preview")); ?> - + hasConverter($latestContent->getMimeType())) { $this->contentHeading(getMLText("preview_pdf")); ?> - + \n"; print "\n"; print ""; - /* - print ""; - */ $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile); $previewer->setConverters($previewconverters); $previewer->createPreview($latestContent); if ($file_exists) { if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes))) { - print "getVersion()."\">"; + print "getDocument()->getId()."&version=". $latestContent->getVersion()."\">"; } else { - print "getVersion()."\">"; + print "getDocument()->getId()."&version=".$latestContent->getVersion()."\">"; } } if($previewer->hasPreview($latestContent)) { - print("getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"); + print("getDocument()->getID()."&version=".$latestContent->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"); } else { print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; } @@ -647,35 +636,35 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print ""; print "
                    "; if ($file_exists){ if($accessop->mayEditVersion()) { - print "
                  • getVersion()."\">".getMLText("edit_version")."
                  • "; + print "
                  • getDocument()->getId()."&version=".$latestContent->getVersion()."\">".getMLText("edit_version")."
                  • "; } } /* Only admin has the right to remove version in any case or a regular * user if enableVersionDeletion is on */ if($accessop->mayRemoveVersion()) { - print "
                  • getVersion()."\">".getMLText("rm_version")."
                  • "; + print "
                  • getDocument()->getId()."&version=".$latestContent->getVersion()."\">".getMLText("rm_version")."
                  • "; } if($accessop->mayOverwriteStatus()) { - print "
                  • ".getMLText("change_status")."
                  • "; + print "
                  • ".getMLText("change_status")."
                  • "; } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Allow changing reviewers/approvals only if not reviewed if($accessop->maySetReviewersApprovers()) { - print "
                  • ".getMLText("change_assignments")."
                  • "; + print "
                  • ".getMLText("change_assignments")."
                  • "; } } elseif($workflowmode == 'advanced') { if($accessop->maySetWorkflow()) { if(!$workflow) { - print "
                  • ".getMLText("set_workflow")."
                  • "; + print "
                  • ".getMLText("set_workflow")."
                  • "; } } } @@ -685,10 +674,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } */ if($accessop->mayEditComment()) { - print "
                  • getVersion()."\">".getMLText("edit_comment")."
                  • "; + print "
                  • getDocument()->getId()."&version=".$latestContent->getVersion()."\">".getMLText("edit_comment")."
                  • "; } if($accessop->mayEditAttributes()) { - print "
                  • getVersion()."\">".getMLText("edit_attributes")."
                  • "; + print "
                  • getDocument()->getId()."&version=".$latestContent->getVersion()."\">".getMLText("edit_attributes")."
                  • "; } $items = $this->callHook('extraVersionActions', $latestContent); @@ -831,9 +820,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayReview()) { if ($is_reviewer) { if ($r["status"]==0) { - print "
                  • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-primary btn-mini\">".getMLText("add_review")."
                  • "; + print "
                  • getDocument()->getId()."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-primary btn-mini\">".getMLText("add_review")."
                  • "; } elseif ($accessop->mayUpdateReview($updateUser) && (($r["status"]==1)||($r["status"]==-1))) { - print "
                  • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-primary btn-mini\">".getMLText("edit")."
                  • "; + print "
                  • getDocument()->getId()."&version=".$latestContent->getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-primary btn-mini\">".getMLText("edit")."
                  • "; } } } @@ -919,9 +908,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayApprove()) { if ($is_approver) { if ($a['status'] == 0) { - print "
                  • getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."
                  • "; + print "
                  • getDocument()->getId()."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."
                  • "; } elseif ($accessop->mayUpdateApproval($updateUser) && (($a["status"]==1)||($a["status"]==-1))) { - print "
                  • getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."
                  • "; + print "
                  • getDocument()->getId()."&version=".$latestContent->getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."
                  • "; } } } @@ -983,9 +972,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $this->contentContainerStart(); if($user->isAdmin()) { if(SeedDMS_Core_DMS::checkIfEqual($workflow->getInitState(), $latestContent->getWorkflowState())) { - print "
                    getVersion()."\" />
                    "; + print "
                    getDocument()->getId()."\" />getVersion()."\" />
                    "; } else { - print "
                    getVersion()."\" />
                    "; + print "
                    getDocument()->getId()."\" />getVersion()."\" />
                    "; } } @@ -1085,7 +1074,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { echo ""; if($latestContent->triggerWorkflowTransitionIsAllowed($user, $transition)) { $action = $transition->getAction(); - print "
                    getVersion()."\" />getID()."\" />getName()), array(), $action->getName())."\" />
                    "; + print "
                    getDocument()->getId()."\" />getVersion()."\" />getID()."\" />getName()), array(), $action->getName())."\" />
                    "; $allowedtransitions[] = $transition; } echo ""; @@ -1104,7 +1093,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } } if($subworkflows) { - echo "
                    getVersion()."\" />"; + echo "getDocument()->getId()."\" />getVersion()."\" />"; echo "getVersion()."\" />"; + echo "getDocument()->getId()."\" />getVersion()."\" />"; echo ""; echo "
                    "; } else { @@ -1151,7 +1140,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { foreach($transitions as $transition) { if($latestContent->triggerWorkflowTransitionIsAllowed($user, $transition)) { echo "Triggering transition is allowed
                    "; - echo "
                    getVersion()."\" />getID()."\" />"; + echo "getDocument()->getId()."\" />getVersion()."\" />getID()."\" />"; echo ""; echo "
                    "; @@ -1205,14 +1194,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print ""; if($file_exists) { if ($viewonlinefiletypes && (in_array(strtolower($version->getFileType()), $viewonlinefiletypes) || in_array(strtolower($version->getMimeType()), $viewonlinefiletypes))) { - print "getVersion()."\">"; + print "getDocument()->getId()."&version=".$version->getVersion()."\">"; } else { - print "getVersion()."\">"; + print "getDocument()->getId()."&version=".$version->getVersion()."\">"; } } $previewer->createPreview($version); if($previewer->hasPreview($version)) { - print("getID()."&version=".$version->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($version->getMimeType())."\">"); + print("getDocument()->getId()."&version=".$version->getVersion()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($version->getMimeType())."\">"); } else { print "getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; } @@ -1248,9 +1237,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print ""; print ""; print "
                      "; } @@ -1258,15 +1247,15 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { * user if enableVersionDeletion is on */ if($accessop->mayRemoveVersion()) { - print "
                    • getVersion()."\">".getMLText("rm_version")."
                    • "; + print "
                    • getDocument()->getId()."&version=".$version->getVersion()."\">".getMLText("rm_version")."
                    • "; } if($accessop->mayEditComment()) { - print "
                    • getID()."&version=".$version->getVersion()."\">".getMLText("edit_comment")."
                    • "; + print "
                    • getDocument()->getId()."&version=".$version->getVersion()."\">".getMLText("edit_comment")."
                    • "; } if($accessop->mayEditAttributes()) { - print "
                    • getID()."&version=".$version->getVersion()."\">".getMLText("edit_attributes")."
                    • "; + print "
                    • getDocument()->getId()."&version=".$version->getVersion()."\">".getMLText("edit_attributes")."
                    • "; } - print "
                    • ".getMLText("details")."
                    • "; + print "
                    • ".getMLText("details")."
                    • "; $items = $this->callHook('extraVersionActions', $version); if($items) { foreach($items as $item) { From 71a24bb826f7761927acce02f0e87bf91946e4fd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Apr 2020 07:52:35 +0200 Subject: [PATCH 21/33] add 'data-target-id' to folder and document rows in list This will be used to specify the document associated to the row. --- views/bootstrap/class.Bootstrap.php | 6 ++++-- views/bootstrap/class.ViewFolder.php | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 6f58067dd..b5e0e7e7b 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2281,7 +2281,9 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e ?> /* catch click on a document row in the list folders and documents */ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) { - attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; + attr_id = $(ev.currentTarget).parent().data('target-id'); + if(typeof attr_id == 'undefined') + attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; window.location = '../out/out.ViewFolder.php?folderid=' + attr_id; }); getID(); - return "getName(), ENT_QUOTES)."\">"; + return "getName(), ENT_QUOTES)."\">"; } /* }}} */ function documentListRowEnd($document) { /* {{{ */ diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 61492e27c..2585bd4cf 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -183,7 +183,14 @@ $('body').on('click', '#goto-parent', function(ev) { }); /* catch click on a folder row in the list folders and documents */ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) { - attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; + /* retrieve the id of the target folder either from data-target-id or + * from the id. Prefer data-target-id because the id is also used for identifying + * the table row when deleting the folder + * This was added for the internal_link extensіon + */ + attr_id = $(ev.currentTarget).parent().data('target-id'); + if(typeof attr_id == 'undefined') + attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3]; folderSelected(attr_id, ''); $([document.documentElement, document.body]).animate({ scrollTop: 200 From 4021d62cb3e898e5388c22b800656cf94c8b74c2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Apr 2020 17:06:38 +0200 Subject: [PATCH 22/33] better error handling in addDocumentFile() --- SeedDMS_Core/Core/inc.ClassDocument.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index e825843b3..ca597e216 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2214,14 +2214,21 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $dir = $this->getDir(); + $db->startTransaction(); $queryStr = "INSERT INTO `tblDocumentFiles` (`comment`, `date`, `dir`, `document`, `fileType`, `mimeType`, `orgFileName`, `userID`, `name`, `version`, `public`) VALUES ". "(".$db->qstr($comment).", ".$db->getCurrentTimestamp().", ".$db->qstr($dir).", ".$this->_id.", ".$db->qstr($fileType).", ".$db->qstr($mimeType).", ".$db->qstr($orgFileName).",".$user->getID().",".$db->qstr($name).", ".((int) $version).", ".($public ? 1 : 0).")"; - if (!$db->getResult($queryStr)) return false; + if (!$db->getResult($queryStr)) { + $db->rollbackTransaction(); + return false; + } $id = $db->getInsertID('tblDocumentFiles'); $file = $this->getDocumentFile($id); - if (is_bool($file) && !$file) return false; + if (is_bool($file) && !$file) { + $db->rollbackTransaction(); + return false; + } // copy file if (!SeedDMS_Core_File::makeDir($this->_dms->contentDir . $dir)) return false; @@ -2229,8 +2236,12 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $err = SeedDMS_Core_File::renameFile($tmpFile, $this->_dms->contentDir . $file->getPath()); else $err = SeedDMS_Core_File::copyFile($tmpFile, $this->_dms->contentDir . $file->getPath()); - if (!$err) return false; + if (!$err) { + $db->rollbackTransaction(); + return false; + } + $db->commitTransaction(); return $file; } /* }}} */ From 0273199ce0c65f80b1594cf59da3ac25ad0e7dce Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Apr 2020 17:07:53 +0200 Subject: [PATCH 23/33] fix link to custom css on page --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index b5e0e7e7b..64e1d031f 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -103,7 +103,7 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common { if($this->extraheader['css']) echo $this->extraheader['css']; if(method_exists($this, 'css')) - echo ''."\n"; + echo ''."\n"; echo ''."\n"; if($this->extraheader['js']) From 6e89a180b12dd83a0fcd16d8a0d35a32589409b3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Apr 2020 17:13:32 +0200 Subject: [PATCH 24/33] fix upload from dropfolder --- CHANGELOG | 1 + op/op.AddDocument.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d37e3677d..1b18ac4f9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ another user - fix export of search results, headers of excel file can be translated - fix arcordeon for folder filters on search page +- fix upload from dropfolder -------------------------------------------------------------------------------- Changes in version 6.0.8 diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 9341579e4..c8159b6fb 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -319,8 +319,8 @@ if (isset($_POST["grpIndRecipients"])) { $docsource = 'upload'; if($settings->_dropFolderDir) { - if(isset($_POST["dropfolderfileform1"]) && $_POST["dropfolderfileform1"]) { - $fullfile = $settings->_dropFolderDir.'/'.$user->getLogin().'/'.$_POST["dropfolderfileform1"]; + if(isset($_POST["dropfolderfileadddocform"]) && $_POST["dropfolderfileadddocform"]) { + $fullfile = $settings->_dropFolderDir.'/'.$user->getLogin().'/'.$_POST["dropfolderfileadddocform"]; if(file_exists($fullfile)) { $docsource = 'dropfolder'; /* Check if a local file is uploaded as well */ @@ -332,7 +332,7 @@ if($settings->_dropFolderDir) { $mimetype = finfo_file($finfo, $fullfile); $_FILES["userfile"]['tmp_name'][] = $fullfile; $_FILES["userfile"]['type'][] = $mimetype; - $_FILES["userfile"]['name'][] = $_POST["dropfolderfileform1"]; + $_FILES["userfile"]['name'][] = $_POST["dropfolderfileadddocform"]; $_FILES["userfile"]['size'][] = filesize($fullfile); $_FILES["userfile"]['error'][] = 0; } From d1b3b008151c869de9030b6e00a6e0ed94960e5a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Apr 2020 18:02:19 +0200 Subject: [PATCH 25/33] add notes for 5.1.16 --- SeedDMS_Core/package.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index f3fbef741..80adc0489 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,7 +12,7 @@ uwe@steinmann.cx yes - 2020-04-02 + 2020-04-14 5.1.16 @@ -27,6 +27,7 @@ - fix call of hooks in SeedDMS_Core - add variable lasterror in SeedDMS_Core_DMS which can be set by hooks to pass an error msg to the calling application +- better error checking in SeedDMS_Core_Document::addDocumentFile() From 7485e0b57a8f563ffbb7272949e113f533426f92 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Apr 2020 18:04:08 +0200 Subject: [PATCH 26/33] fix notes --- SeedDMS_Core/package.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 566305512..de8b651ab 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,10 +24,6 @@ GPL License -- fix call of hooks in SeedDMS_Core -- add variable lasterror in SeedDMS_Core_DMS which can be set by hooks to pass an - error msg to the calling application -- better error checking in SeedDMS_Core_Document::addDocumentFile() @@ -1763,7 +1759,10 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp() GPL License -- no changes, just keep same version as seeddms application +- fix call of hooks in SeedDMS_Core +- add variable lasterror in SeedDMS_Core_DMS which can be set by hooks to pass an + error msg to the calling application +- better error checking in SeedDMS_Core_Document::addDocumentFile() From 440f327bade2f3a75b2e138ab5ae83fb0c8d8f27 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Apr 2020 20:00:53 +0200 Subject: [PATCH 27/33] minor layout improvements --- views/bootstrap/class.Bootstrap.php | 2 +- views/bootstrap/class.ViewDocument.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 64e1d031f..91b1c8c60 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -943,7 +943,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; function formSubmit($value, $name='') { /* {{{ */ echo "
                      \n"; - echo "\n"; + echo "\n"; echo "
                      \n"; } /* }}} */ diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 34f5c9b3e..67477b0e8 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1278,8 +1278,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
                      contentContainerStart(); - if (count($files) > 0) { print ""; @@ -1350,10 +1348,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "\n
                      \n"; } - else printMLText("no_attached_files"); + else $this->infoMsg(getMLText("no_attached_files")); + + $this->contentContainerStart(); if ($document->getAccessMode($user) >= M_READWRITE){ - print "\n"; + print "".getMLText("add")."\n"; } $this->contentContainerEnd(); ?> @@ -1394,7 +1394,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } print "\n\n"; } - else printMLText("no_linked_files"); + else $this->infoMsg(getMLText("no_linked_files")); if (!$user->isGuest()){ $this->contentContainerStart(); From 2d5a4d5bd44b18724cbafa11cfa866b31dd34c5d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Apr 2020 15:54:37 +0200 Subject: [PATCH 28/33] list only user in session which are not hidden --- views/bootstrap/class.Session.php | 36 +++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/views/bootstrap/class.Session.php b/views/bootstrap/class.Session.php index d844eefd3..ed477034c 100644 --- a/views/bootstrap/class.Session.php +++ b/views/bootstrap/class.Session.php @@ -52,20 +52,34 @@ class SeedDMS_View_Session extends SeedDMS_Bootstrap_Style { if ($user->isGuest() || count($sessions) == 0) { return ''; } - $content = ''; - $content .= " \n"; - echo $content; } /* }}} */ } From 3929d650e50c5a03c3a929dfb94ad7cdd853eb48 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Apr 2020 15:55:27 +0200 Subject: [PATCH 29/33] changes for 5.1.16 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 06ff3b6e3..85a45a6aa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ - allow multiple dependencies on seeddms of extension - add table with chart data below chart - do now show tasks in menu if workflow is turned off completely +- do not show hidden users in session list -------------------------------------------------------------------------------- Changes in version 5.1.15 From 394de72a7a74b0b1b8b6488ea939680826815c15 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Apr 2020 17:25:34 +0200 Subject: [PATCH 30/33] add change log for 5.1.16 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 85a45a6aa..c9efde42d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ - add table with chart data below chart - do now show tasks in menu if workflow is turned off completely - do not show hidden users in session list +- add norwegian translation -------------------------------------------------------------------------------- Changes in version 5.1.15 From b117d18eac921d189cedf2d510a31c8ecaa21f48 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2020 14:06:04 +0200 Subject: [PATCH 31/33] various minor updates --- languages/ar_EG/lang.inc | 2 +- languages/bg_BG/lang.inc | 2 +- languages/ca_ES/lang.inc | 2 +- languages/cs_CZ/lang.inc | 2 +- languages/de_DE/lang.inc | 2 +- languages/el_GR/lang.inc | 2 +- languages/en_GB/lang.inc | 2 +- languages/es_ES/lang.inc | 6 +-- languages/fr_FR/lang.inc | 110 +++++++++++++++++++-------------------- languages/hr_HR/lang.inc | 8 +-- languages/hu_HU/lang.inc | 2 +- languages/it_IT/lang.inc | 2 +- languages/ko_KR/lang.inc | 2 +- languages/lo_LA/lang.inc | 2 +- languages/nb_NO/lang.inc | 2 +- languages/nl_NL/lang.inc | 2 +- languages/pl_PL/lang.inc | 6 +-- languages/pt_BR/lang.inc | 6 +-- languages/ro_RO/lang.inc | 2 +- languages/ru_RU/lang.inc | 2 +- languages/sk_SK/lang.inc | 2 +- languages/sv_SE/lang.inc | 2 +- languages/tr_TR/lang.inc | 2 +- languages/uk_UA/lang.inc | 2 +- languages/zh_CN/lang.inc | 2 +- languages/zh_TW/lang.inc | 2 +- 26 files changed, 89 insertions(+), 89 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 47b2da50e..6588a6515 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -427,7 +427,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'تنزيل روابط', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'إصلاح كل المستندات والمجلدات.', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 1067d9a64..f81037b52 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -380,7 +380,7 @@ $text = array( 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Поправи всички папки и документи', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 5725b1e66..cec069df4 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -385,7 +385,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index f87111f16..145d22635 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -451,7 +451,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'Odkazy ke stažení', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Opravit všechny složky a dokumenty.', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 3d2f8129f..7f3ed9781 100644 --- a/languages/de_DE/lang.inc +++ b/languages/de_DE/lang.inc @@ -451,7 +451,7 @@ URL: [url]', 'download_header_review_comment' => 'Prüfkommentar', 'download_header_review_date' => 'Prüfdatum', 'download_header_review_state' => 'Prüfstatus', -'download_header_status' => 'Status', +'download_header_state' => 'Status', 'download_links' => 'Download Links', 'do_no_transfer_to_user' => 'Prozesse nicht auf anderen Benutzer übertragen', 'do_object_repair' => 'Repariere alle Ordner und Dokumente.', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 920be7066..e5592b97e 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -380,7 +380,7 @@ $text = array( 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 2c3449812..471120132 100644 --- a/languages/en_GB/lang.inc +++ b/languages/en_GB/lang.inc @@ -451,7 +451,7 @@ URL: [url]', 'download_header_review_comment' => 'Review comment', 'download_header_review_date' => 'Review date', 'download_header_review_state' => 'Review state', -'download_header_status' => 'State', +'download_header_state' => 'State', 'download_links' => 'Download links', 'do_no_transfer_to_user' => 'Do not transfer processes to user', 'do_object_repair' => 'Repair all folders and documents.', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 5ffad0349..5afdae8c7 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: acabello (20), Admin (1149), angel (123), francisco (2), jaimem (14) +// Translators: acabello (20), Admin (1150), angel (123), francisco (2), jaimem (14) $text = array( '2_factor_auth' => '', @@ -434,7 +434,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Reparar todas las carpetas y documentos.', @@ -793,7 +793,7 @@ URL: [url]', 'my_documents' => 'Mis documentos', 'my_transmittals' => 'Mi transmision', 'name' => 'Nombre', -'nb_NO' => '', +'nb_NO' => 'Noruego', 'needs_correction' => '', 'needs_workflow_action' => 'Este documento requiere su atención. Por favor chequee la pestaña de flujo de trabajo.', 'network_drive' => '', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 10270fee0..1a3986c95 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1102), jeromerobert (50), lonnnew (9), Oudiceval (868) +// Translators: Admin (1102), jeromerobert (50), lonnnew (9), Oudiceval (922) $text = array( '2_factor_auth' => 'Authentification forte', @@ -41,7 +41,7 @@ Document : [name] Dossier parent : [folder_path] Utilisateur : [username] URL : [url]', -'access_permission_changed_email_subject' => '[sitename]: [name] - Permission modifiée', +'access_permission_changed_email_subject' => '[sitename] : [name] - Permission modifiée', 'according_settings' => 'Paramètres en fonction', 'action' => 'Action', 'actions' => 'Actions', @@ -57,7 +57,7 @@ URL : [url]', 'add_attrdefgroup' => 'Ajouter un nouveau groupe d’attributs', 'add_document' => 'Ajouter un document', 'add_document_link' => 'Ajouter un lien', -'add_document_notify' => 'Affecter une notification', +'add_document_notify' => 'Affecter les notifications', 'add_doc_reviewer_approver_warning' => 'N.B. Les documents sont automatiquement marqués comme publiés s’il n’y a pas d’examinateur ou d’approbateur désigné.', 'add_doc_workflow_warning' => 'N.B. Les documents sont automatiquement marqués comme publiés si aucun workflow est désigné.', 'add_event' => 'Ajouter un événement', @@ -118,7 +118,7 @@ Version: [version] Dossier parent: [folder_path] Utilisateur: [username] URL: [url]', -'approval_request_email_subject' => '[sitename]: [name] - Demande d\'approbation', +'approval_request_email_subject' => '[sitename] : [name] - Demande d\'approbation', 'approval_status' => 'Statut d\'approbation', 'approval_submit_email' => 'Approbation d\'un document', 'approval_submit_email_body' => 'Approbation d\'un document @@ -129,7 +129,7 @@ Statut : [status] Commentaire : [comment] Utilisateur : [username] URL : [url]', -'approval_submit_email_subject' => '[sitename]: [name] - Approbation soumise', +'approval_submit_email_subject' => '[sitename] : [name] - Approbation soumise', 'approval_summary' => 'Récapitulatif approbation', 'approval_update_failed' => 'Erreur de la mise à jour du statut d\'approbation. Echec de la mise à jour.', 'approvers' => 'Approbateurs', @@ -140,9 +140,9 @@ URL : [url]', 'archive_creation' => 'Créer une archive', 'archive_creation_warning' => 'Avec cette fonction, vous pouvez créer une archive contenant les fichiers de tous les dossiers DMS. Après la création, l\'archive sera sauvegardée dans le dossier de données de votre serveur.
                      AVERTISSEMENT: Une archive créée ainsi sera inutilisable en tant que sauvegarde du serveur.', 'ar_EG' => 'Arabe – Égypte', -'assign_approvers' => 'Affectation d’approbateurs', +'assign_approvers' => 'Affecter les approbateurs', 'assign_recipients' => 'Affecter les destinataires', -'assign_reviewers' => 'Affectation d’examinateurs', +'assign_reviewers' => 'Affecter les examinateurs', 'assign_user_property_to' => 'Transférer les propriétés de l\'utilisateur à', 'assumed_released' => 'Supposé publié', 'attrdefgroup_management' => 'Gestion des groupes d’attributs', @@ -183,7 +183,7 @@ New value: [attribute_new_value] Répertoire parent: [folder_path] Utilisateur: [username] URL: [url]', -'attribute_changed_email_subject' => '[sitename]: [name] - Attribut changé', +'attribute_changed_email_subject' => '[sitename] : [name] - Attribut modifié', 'attribute_count' => 'Nombre d\'utilisations', 'attribute_value' => 'Valeur de l\'attribut', 'attribute_value_not_in_valueset' => 'Valeur en dehors de l’ensemble', @@ -314,7 +314,7 @@ URL: [url]', 'cs_CZ' => 'Tchèque', 'current_password' => 'Mot de passe actuel', 'current_quota' => 'Le quota global actuel est de [quota]', -'current_state' => 'Etat actuel', +'current_state' => 'État actuel', 'current_version' => 'Version actuelle', 'daily' => 'Journalier', 'databasesearch' => 'Recherche dans la base de données', @@ -377,7 +377,7 @@ Commentaire: [new_comment] Dossier parent: [folder_path] Utilisateur: [username] URL: [url]', -'document_comment_changed_email_subject' => '[sitename]: [name] - Commentaire modifié', +'document_comment_changed_email_subject' => '[sitename] : [name] - Commentaire modifié', 'document_count' => 'Nombre de documents', 'document_deleted' => 'Document supprimé', 'document_deleted_email' => 'Document supprimé', @@ -400,7 +400,7 @@ Ancien dossier: [old_folder_path] Nouveau dossier: [new_folder_path] Utilisateur: [username] URL: [url]', -'document_moved_email_subject' => '[sitename]: [name] - Document déplacé', +'document_moved_email_subject' => '[sitename] : [name] - Document déplacé', 'document_not_checkedout' => 'Le document n’a pas été vérifié.', 'document_renamed_email' => 'Document renommé', 'document_renamed_email_body' => 'Document renommé @@ -409,7 +409,7 @@ Dossier parent: [folder_path] Ancien nom: [old_name] Utilisateur: [username] URL: [url]', -'document_renamed_email_subject' => '[sitename]: [name] - Document renommé', +'document_renamed_email_subject' => '[sitename] : [name] - Document renommé', 'document_status_changed_email' => 'Statut du document modifié', 'document_status_changed_email_body' => 'Statut du document modifié Document: [name] @@ -417,7 +417,7 @@ Statut: [status] Dossier parent: [folder_path] Utilisateur: [username] URL: [url]', -'document_status_changed_email_subject' => '[sitename]: [name] - Statut du document modifié', +'document_status_changed_email_subject' => '[sitename] : [name] - Statut du document modifié', 'document_title' => 'Document \'[documentname]\'', 'document_transfered_email_body' => 'Transfert d’un document à un autre utilisateur Document : [name] @@ -434,26 +434,26 @@ Commentaire: [comment] Commentaire de version: [version_comment] Utilisateur: [username] URL: [url]', -'document_updated_email_subject' => '[sitename]: [name] - Document mis à jour', +'document_updated_email_subject' => '[sitename] : [name] - Document mis à jour', 'does_not_expire' => 'N\'expire jamais', 'does_not_inherit_access_msg' => 'Accès hérité', 'download' => 'Téléchargement', 'download_extension' => 'Télécharger l’extension en tant que fichier zip', -'download_header_approval_comment' => '', -'download_header_approval_date' => '', -'download_header_approval_state' => '', -'download_header_approver' => '', -'download_header_document_name' => '', -'download_header_document_no' => '', -'download_header_filename' => '', -'download_header_internal_version' => '', -'download_header_reviewer' => '', -'download_header_review_comment' => '', -'download_header_review_date' => '', -'download_header_review_state' => '', -'download_header_status' => '', +'download_header_approval_comment' => 'Commentaire d’approbation', +'download_header_approval_date' => 'Date d’approbation', +'download_header_approval_state' => 'Statut d’approbation', +'download_header_approver' => 'Approbateur', +'download_header_document_name' => 'Nom du document', +'download_header_document_no' => 'N° du document', +'download_header_filename' => 'Nom du fichier', +'download_header_internal_version' => 'Version interne', +'download_header_reviewer' => 'Examinateur', +'download_header_review_comment' => 'Commentaire de vérification', +'download_header_review_date' => 'Date de vérification', +'download_header_review_state' => 'Statut de vérification', +'download_header_state' => 'Statut', 'download_links' => 'Liens de téléchargement', -'do_no_transfer_to_user' => '', +'do_no_transfer_to_user' => 'Ne pas transférer les processus à l’utilisateur', 'do_object_repair' => 'Réparer tous les dossiers et documents.', 'do_object_setchecksum' => 'Définir checksum', 'do_object_setfilesize' => 'Définir la taille du fichier', @@ -509,7 +509,7 @@ URL: [url]', 'empty_list' => 'Aucune entrée', 'empty_notify_list' => 'Aucune entrée', 'en_GB' => 'Anglais (RU)', -'equal_transition_states' => 'Etat de début et fin identique', +'equal_transition_states' => 'États de début et de fin identiques', 'error' => 'Erreur', 'error_add_aro' => '', 'error_add_permission' => 'Erreur lors de l’ajout de permission', @@ -554,7 +554,7 @@ Document : [name] Dossier parent : [folder_path] Utilisateur : [username] URL : [url]', -'expiry_changed_email_subject' => '[sitename]: [name] - Date d\'expiration modifiée', +'expiry_changed_email_subject' => '[sitename] : [name] - Date d’expiration modifiée', 'export' => 'Exporter', 'extension_archive' => 'Extension', 'extension_changelog' => 'Journal des modifications', @@ -595,7 +595,7 @@ Commentaire: [new_comment] Dossier parent: [folder_path] Utilisateur: [username] URL: [url]', -'folder_comment_changed_email_subject' => '[sitename]: [name] - Commentaire changé', +'folder_comment_changed_email_subject' => '[sitename] : [name] - Commentaire modifié', 'folder_contents' => 'Dossiers', 'folder_deleted_email' => 'Dossier supprimé', 'folder_deleted_email_body' => 'Dossier supprimé @@ -603,7 +603,7 @@ Dossier: [name] Dossier parent: [folder_path] Utilisateur: [username] URL: [url]', -'folder_deleted_email_subject' => '[sitename]: [name] - Dossier supprimé', +'folder_deleted_email_subject' => '[sitename] : [name] - Dossier supprimé', 'folder_infos' => 'Informations sur le dossier', 'folder_moved_email' => 'Dossier déplacé', 'folder_moved_email_body' => 'Dossier déplacé @@ -612,7 +612,7 @@ Ancien dossier: [old_folder_path] Nouveau dossier: [new_folder_path] Utilisateur: [username] URL: [url]', -'folder_moved_email_subject' => '[sitename]: [name] - Dossier déplacé', +'folder_moved_email_subject' => '[sitename] : [name] - Dossier déplacé', 'folder_renamed_email' => 'Dossier renommé', 'folder_renamed_email_body' => 'Dossier renommé Dossier: [name] @@ -620,7 +620,7 @@ Dossier parent: [folder_path] Ancien nom: [old_name] Utilisateur: [username] URL: [url]', -'folder_renamed_email_subject' => '[sitename]: [name] - Dossier renommé', +'folder_renamed_email_subject' => '[sitename] : [name] - Dossier renommé', 'folder_title' => 'Dossier \'[foldername]\'', 'foot_note' => '', 'force_update' => 'Mettre à jour', @@ -655,7 +655,7 @@ URL: [url]', 'hash' => 'Hash', 'help' => 'Aide', 'home_folder' => 'Dossier personnel', -'hook_name' => '', +'hook_name' => 'Nom de l’appel', 'hourly' => 'Une fois par heure', 'hours' => 'heures', 'hr_HR' => 'Croate', @@ -760,7 +760,7 @@ URL: [url]', 'link_to_version' => 'Version', 'list_access_rights' => 'Liste des droits d’accès…', 'list_contains_no_access_docs' => 'La liste contient des documents auxquels vous n’avez pas accès et qui ne sont donc pas affichés.', -'list_hooks' => 'Liste livre', +'list_hooks' => 'Liste des appels internes', 'list_tasks' => 'Liste des tâches', 'local_file' => 'Fichier local', 'locked_by' => 'Verrouillé par', @@ -784,7 +784,7 @@ URL: [url]', 'manager_of_group' => 'Vous êtes le gestionnaire de ce groupe', 'mandatory_approvergroups' => 'Obligatoire : groupes de valideurs', 'mandatory_approvergroup_no_access' => 'Groupe requis d\'approbateurs \'[group]\' ne dispose pas des droits suffisants', -'mandatory_approvers' => 'Affectation d’approbateurs', +'mandatory_approvers' => 'Affecter les approbateurs', 'mandatory_approver_no_access' => 'L\'approbateur désigné \'[user]\' ne dispose pas des droits d\'accès suffisants.', 'mandatory_reviewergroups' => 'Groupe obligatoire d’examinateurs', 'mandatory_reviewergroup_no_access' => 'Groupe d\'examinateurs \'[group]\' ne dispose pas des droits suffisants', @@ -835,7 +835,7 @@ Commentaire : [comment] Commentaire de version : [version_comment] Utilisateur : [username] URL: [url]', -'new_document_email_subject' => '[sitename]: [folder_name] - Nouveau document', +'new_document_email_subject' => '[sitename] : [folder_name] - Nouveau document', 'new_file_email' => 'Nouvel attachement', 'new_file_email_body' => 'Nouvel attachement Name: [name] @@ -843,7 +843,7 @@ Document: [document] Commentaire: [comment] Utilisateur: [username] URL: [url]', -'new_file_email_subject' => '[sitename]: [document] - Nouvel attachement', +'new_file_email_subject' => '[sitename] : [document] - Nouveau fichier attaché', 'new_folder' => 'Nouveau dossier', 'new_password' => 'Nouveau mot de passe', 'new_subfolder_email' => 'Nouveau dossier', @@ -853,7 +853,7 @@ Dossier parent : [folder_path] Commentaire : [comment] Utilisateur : [username] URL : [url]', -'new_subfolder_email_subject' => '[sitename]: [name] - Nouveau dossier', +'new_subfolder_email_subject' => '[sitename] : [name] - Nouveau dossier', 'new_user_image' => 'Nouvelle image', 'next_revision_abbr' => 'Prochaine rév.', 'next_state' => 'Nouvel état', @@ -866,14 +866,14 @@ Nom : [name] Dossier parent : [folder_path] Utilisateur : [username] URL : [url]', -'notify_added_email_subject' => '[sitename]: [name] - Ajouté à la liste des notifications', +'notify_added_email_subject' => '[sitename] : [name] - Ajouté à la liste des notifications', 'notify_deleted_email' => 'Vous avez été supprimé de la liste des notifications.', 'notify_deleted_email_body' => 'Supprimé de la liste des notifications Nom: [name] Dossier parent: [folder_path] Utilisateur: [username] URL: [url]', -'notify_deleted_email_subject' => '[sitename]: [name] - Supprimé de la liste des notifications', +'notify_deleted_email_subject' => '[sitename] : [name] - Supprimé de la liste des notifications', 'november' => 'Novembre', 'now' => 'Maintenant', 'no_action' => 'Aucune action n\'est nécessaire', @@ -926,7 +926,7 @@ Ancien propriétaire: [old_owner] Nouveau propriétaire: [new_owner] Utilisateur: [username] URL: [url]', -'ownership_changed_email_subject' => '[sitename]: [name] - Propriétaire modifié', +'ownership_changed_email_subject' => '[sitename] : [name] - Propriétaire modifié', 'password' => 'Mot de passe', 'password_already_used' => 'Mot de passe déjà utilisé', 'password_expiration' => 'Expiration du mot de passe', @@ -941,7 +941,7 @@ Pour ce faire, cliquez sur le lien suivant: [url_prefix]out/out.ChangePassword.php?hash=[hash] En cas de problème persistant, veuillez contacter votre administrateur.', -'password_forgotten_email_subject' => '[sitename]: Mot de passe oublié', +'password_forgotten_email_subject' => '[sitename] : Mot de passe oublié', 'password_forgotten_send_hash' => 'La procédure à suivre a bien été envoyée à l\'adresse indiquée', 'password_forgotten_text' => 'Remplissez le formulaire ci-dessous et suivez les instructions dans le courrier électronique qui vous sera envoyé.', 'password_forgotten_title' => 'Mot de passe envoyé', @@ -974,7 +974,7 @@ En cas de problème persistant, veuillez contacter votre administrateur.', 'pt_BR' => 'Portuguais (BR)', 'quota' => 'Quota', 'quota_exceeded' => 'Votre quota de disque est dépassé de [bytes].', -'quota_is_disabled' => 'Le support des quotas est actuellement désactivé dans les réglages. Affecter un quota utilisateur n’aura pas d’effet jusqu’à ce qu’il soit de nouveau activé.', +'quota_is_disabled' => 'La prise en charge des quotas est actuellement désactivée dans les réglages. Affecter un quota utilisateur n’aura pas d’effet jusqu’à ce qu’il soit de nouveau activé.', 'quota_warning' => 'Votre quota d’espace disque est dépassé de [bytes]. Veuillez supprimer des documents ou d\'anciennes versions.', 'receipts_accepted' => '[no_receipts] réceptions déjà confirmées', 'receipts_accepted_latest' => '(dont [no_receipts] dans la dernière version)', @@ -1020,7 +1020,7 @@ URL : [url]', Document: [document] Utilisateur: [username] URL: [url]', -'removed_file_email_subject' => '[sitename]: [document] - Attachement supprimé', +'removed_file_email_subject' => '[sitename] : [document] - Fichier attaché supprimé', 'removed_recipient' => 'a été supprimé de la liste des destinataires.', 'removed_reviewer' => 'a été retiré de la liste des examinateurs.', 'removed_revisor' => 'a été supprimé de la liste des réviseurs.', @@ -1136,10 +1136,10 @@ URL : [url]', 'revisors' => 'Réviseurs', 'revisor_already_assigned' => 'L’utilisateur est déjà attribué en tant que réviseur.', 'revisor_already_removed' => 'Le réviseur a déjà été retiré du processus de révision ou a déjà révisé le document.', -'rewind_workflow' => 'Remonter le workflow', +'rewind_workflow' => 'Reculer le workflow', 'rewind_workflow_email_body' => 'Le workflow a été reculé', -'rewind_workflow_email_subject' => '[sitename]: [name] - Le workflow a été réinitialisé', -'rewind_workflow_warning' => 'Si vous remonter à l\'état initial du workflow, le log de workflow de ce document sera supprimé et impossible à récupérer.', +'rewind_workflow_email_subject' => '[sitename] : [name] - Le workflow a été reculé', +'rewind_workflow_warning' => 'Si vous retournez à l’état initial du workflow, l’historique de workflow de ce document sera supprimé et ne pourra pas être restauré.', 'rm_attrdef' => 'Supprimer la définition d’attribut', 'rm_attrdefgroup' => 'Supprimer ce groupe d’attributs', 'rm_attr_value' => 'Supprimer la valeur', @@ -1179,7 +1179,7 @@ Sous-workflow : [subworkflow] Dossier parent : [folder_path] Utilisateur : [username] URL : [url]', -'run_subworkflow_email_subject' => '[sitename]: [name] - Sous-workflow initialisé', +'run_subworkflow_email_subject' => '[sitename] : [name] - Sous-workflow initialisé', 'ru_RU' => 'Russe', 'saturday' => 'Samedi', 'saturday_abbr' => 'Sam.', @@ -1831,7 +1831,7 @@ URL : [url]', 'tr_TR' => 'Turc', 'tuesday' => 'Mardi', 'tuesday_abbr' => 'Mar.', -'type_of_hook' => '', +'type_of_hook' => 'Type', 'type_to_filter' => 'Filtrer dans la liste', 'type_to_search' => 'Effectuer une recherche', 'uk_UA' => 'Ukrénien', @@ -1897,7 +1897,7 @@ Version: [version] Dossier parent: [folder_path] Utilisateur: [username] URL: [url]', -'version_deleted_email_subject' => '[sitename]: [name] - Version supprimée', +'version_deleted_email_subject' => '[sitename] : [name] - Version supprimée', 'version_info' => 'Informations de version', 'view' => 'Aperçu', 'view_online' => 'Aperçu en ligne', @@ -1911,10 +1911,10 @@ URL: [url]', 'workflow_actions_management' => 'Gestion des actions de workflow', 'workflow_action_in_use' => 'Cette action est actuellement utilisée par des workflows.', 'workflow_action_name' => 'Nom', -'workflow_editor' => 'Editeur de Workflow', +'workflow_editor' => 'Éditeur de Workflow', 'workflow_group_summary' => 'Récapitulatif groupe workflow', 'workflow_has_cycle' => 'Le workflow a une boucle', -'workflow_initstate' => 'Etat initial', +'workflow_initstate' => 'État initial', 'workflow_in_use' => 'Ce workflow est actuellement utilisé par des documents.', 'workflow_layoutdata_saved' => 'Données de mise en page enregistrées', 'workflow_management' => 'Gestion des workflows', @@ -1926,7 +1926,7 @@ URL: [url]', 'workflow_save_layout' => 'Enregistrer la mise en page', 'workflow_state' => 'État de workflow', 'workflow_states_management' => 'Gestion des états de workflow', -'workflow_state_docstatus' => 'Etat du document', +'workflow_state_docstatus' => 'État du document', 'workflow_state_in_use' => 'Cet état est actuellement utilisé par des workflows.', 'workflow_state_name' => 'Nom', 'workflow_summary' => 'Récapitulatif workflow', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index 94690bcd0..f8bd0d6a7 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1236), marbanas (16) +// Translators: Admin (1238), marbanas (16) $text = array( '2_factor_auth' => '', @@ -439,7 +439,7 @@ Internet poveznica: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Popravi sve mape i dokumente.', @@ -1174,7 +1174,7 @@ Internet poveznica: [url]', 'seconds' => 'sekunde', 'selection' => 'Odabir', 'select_attrdefgrp_show' => '', -'select_attribute_value' => '', +'select_attribute_value' => 'Izbari vrednost atributa', 'select_category' => 'Kliknite za odabir kategorije', 'select_group' => 'Izaberi grupu', 'select_groups' => 'Kliknite za odabir grupa', @@ -1453,7 +1453,7 @@ Internet poveznica: [url]', 'settings_Notification' => 'Postavke bilježenja', 'settings_notwritable' => 'Konfiguracija se ne može pohraniti jer datoteka konfiguracije nema mogućnost upisivanja.', 'settings_no_content_dir' => 'Mapa sadržaja', -'settings_onePageMode' => '', +'settings_onePageMode' => 'Mod jedne strane', 'settings_onePageMode_desc' => '', 'settings_overrideMimeType' => 'Premosti tip datoteke', 'settings_overrideMimeType_desc' => 'Premošćivanje tipa datoteke određenog od strane pretraživača ako je datoteka učitana. Novi tip datoteke se određuje od strane DMS sustava.', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 3069755be..94bfbba56 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -434,7 +434,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Valamennyi mappa és dokumentum helyreállítása.', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 0bbd9dd3c..0da771343 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -444,7 +444,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'Collegamenti di scaricamento', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Ripara tutte le cartelle e i documenti.', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index b38ace664..b8561220e 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -440,7 +440,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => '모든 폴더와 문서를 복구', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index 110499df6..463ca348f 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -437,7 +437,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'ດາວໂຫລດລິ້ງ', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'ສ້ອມແຊມໂຟລເດີ ແລະເອກະສານທັງໝົດ', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index a3f6fd1e2..719b1b807 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -451,7 +451,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'Nedlastings link', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Reparere alle mapper og dokumenter.', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 19813d935..907e4b415 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -432,7 +432,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'Download-links', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Repareer alle mappen en documenten.', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index ffe6745e3..d30978e51 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (866), netixw (84), romi (93), uGn (112) +// Translators: Admin (867), netixw (84), romi (93), uGn (112) $text = array( '2_factor_auth' => '', @@ -427,7 +427,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Napraw wszystkie katalogi i pliki.', @@ -786,7 +786,7 @@ URL: [url]', 'my_documents' => 'Moje dokumenty', 'my_transmittals' => 'Moi recenzenci', 'name' => 'Nazwa', -'nb_NO' => '', +'nb_NO' => 'Norweski', 'needs_correction' => '', 'needs_workflow_action' => 'Dokument wymaga uwagi. Proszę sprawdzić kartę workflow.', 'network_drive' => '', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 684ae8ea2..8c4f16315 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1736), flaviove (627), lfcristofoli (352) +// Translators: Admin (1737), flaviove (627), lfcristofoli (352) $text = array( '2_factor_auth' => 'Autenticação de dois fatores', @@ -451,7 +451,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'Links para download', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Reparar todas as pastas e documentos.', @@ -817,7 +817,7 @@ URL: [url]', 'my_documents' => 'Meus Documentos', 'my_transmittals' => 'Minhas Transmissões', 'name' => 'Nome', -'nb_NO' => '', +'nb_NO' => 'Norueguês', 'needs_correction' => 'Precisa de correção', 'needs_workflow_action' => 'Este documento requer sua atenção. Por favor, verifique a guia de fluxo de trabalho.', 'network_drive' => 'Unidade de rede', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 154436e38..4c9a6fec8 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -439,7 +439,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Repară toate folderele și documentele.', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index bfd407f93..b056e2c6f 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -439,7 +439,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Исправить все каталоги и документы', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 688317ffc..cbae592be 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -451,7 +451,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'Odkazy na stiahnutie', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Opraviť všetky zložky a dokumenty.', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 51845b3f6..3a450221c 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -445,7 +445,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => 'Nedladdningslänkar', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Reparera alla kataloger och dokument.', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 0b94bbeeb..ec81d5931 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -433,7 +433,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Tüm klasörleri ve dokümanları onar.', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index a2e6c61cc..cd61a57fe 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -439,7 +439,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => 'Виправити всі каталоги і документи', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index b69132580..41b20f74d 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -433,7 +433,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '下载链接', 'do_no_transfer_to_user' => '', 'do_object_repair' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 20507f490..e7d70b117 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -384,7 +384,7 @@ URL: [url]', 'download_header_review_comment' => '', 'download_header_review_date' => '', 'download_header_review_state' => '', -'download_header_status' => '', +'download_header_state' => '', 'download_links' => '', 'do_no_transfer_to_user' => '', 'do_object_repair' => '', From 20e3826316e45c771b295766187fede41dbdbeeb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2020 14:09:56 +0200 Subject: [PATCH 32/33] add dummy note in 6.0.9 --- SeedDMS_Core/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index de8b651ab..7b44c5935 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,6 +24,7 @@ GPL License +- no changes, just keep same version as seeddms application From 1aefc633f961ebe84d4bd576618166ae4ba871bd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2020 07:23:17 +0200 Subject: [PATCH 33/33] fix adding new calendar event --- CHANGELOG | 1 + out/out.AddEvent.php | 1 + views/bootstrap/class.Bootstrap.php | 2 ++ 3 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 649fd4685..f1aa4721b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ - fix export of search results, headers of excel file can be translated - fix arcordeon for folder filters on search page - fix upload from dropfolder +- fix adding new calendar event -------------------------------------------------------------------------------- Changes in version 6.0.8 diff --git a/out/out.AddEvent.php b/out/out.AddEvent.php index 47fc29871..72333fcd4 100644 --- a/out/out.AddEvent.php +++ b/out/out.AddEvent.php @@ -39,6 +39,7 @@ if ($user->isGuest()) { } if($view) { + $view->setParam('accessobject', $accessop); $view->setParam('strictformcheck', $settings->_strictFormCheck); $view($_GET); exit; diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 83a5a1f62..dcbafba8f 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -899,6 +899,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } /* }}} */ private function calendarOldNavigationBar($d){ /* {{{ */ + $accessobject = $this->params['accessobject']; $ds="&day=".$d[0]."&month=".$d[1]."&year=".$d[2]; echo "".getMLText("calendar")."\n"; echo "
                      \n"; @@ -916,6 +917,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } /* }}} */ private function calendarNavigationBar($d){ /* {{{ */ + $accessobject = $this->params['accessobject']; echo "".getMLText("calendar")."\n"; echo "
                      \n"; echo "
                        \n";