Skip to content

Commit 454057e

Browse files
nilsteampassnetnilsteampassnet
nilsteampassnet
authored and
nilsteampassnet
committed
Merge branch 'development'
2 parents 0738b2b + d487a0b commit 454057e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+556
-713
lines changed

admin.settings.php

+31
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,36 @@
16031603
</td><td>
16041604
<input type="text" size="5" id="upload_maxfilesize" name="upload_maxfilesize" value="', isset($SETTINGS['upload_maxfilesize']) ? $SETTINGS['upload_maxfilesize'] : '10', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
16051605
</td></tr>';
1606+
1607+
// upload_zero_byte_file
1608+
echo '
1609+
<tr style="margin-bottom:3px">
1610+
<td>
1611+
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;">&nbsp;</i>
1612+
<label>' .
1613+
$LANG['upload_empty_file'].'
1614+
</label>
1615+
</td>
1616+
<td>
1617+
<div class="toggle toggle-modern" id="upload_zero_byte_file" data-toggle-on="', isset($SETTINGS['upload_zero_byte_file']) && $SETTINGS['upload_zero_byte_file'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="upload_zero_byte_file_input" name="upload_zero_byte_file_input" value="', isset($SETTINGS['upload_zero_byte_file']) && $SETTINGS['upload_zero_byte_file'] == 1 ? '1' : '0', '" />
1618+
</td>
1619+
</tr>';
1620+
1621+
// upload_all_extensions_file
1622+
echo '
1623+
<tr style="margin-bottom:3px">
1624+
<td>
1625+
<i class="fa fa-chevron-right mi-grey-1" style="margin-right: .3em;">&nbsp;</i>
1626+
<label>' .
1627+
$LANG['upload_any_extension_file'].'
1628+
&nbsp;<i class="fa fa-question-circle tip" title="'.htmlentities(strip_tags($LANG['upload_any_extension_file_tip']), ENT_QUOTES).'"></i>
1629+
</label>
1630+
</td>
1631+
<td>
1632+
<div class="toggle toggle-modern" id="upload_all_extensions_file" data-toggle-on="', isset($SETTINGS['upload_all_extensions_file']) && $SETTINGS['upload_all_extensions_file'] == 1 ? 'true' : 'false', '"></div><input type="hidden" id="upload_all_extensions_file_input" name="upload_all_extensions_file_input" value="', isset($SETTINGS['upload_all_extensions_file']) && $SETTINGS['upload_all_extensions_file'] == 1 ? '1' : '0', '" />
1633+
</td>
1634+
</tr>';
1635+
16061636
// Extension for Documents
16071637
echo '
16081638
<tr><td>
@@ -1643,6 +1673,7 @@
16431673
</td><td>
16441674
<input type="text" size="70" id="upload_otherext" name="upload_otherext" value="', isset($SETTINGS['upload_otherext']) ? $SETTINGS['upload_otherext'] : 'sql,xml', '" class="text ui-widget-content" onchange="updateSetting($(this).attr(\'id\'));" />
16451675
</td></tr>';
1676+
16461677
echo '<tr><td colspan="3"><hr /></td></tr>';
16471678
// Image resize width / height / quality
16481679
echo '

changelog.txt

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
2.1.27
2+
16/
3+
New - Added folders filter in Manage Roles page
4+
New - Added folders alphabet filter in Manage Folders page
5+
#2279 Google Authentication no link
6+
#2277 Import fails when Login: / Account: has a backslash inside of it
7+
#2274 Import from csv-list includes items that are marked as already imported
8+
#2263 New upload settings to permit empty files and/or any extensions to be uploaded
9+
210
15/
311
#2266 Google 2FA mail for temporary code is blank
412

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"version": "2.1.27",
66
"keywords": ["passwords", "manager", "collaborative", "vault", "security"],
77
"homepage": "https://www.teampass.net",
8-
"license": "GNU GPL-3.0",
8+
"license": "GPL-3.0-only",
99
"authors": [
1010
{"name": "Nils Laumaillé", "email": "[email protected]"}
1111
],

folders.load.php

+48-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@
1919

2020
<script type="text/javascript">
2121
//<![CDATA[
22+
23+
24+
$.extend($.expr[":"], {
25+
"containsIN": function(elem, i, match, array) {
26+
return (elem.textContent || elem.innerText || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
27+
}
28+
});
29+
30+
// prepare Alphabet
31+
var _alphabetSearch = '';
32+
$.fn.dataTable.ext.search.push( function ( settings, searchData ) {
33+
if ( ! _alphabetSearch ) {
34+
return true;
35+
}
36+
if ( searchData[0].charAt(0) === _alphabetSearch ) {
37+
return true;
38+
}
39+
return false;
40+
} );
41+
2242
$(function() {
2343
$("#span_new_rep_roles").hide();
2444

@@ -31,7 +51,10 @@
3151
"processing": true,
3252
"serverSide": true,
3353
"ajax": {
34-
url: "<?php echo $SETTINGS['cpassman_url']; ?>/sources/datatable/datatable.folders.php"
54+
url: "<?php echo $SETTINGS['cpassman_url']; ?>/sources/datatable/datatable.folders.php",
55+
data: function(d) {
56+
d.letter = _alphabetSearch
57+
}
3558
},
3659
"language": {
3760
"url": "<?php echo $SETTINGS['cpassman_url']; ?>/includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt"
@@ -49,6 +72,30 @@
4972
{"width": "5%"}
5073
]
5174
});
75+
76+
// manage the Alphabet
77+
var alphabet = $('<div class="alphabet"/>').append( 'Search: ' );
78+
$('<span class="clear active"/>')
79+
.data( 'letter', '' )
80+
.html( 'None' )
81+
.appendTo( alphabet );
82+
for ( var i=0 ; i<26 ; i++ ) {
83+
var letter = String.fromCharCode( 65 + i );
84+
85+
$('<span/>')
86+
.data( 'letter', letter )
87+
.html( letter )
88+
.appendTo( alphabet );
89+
}
90+
alphabet.insertBefore( "#t_folders_alphabet" );
91+
alphabet.on( 'click', 'span', function () {
92+
alphabet.find( '.active' ).removeClass( 'active' );
93+
$(this).addClass( 'active' );
94+
95+
_alphabetSearch = $(this).data('letter');
96+
97+
tableFolders.api().ajax.reload();
98+
} );
5299

53100

54101
$("#div_add_group").dialog({

folders.php

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
//Show the KB in a table view
9494
echo '
9595
<div style="margin:10px auto 25px auto;min-height:250px;" id="folders_page">
96+
<div id="t_folders_alphabet" style="margin-top:25px;"></div>
9697
<table id="t_folders" class="hover" width="100%">
9798
<thead><tr>
9899
<th></th>

includes/config/include.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
global $SETTINGS, $languagesList, $SETTINGS_EXT;
1313

1414
$SETTINGS_EXT['version'] = "2.1.27";
15-
$SETTINGS_EXT['version_full'] = $SETTINGS_EXT['version'].".15";
15+
$SETTINGS_EXT['version_full'] = $SETTINGS_EXT['version'].".16";
1616
$SETTINGS_EXT['tool_name'] = "TeamPass";
1717
$SETTINGS_EXT['one_day_seconds'] = 86400;
1818
$SETTINGS_EXT['one_week_seconds'] = 604800;

0 commit comments

Comments
 (0)