...
|
...
|
@@ -106,6 +106,8 @@ function selectDistItem(options) { |
|
|
distItemAreaId = options.distItemAreaId, // 当前选中areaId
|
|
|
config = options.config;
|
|
|
|
|
|
var from;
|
|
|
|
|
|
if (distElement.hasClass('checked')) {
|
|
|
// TODO
|
|
|
// distElement.removeClass('checked');
|
...
|
...
|
@@ -125,11 +127,19 @@ function selectDistItem(options) { |
|
|
config.url = setRequestUrl(config, currAreaId);
|
|
|
|
|
|
// 选择之后关闭当前panel
|
|
|
// distItem.trigger('click');
|
|
|
|
|
|
distItem.trigger('click');
|
|
|
|
|
|
// console.log('current level:', level)
|
|
|
// console.log('distItemAreaId:', distItemAreaId)
|
|
|
// console.log('currAreaId:', currAreaId)
|
|
|
// 当前点击的和已选择的不同,再渲染下一级目录
|
|
|
if (level && distItemAreaId !== currAreaId) {
|
|
|
resetNextLevel(level - 1, config);
|
|
|
from = level;
|
|
|
while(from >= 1) {
|
|
|
resetNextLevel(from - 1, config);
|
|
|
from--;
|
|
|
}
|
|
|
|
|
|
$(config.el).trigger('ca.afterInit', [config, level - 1]);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -137,8 +147,8 @@ function selectDistItem(options) { |
|
|
|
|
|
// 获取初始化数据
|
|
|
function fetchInitialData(evt, config, level) {
|
|
|
var distItemAreaId = $('.items-indicator .open input').val(),
|
|
|
ajaxSettings = $.extend({}, config.ajaxSettings, {
|
|
|
//var distItemAreaId = $('.items-indicator .open input').val(),
|
|
|
var ajaxSettings = $.extend({}, config.ajaxSettings, {
|
|
|
url: config.url
|
|
|
});
|
|
|
|
...
|
...
|
@@ -176,7 +186,7 @@ function fetchInitialData(evt, config, level) { |
|
|
level: level,
|
|
|
target: $(this),
|
|
|
panel: currPanel,
|
|
|
distItemAreaId: distItemAreaId,
|
|
|
distItemAreaId: currPanel.prev().find('input').val(),
|
|
|
config: config
|
|
|
});
|
|
|
});
|
...
|
...
|
|