-
-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #321 from newpanjing/dev
Dev
- Loading branch information
Showing
14 changed files
with
688 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
|
||
def get_version(): | ||
return '2020.9.26' | ||
return '2021.1.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from django.contrib import admin | ||
from django.urls import path | ||
|
||
|
||
class AjaxAdmin(admin.ModelAdmin): | ||
|
||
def callback(self, request): | ||
post = request.POST | ||
action = post.get('_action') | ||
selected = post.get('_selected') | ||
|
||
# call admin | ||
if hasattr(self, action): | ||
func, action, description = self.get_action(action) | ||
# 这里的queryset 会有数据过滤,只包含选中的数据 | ||
queryset = self.get_queryset(request) | ||
if selected and selected.split(','): | ||
queryset = queryset.filter(pk__in=selected.split(',')) | ||
|
||
return func(self, request, queryset) | ||
|
||
def get_urls(self): | ||
info = self.model._meta.app_label, self.model._meta.model_name | ||
|
||
return super().get_urls() + [ | ||
path('ajax', self.callback, name='%s_%s_ajax' % info) | ||
] |
123 changes: 123 additions & 0 deletions
123
simpleui/static/admin/simpleui-x/elementui/locale/lang/eo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
'use strict'; | ||
|
||
exports.__esModule = true; | ||
exports.default = { | ||
el: { | ||
colorpicker: { | ||
confirm: 'Bone', | ||
clear: 'Malplenigi' | ||
}, | ||
datepicker: { | ||
now: 'Nun', | ||
today: 'Hodiaŭ', | ||
cancel: 'Nuligi', | ||
clear: 'Malplenigi', | ||
confirm: 'Bone', | ||
selectDate: 'Elektu daton', | ||
selectTime: 'Elektu horon', | ||
startDate: 'Komenca Dato', | ||
startTime: 'Komenca Horo', | ||
endDate: 'Fina Dato', | ||
endTime: 'Fina Horo', | ||
prevYear: 'Antaŭa Jaro', | ||
nextYear: 'Sekva Jaro', | ||
prevMonth: 'Antaŭa Monato', | ||
nextMonth: 'Sekva Monato', | ||
year: 'Jaro', | ||
month1: 'Januaro', | ||
month2: 'Februaro', | ||
month3: 'Marto', | ||
month4: 'Aprilo', | ||
month5: 'Majo', | ||
month6: 'Junio', | ||
month7: 'Julio', | ||
month8: 'Aŭgusto', | ||
month9: 'Septembro', | ||
month10: 'Oktobro', | ||
month11: 'Novembro', | ||
month12: 'Decembro', | ||
week: 'Semajno', | ||
weeks: { | ||
sun: 'Dim', | ||
mon: 'Lun', | ||
tue: 'Mar', | ||
wed: 'Mer', | ||
thu: 'Ĵaŭ', | ||
fri: 'Ven', | ||
sat: 'Sab' | ||
}, | ||
months: { | ||
jan: 'Jan', | ||
feb: 'Feb', | ||
mar: 'Mar', | ||
apr: 'Apr', | ||
may: 'Maj', | ||
jun: 'Jun', | ||
jul: 'Jul', | ||
aug: 'Aŭg', | ||
sep: 'Sep', | ||
oct: 'Okt', | ||
nov: 'Nov', | ||
dec: 'Dec' | ||
} | ||
}, | ||
select: { | ||
loading: 'Ŝarĝante', | ||
noMatch: 'Neniuj kongruaj datumoj', | ||
noData: 'Neniuj datumoj', | ||
placeholder: 'Bonvolu elekti' | ||
}, | ||
cascader: { | ||
noMatch: 'Neniuj kongruaj datumoj', | ||
loading: 'Ŝarĝante', | ||
placeholder: 'Bonvolu elekti', | ||
noData: 'Neniuj datumoj' | ||
}, | ||
pagination: { | ||
goto: 'Iru al', | ||
pagesize: '/ paĝo', | ||
total: 'Entute {total}', | ||
pageClassifier: '' | ||
}, | ||
messagebox: { | ||
title: 'Mesaĝo', | ||
confirm: 'Bone', | ||
cancel: 'Nuligi', | ||
error: 'Nevalida Enigo!' | ||
}, | ||
upload: { | ||
deleteTip: 'Premu "Delete" por forigi', | ||
delete: 'Forigi', | ||
preview: 'Antaŭrigardi', | ||
continue: 'Daŭrigi' | ||
}, | ||
table: { | ||
emptyText: 'Neniuj datumoj', | ||
confirmFilter: 'Konfirmi', | ||
resetFilter: 'Restarigi', | ||
clearFilter: 'Ĉiuj', | ||
sumText: 'Sumo' | ||
}, | ||
tree: { | ||
emptyText: 'Neniuj datumoj' | ||
}, | ||
transfer: { | ||
noMatch: 'Neniuj kongruaj datumoj', | ||
noData: 'Neniuj datumoj', | ||
titles: ['Listo 1', 'Listo 2'], | ||
filterPlaceholder: 'Enigu ŝlosilvorton', | ||
noCheckedFormat: '{total} elementoj', | ||
hasCheckedFormat: '{checked}/{total} elektitaj' | ||
}, | ||
image: { | ||
error: 'MALSUKCESIS' | ||
}, | ||
pageHeader: { | ||
title: 'Reen' | ||
}, | ||
popconfirm: { | ||
confirmButtonText: 'Yes', // to be translated | ||
cancelButtonText: 'No' // to be translated | ||
} | ||
} | ||
}; |
Oops, something went wrong.