Skip to content

Commit

Permalink
Merge pull request #321 from newpanjing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
newpanjing authored Nov 30, 2020
2 parents c4b533e + 7c32f0c commit 2bdabbe
Show file tree
Hide file tree
Showing 14 changed files with 688 additions and 158 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ Django admin theme the simpleui

---

---
<p align="center">
<a href="https://simpleui.88cto.com/docs/simpleui" target="_blank">文档</a> |
<a href="https://simpleui.88cto.com/docs/simpleui" target="_blank">Documents</a>
</p>
---
<a href="https://www.88cto.com/admin/">
<img alt="demo" src="https://github.com/newpanjing/simpleui/raw/master/images/%E4%B8%BB%E9%A1%B5.png" width="420" align="right" style="max-width: 50%">
</a>
Expand Down
2 changes: 1 addition & 1 deletion simpleui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


def get_version():
return '2020.9.26'
return '2021.1.0'
27 changes: 27 additions & 0 deletions simpleui/admin.py
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 simpleui/static/admin/simpleui-x/elementui/locale/lang/eo.js
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
}
}
};
Loading

0 comments on commit 2bdabbe

Please sign in to comment.