Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

final flexible admin filter #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xuanbao2008
Copy link
Collaborator

Mọi người thử pull về local test thử nhé, nếu ok thì merge thẳng vào master luôn

@xuanbao2008 xuanbao2008 force-pushed the customized-flexible-chain-dropdown branch 2 times, most recently from cb56ddf to fbaaf41 Compare November 12, 2020 19:15
@xuanbao2008 xuanbao2008 force-pushed the customized-flexible-chain-dropdown branch from fbaaf41 to 119a013 Compare November 12, 2020 19:23
@dangquangdon
Copy link
Contributor

Theo mình thì nên làm cái này ở backend, django có cái library django-select2

@xuanbao2008
Copy link
Collaborator Author

xuanbao2008 commented Nov 13, 2020

Theo mình thì nên làm cái này ở backend, django có cái library django-select2

Mình đã thử cái select2 mặc định của django, mình gọi nó thông qua .select2 trên element nhưng ko được, đã ráng dùng cách đó trước khi customize lại theo cách dùng external select2 lib

@dangquangdon
Copy link
Contributor

Theo mình thì nên làm cái này ở backend, django có cái library django-select2

Mình đã thử cái select2 mặc định của django, mình gọi nó thông qua .select2 trên element nhưng ko được, đã ráng dùng cách đó trước khi customize lại theo cách dùng external select2 lib

Vậy à 🤔 Chắc mình sẽ thử lại sau, mình nghĩ cái select2 này có thể dùng đc ở nhiều chỗ khác nữa. Với cả mình góp ý chút là lần sau bạn viết commit message và description PR cụ thể 1 chút nhé 😓

Copy link
Contributor

@dangquangdon dangquangdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Bạn thử xem lại 2 cái api huyện và xã nhé. Mình nghĩ bạn �rebase PR về develop rồi sửa lại xem.
  • Codestyle cần chỉnh lại


var all_huyen_data = [];

$.get("/get_huyen_api", function(response) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hình như cái path này mình đã remove or PR #238 này rồi (merged to develop)


var all_xa_data = [];

$.get("/get_xa_api", function(response) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hình như cái path này mình đã remove or PR #238 này rồi (merged to develop)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mình có từng thấy bạn sửa cái api đấy trong develop branch, để mình pull branch đấy về rồi sửa theo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bạn ơi, mình test cái merged PR trong develop branch, nó ok lắm, bạn có thể merge nó vào master luôn được ko, mình cũng tìm ra cách để fix cái pr của mình rồi, giờ chỉ cần adapt theo cái api path của bạn là ổn @dangquangdon

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge develop -> master thì mình nghĩ để nhóm quán lý các bạn ý merge. Bạn có thể đổi lại target branch của PR này từ master sang develop cũng đc

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xuanbao2008 cần chỉnh lại target branch thành develop

Hiện tại, cái git flow của mình đang hơi bị dị. Hết tháng 11 mình nghĩ mình sẽ xóa hết các branch, để lại mỗi branch master thôi, rồi archive repo.

var remainingChars = args.minimum - args.input.length;
var message = 'Hãy nhập nhiều hơn ' + remainingChars + ' ký tự';
return message;
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tại sao phải có inputTooLonginputTooShort nhỉ? Nếu không cần thì nên bỏ đi để code đỡ phức tạp.

maximumSelected: function (args) {
var message = 'Bạn chỉ được chọn ' + args.maximum + ' mục';
return message;
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maximumSelected, cái này cũng vậy. Mình đâu có chỗ nào cho phép multi choice đâu đúng không? Nên bỏ các code thừa đi nếu có thể.

return 'Đang tìm kiếm...';
}
};
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nếu mình không nhầm thì select2 có hỗ trợ sẵn tiếng Việt.

https://select2.org/i18n

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mình đã fix dc select2 mặc định rồi,nên code về translation ko cần nữa. Mình clean cho gọn rồi sẽ commit lên

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants