Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
jinhu.tung
9 years ago
Commit
13f73641f5dbfad7ff4bf4d5912176f6289848ed
1 parent
e5e2463f
add getAreaLabels, getAreaIds, setAddress APIs
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
34 deletions
public/js/plugins/cascading-address.js
public/js/plugins/cascading-address.js
View file @
13f7364
...
...
@@ -179,38 +179,6 @@ function fetchInitialData(evt, config, level) {
distItemAreaId
:
distItemAreaId
,
config
:
config
});
// distElement = $(this);
// currAreaId = distElement.attr('id').split('_')[1];
// distItem = $('#level_' + level + '_panel').prev();
// if (distElement.hasClass('checked')) {
// // TODO
// // distElement.removeClass('checked');
// } else {
// currPanel.find('span.checked').removeClass('checked').prev().hide();
// distElement.addClass('checked').prev().show();
// distItem.find('.indicator-name')
// .html(distElement.text())
// .next()
// .val(currAreaId);
// // 填充下一级
// if (level < 0) {
// level = distElement.parents('.items-panel').attr('id').split('_')[1];
// }
// config.url = setRequestUrl(config, currAreaId);
// // 选择之后关闭当前panel
// // distItem.trigger('click');
// // 当前点击的和已选择的不同,再渲染下一级目录
// if (level && distItemAreaId !== currAreaId) {
// resetNextLevel(level - 1, config);
// $(config.el).trigger('ca.afterInit', [config, level - 1]);
// }
// }
});
}).
fail
(
function
()
{
// 如果出错,将下级所有都重置
...
...
@@ -447,8 +415,8 @@ CascadingAddress.prototype.setAddress = function(targetAddr) {
if
(
typeof
targetAddr
===
'object'
)
{
for
(
key
in
targetAddr
)
{
if
(
targetAddr
.
hasOwnProperty
(
key
))
{
distIds
.
push
(
targetAddr
[
key
]);
if
(
targetAddr
.
hasOwnProperty
(
key
))
{
distIds
.
push
(
targetAddr
[
key
]);
}
}
...
...
Please
register
or
login
to post a comment