Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
7f155a07
Kaydet (Commit)
7f155a07
authored
Haz 20, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #25006 -- Added a '6 p.m.' option to the admin's time picker.
üst
e7b4bd48
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
DateTimeShortcuts.js
.../contrib/admin/static/admin/js/admin/DateTimeShortcuts.js
+2
-0
1.9.txt
docs/releases/1.9.txt
+4
-0
tests.py
tests/admin_widgets/tests.py
+7
-0
No files found.
django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js
Dosyayı görüntüle @
7f155a07
...
@@ -124,6 +124,7 @@ var DateTimeShortcuts = {
...
@@ -124,6 +124,7 @@ var DateTimeShortcuts = {
// <li><a href="#">Midnight</a></li>
// <li><a href="#">Midnight</a></li>
// <li><a href="#">6 a.m.</a></li>
// <li><a href="#">6 a.m.</a></li>
// <li><a href="#">Noon</a></li>
// <li><a href="#">Noon</a></li>
// <li><a href="#">6 p.m.</a></li>
// </ul>
// </ul>
// <p class="calendar-cancel"><a href="#">Cancel</a></p>
// <p class="calendar-cancel"><a href="#">Cancel</a></p>
// </div>
// </div>
...
@@ -143,6 +144,7 @@ var DateTimeShortcuts = {
...
@@ -143,6 +144,7 @@ var DateTimeShortcuts = {
quickElement
(
"a"
,
quickElement
(
"li"
,
time_list
),
gettext
(
"Midnight"
),
"href"
,
"javascript:DateTimeShortcuts.handleClockQuicklink("
+
num
+
", 0);"
);
quickElement
(
"a"
,
quickElement
(
"li"
,
time_list
),
gettext
(
"Midnight"
),
"href"
,
"javascript:DateTimeShortcuts.handleClockQuicklink("
+
num
+
", 0);"
);
quickElement
(
"a"
,
quickElement
(
"li"
,
time_list
),
gettext
(
"6 a.m."
),
"href"
,
"javascript:DateTimeShortcuts.handleClockQuicklink("
+
num
+
", 6);"
);
quickElement
(
"a"
,
quickElement
(
"li"
,
time_list
),
gettext
(
"6 a.m."
),
"href"
,
"javascript:DateTimeShortcuts.handleClockQuicklink("
+
num
+
", 6);"
);
quickElement
(
"a"
,
quickElement
(
"li"
,
time_list
),
gettext
(
"Noon"
),
"href"
,
"javascript:DateTimeShortcuts.handleClockQuicklink("
+
num
+
", 12);"
);
quickElement
(
"a"
,
quickElement
(
"li"
,
time_list
),
gettext
(
"Noon"
),
"href"
,
"javascript:DateTimeShortcuts.handleClockQuicklink("
+
num
+
", 12);"
);
quickElement
(
"a"
,
quickElement
(
"li"
,
time_list
),
gettext
(
"6 p.m."
),
"href"
,
"javascript:DateTimeShortcuts.handleClockQuicklink("
+
num
+
", 18);"
);
var
cancel_p
=
quickElement
(
'p'
,
clock_box
);
var
cancel_p
=
quickElement
(
'p'
,
clock_box
);
cancel_p
.
className
=
'calendar-cancel'
;
cancel_p
.
className
=
'calendar-cancel'
;
...
...
docs/releases/1.9.txt
Dosyayı görüntüle @
7f155a07
...
@@ -127,6 +127,7 @@ Minor features
...
@@ -127,6 +127,7 @@ Minor features
applications for the current user, has been added to the
applications for the current user, has been added to the
:meth:`AdminSite.each_context() <django.contrib.admin.AdminSite.each_context>`
:meth:`AdminSite.each_context() <django.contrib.admin.AdminSite.each_context>`
method.
method.
* :attr:`AdminSite.empty_value_display
* :attr:`AdminSite.empty_value_display
<django.contrib.admin.AdminSite.empty_value_display>` and
<django.contrib.admin.AdminSite.empty_value_display>` and
:attr:`ModelAdmin.empty_value_display
:attr:`ModelAdmin.empty_value_display
...
@@ -134,6 +135,9 @@ Minor features
...
@@ -134,6 +135,9 @@ Minor features
the display of empty values in admin change list. You can also customize the
the display of empty values in admin change list. You can also customize the
value for each field.
value for each field.
* The time picker widget includes a '6 p.m' option for consistency of having
predefined options every 6 hours.
:mod:`django.contrib.auth`
:mod:`django.contrib.auth`
^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^
...
...
tests/admin_widgets/tests.py
Dosyayı görüntüle @
7f155a07
...
@@ -645,6 +645,13 @@ class DateTimePickerSeleniumFirefoxTests(SeleniumDataMixin, AdminSeleniumWebDriv
...
@@ -645,6 +645,13 @@ class DateTimePickerSeleniumFirefoxTests(SeleniumDataMixin, AdminSeleniumWebDriv
# Check that the time picker is visible
# Check that the time picker is visible
self
.
assertEqual
(
self
.
assertEqual
(
self
.
get_css_value
(
'#clockbox0'
,
'display'
),
'block'
)
self
.
get_css_value
(
'#clockbox0'
,
'display'
),
'block'
)
self
.
assertEqual
(
[
x
.
text
for
x
in
self
.
selenium
.
find_elements_by_xpath
(
"//ul[@class='timelist']/li/a"
)
],
[
'Now'
,
'Midnight'
,
'6 a.m.'
,
'Noon'
,
'6 p.m.'
]
)
# Press the ESC key
# Press the ESC key
self
.
selenium
.
find_element_by_tag_name
(
'body'
)
.
send_keys
([
Keys
.
ESCAPE
])
self
.
selenium
.
find_element_by_tag_name
(
'body'
)
.
send_keys
([
Keys
.
ESCAPE
])
# Check that the time picker is hidden again
# Check that the time picker is hidden again
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment