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
a5f13923
Kaydet (Commit)
a5f13923
authored
Haz 29, 2018
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #29536 -- Fixed SelectFilter2.js resizing to make boxes have equal height.
Thanks Tim Graham for the review.
üst
4fba321a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
SelectFilter2.js
django/contrib/admin/static/admin/js/SelectFilter2.js
+2
-2
SelectFilter2.test.js
js_tests/admin/SelectFilter2.test.js
+4
-0
No files found.
django/contrib/admin/static/admin/js/SelectFilter2.js
Dosyayı görüntüle @
a5f13923
...
@@ -164,8 +164,8 @@ Requires jQuery, core.js, and SelectBox.js.
...
@@ -164,8 +164,8 @@ Requires jQuery, core.js, and SelectBox.js.
if
(
!
is_stacked
)
{
if
(
!
is_stacked
)
{
// In horizontal mode, give the same height to the two boxes.
// In horizontal mode, give the same height to the two boxes.
var
j_from_box
=
$
(
from_box
);
var
j_from_box
=
$
(
'#'
+
field_id
+
'_from'
);
var
j_to_box
=
$
(
to_box
);
var
j_to_box
=
$
(
'#'
+
field_id
+
'_to'
);
var
resize_filters
=
function
()
{
j_to_box
.
height
(
$
(
filter_p
).
outerHeight
()
+
j_from_box
.
outerHeight
());
};
var
resize_filters
=
function
()
{
j_to_box
.
height
(
$
(
filter_p
).
outerHeight
()
+
j_from_box
.
outerHeight
());
};
if
(
j_from_box
.
outerHeight
()
>
0
)
{
if
(
j_from_box
.
outerHeight
()
>
0
)
{
resize_filters
();
// This fieldset is already open. Resize now.
resize_filters
();
// This fieldset is already open. Resize now.
...
...
js_tests/admin/SelectFilter2.test.js
Dosyayı görüntüle @
a5f13923
...
@@ -11,6 +11,10 @@ QUnit.test('init', function(assert) {
...
@@ -11,6 +11,10 @@ QUnit.test('init', function(assert) {
SelectFilter
.
init
(
'id'
,
'things'
,
0
);
SelectFilter
.
init
(
'id'
,
'things'
,
0
);
assert
.
equal
(
$
(
'.selector-available h2'
).
text
().
trim
(),
"Available things"
);
assert
.
equal
(
$
(
'.selector-available h2'
).
text
().
trim
(),
"Available things"
);
assert
.
equal
(
$
(
'.selector-chosen h2'
).
text
().
trim
(),
"Chosen things"
);
assert
.
equal
(
$
(
'.selector-chosen h2'
).
text
().
trim
(),
"Chosen things"
);
assert
.
equal
(
$
(
'.selector-available select'
).
outerHeight
()
+
$
(
'.selector-filter'
).
outerHeight
(),
$
(
'.selector-chosen select'
).
height
()
);
assert
.
equal
(
$
(
'.selector-chooseall'
).
text
(),
"Choose all"
);
assert
.
equal
(
$
(
'.selector-chooseall'
).
text
(),
"Choose all"
);
assert
.
equal
(
$
(
'.selector-add'
).
text
(),
"Choose"
);
assert
.
equal
(
$
(
'.selector-add'
).
text
(),
"Choose"
);
assert
.
equal
(
$
(
'.selector-remove'
).
text
(),
"Remove"
);
assert
.
equal
(
$
(
'.selector-remove'
).
text
(),
"Remove"
);
...
...
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