Skip to content

Commit eba682a

Browse files
committed
Merge branch 'master' into fix-video-file
2 parents b4d0489 + 2671bd4 commit eba682a

File tree

9 files changed

+142
-56
lines changed

9 files changed

+142
-56
lines changed

package-lock.json

Lines changed: 79 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"cross-env": "^7.0.0",
1414
"css-loader": "^3.6.0",
1515
"laravel-mix": "^5.0.0",
16-
"lodash": "^4.17.13",
16+
"lodash": "^4.17.19",
1717
"pace": "0.0.4",
1818
"resolve-url-loader": "^3.1.1",
1919
"sass": "^1.26.9",
@@ -37,7 +37,7 @@
3737
"datatables.net-fixedheader-bs4": "^3.1.6",
3838
"datatables.net-responsive": "^2.2.5",
3939
"datatables.net-responsive-bs4": "^2.2.5",
40-
"easymde": "^2.10.1",
40+
"easymde": "^2.11.0",
4141
"jquery": "^3.5.1",
4242
"jquery-colorbox": "^1.6.4",
4343
"jquery-cropper": "^1.0.1",
@@ -54,11 +54,11 @@
5454
"popper.js": "^1.16.1",
5555
"select2": "^4.0.13",
5656
"select2-bootstrap-theme": "0.1.0-beta.10",
57-
"simple-line-icons": "^2.4.1",
57+
"simple-line-icons": "^2.5.2",
5858
"simplemde": "^1.11.2",
5959
"source-sans-pro": "^3.6",
6060
"summernote": "^0.8.18",
6161
"sweetalert": "^2.1.2",
62-
"tinymce": "^5.4.0"
62+
"tinymce": "^5.4.1"
6363
}
6464
}

src/LicenseCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ private function checkLicenseCodeExists()
4646
*/
4747
private function validCode($j)
4848
{
49-
$k = str_replace('-', '', $j); $s = substr($k, 0, 8); $c = substr($k, 8, 2); $a = substr($k, 10, 2); $l = substr($k, 12, 2); $p = substr($k, 14, 2); $n = substr($k, 16, 2); $m = substr($k, 18, 2); $z = substr($k, 20, 24); $w = 'ADEFHKLMVWXYZ146'; $x = $s; for ($i = 0; $i < strlen($w); $i++) { $r = $w[$i]; $x = str_replace($r, '-', $x); } $x = str_replace('-', '', $x); if ($x != '') { return false; } if (substr_count($j, '-') != 5) { return false; } $e = substr(crc32(substr($k, 0, 20)), -4); if ($z !== $e) { return false; } $o = strrev(substr(preg_replace('/[0-9]+/', '', strtoupper(sha1($a.'sand('.$s.')'.$n.'tos()'))), 2, 2)); if ($m !== $o) { return false; } return true;
49+
$k = str_replace('-', '', $j); $s = substr($k, 0, 8); $c = substr($k, 8, 2); $a = substr($k, 10, 2); $l = substr($k, 12, 2); $p = substr($k, 14, 2); $n = substr($k, 16, 2); $m = substr($k, 18, 2); $z = substr($k, 20, 24); $w = 'ADEFHKLMVWXYZ146'; $x = $s; for ($i = 0; $i < strlen($w); $i++) { $r = $w[$i]; $x = str_replace($r, '-', $x); } $x = str_replace('-', '', $x); if ($x != '') { return false; } if (substr_count($j, '-') != 5) { return false; } $e = substr(hexdec(hash('crc32b', substr($k, 0, 20))), -4); if ($z !== $e) { return false; } $o = strrev(substr(preg_replace('/[0-9]+/', '', strtoupper(sha1($a.'sand('.$s.')'.$n.'tos()'))), 2, 2)); if ($m !== $o) { return false; } $o2 = substr(((int)preg_replace('/[^0-9]/','', $s.$c)==0 ? 8310 : (int)preg_replace('/[^0-9]/','', $s.$c) )*9971, -2);if ($a !== $o2) {return false;} return true;
5050
}
5151
}

src/app/Library/CrudPanel/CrudFilter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Backpack\CRUD\app\Library\CrudPanel;
44

5+
use Closure;
56
use Illuminate\Support\Str;
67
use Symfony\Component\HttpFoundation\ParameterBag;
78

src/app/Library/CrudPanel/Traits/SaveActions.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ public function getSaveActionDefaultForCurrentOperation()
2424
*/
2525
public function getFallBackSaveAction()
2626
{
27-
//we get the higher order in save actions array. It will return something only when explicit by developer
27+
//we get the higher order in save actions array. By default it would be `save_and_back`
2828
$higherAction = $this->getSaveActionByOrder(1);
2929

30-
if (empty($higherAction)) {
31-
if ($this->hasOperationSetting('defaultSaveAction')) {
32-
return $this->getOperationSetting('defaultSaveAction');
33-
}
30+
//if there is an higher action and that action is not the backpack default higher one `save_and_back` we return it.
31+
if (! empty($higherAction) && key($higherAction) !== 'save_and_back') {
32+
return key($higherAction);
33+
}
3434

35-
return $this->getSaveActionDefaultForCurrentOperation();
35+
if ($this->hasOperationSetting('defaultSaveAction')) {
36+
return $this->getOperationSetting('defaultSaveAction');
3637
}
3738

38-
return key($higherAction);
39+
return $this->getSaveActionDefaultForCurrentOperation();
3940
}
4041

4142
/**

src/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function backpack_users_have_email()
5555
*/
5656
function backpack_avatar_url($user)
5757
{
58-
$firstLetter = $user->getAttribute('name') ? $user->name[0] : 'A';
58+
$firstLetter = $user->getAttribute('name') ? mb_substr($user->name, 0, 1, 'UTF-8') : 'A';
5959
$placeholder = 'https://placehold.it/160x160/00a65a/ffffff/&text='.$firstLetter;
6060

6161
switch (config('backpack.base.avatar_type')) {

src/resources/lang/lv/base.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
'registration_closed' => 'Reģistrācija aizvērta.',
12+
'no_email_column' => 'Lietotājiem nav piesaistītas e-pasta adreses.',
1213
'first_page_you_see' => 'Pirmā lapa ko redzat pēc pieslēgšanās',
1314
'login_status' => 'Pieslēgšanās statuss',
1415
'logged_in' => 'Jūs esat pieslēgušies!',
@@ -40,13 +41,17 @@
4041
'cancel' => 'Atcelt',
4142
'error' => 'Kļūda',
4243
'success' => 'Darbība veiksmīga',
44+
'warning' => 'Brīdinājums',
45+
'notice' => 'Paziņojums',
4346
'old_password_incorrect' => 'Vecā parole nav pareiza.',
4447
'password_dont_match' => 'Paroles nesakrīt.',
4548
'password_empty' => 'Pārliecinies vai abi paroļu lauki ir aizpildīti.',
4649
'password_updated' => 'Parole nomainīta.',
4750
'account_updated' => 'Konta rediģēšana veiksmīga.',
4851
'unknown_error' => 'Nezināma kļūda. Lūdzu mēģini vēlreiz.',
4952
'error_saving' => 'Kļūda saglabājot. Lūdzu mēģini vēlreiz.',
53+
'welcome' => 'Laipni lūgti!',
54+
'use_sidebar' => 'Izmantojiet sānjoslu pa kreisi, lai izveidotu, rediģētu vai izdzēstu saturu.',
5055

5156
'password_reset' => [
5257
'greeting' => 'Labdien!',

src/resources/lang/lv/crud.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
'save_action_save_and_new' => 'Saglabāt un jauns ieraksts',
1818
'save_action_save_and_edit' => 'Saglabāt un rediģēt šo ierakstu',
1919
'save_action_save_and_back' => 'Saglabāt un atpakaļ',
20+
'save_action_save_and_preview' => 'Saglabāt un priekšskatīt',
2021
'save_action_changed_notification' => 'Uzvedība pēc noklusējuma pēc izmaiņu saglabāšanas.',
2122

2223
// Create form
@@ -37,12 +38,16 @@
3738
'all' => 'Visi ',
3839
'in_the_database' => 'datubāzē',
3940
'list' => 'Saraksts',
41+
'reset' => 'Atiestatīt',
4042
'actions' => 'Darbības',
4143
'preview' => 'Priekšapskats',
4244
'delete' => 'Dzēst',
4345
'admin' => 'Admin',
4446
'details_row' => 'Šī ir detaļu rinda.',
4547
'details_row_loading_error' => 'Notika kļuda lādējot detaļas. Lūdzu atkārtojiet.',
48+
'clone' => 'Klonēt',
49+
'clone_success' => '<strong>Ieraksts ir klonēts</strong><br>Pievienots jauns ieraksts ar tādu pašu informāciju kā šis.',
50+
'clone_failure' => '<strong>Klonēšana neizdevās</strong><br>Jauno ierakstu nevarēja izveidot. Lūdzu mēģiniet vēlreiz.',
4651

4752
// Confirmation messages and bubbles
4853
'delete_confirm' => 'Vai esat pārliecināti, ka gribat izdzēst šo ierakstu?',
@@ -53,6 +58,18 @@
5358
'delete_confirmation_not_deleted_title' => 'Nav izdzēsts',
5459
'delete_confirmation_not_deleted_message' => 'Nekas nenotika. Ieraksts ir drošībā.',
5560

61+
// Bulk actions
62+
'bulk_no_entries_selected_title' => 'Nav atlasīts neviens ieraksts',
63+
'bulk_no_entries_selected_message' => 'Lūdzu atlasiet vienu vai vairākus ierakstus, lai ar tiem veiktu lielapjoma darbību.',
64+
65+
// Bulk confirmation
66+
'bulk_delete_are_you_sure' => 'Vai tiešām vēlaties izdzēst šos :number ierakstus?',
67+
'bulk_delete_sucess_title' => 'Ieraksti dzēsti',
68+
'bulk_delete_sucess_message' => ' ieraksti tika izdzēsti',
69+
'bulk_delete_error_title' => 'Dzēšana neizdevās',
70+
'bulk_delete_error_message' => 'Vienu vai vairākus ierakstus neizdevās izdzēst',
71+
72+
// Ajax errors
5673
'ajax_error_title' => 'Kļūda',
5774
'ajax_error_text' => 'Kļūda ielādējot saturu. Lūdzu pārlādē lapu.',
5875

@@ -79,6 +96,7 @@
7996
'sortDescending' => ': aktivizējiet lai šķirot dilstoši',
8097
],
8198
'export' => [
99+
'export' => 'Eksports',
82100
'copy' => 'Kopēt',
83101
'excel' => 'Excel',
84102
'csv' => 'CSV',
@@ -124,11 +142,18 @@
124142
'internal_link_placeholder' => 'Iekšējās saites vārds. Piemēram: \'admin/page\' (no quotes) for \':url\'',
125143
'external_link' => 'Ārējā saite',
126144
'choose_file' => 'Izvēlaties failu',
145+
'new_item' => 'Jauns ieraksts',
146+
'select_entry' => 'Atlasiet ierakstu',
147+
'select_entries' => 'Atlasiet ierakstus',
127148

128149
//Table field
129150
'table_cant_add' => 'Nevar pievienot jaunu :entity',
130151
'table_max_reached' => 'Sasniegts maksimālais skaits no :max',
131152

132153
// File manager
133154
'file_manager' => 'Failu Pārlūks',
155+
156+
// InlineCreateOperation
157+
'related_entry_created_success' => 'Saistītais ieraksts ir izveidots un atlasīts.',
158+
'related_entry_created_error' => 'Neizdevās izveidot saistīto ierakstu.',
134159
];

0 commit comments

Comments
 (0)