|
|
@ -70386,12 +70386,12 @@ jQuery._farbtastic = function (container, callback) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Mousedown handler |
|
|
|
* Mousedown handler |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fb.mousedown = function (event) { |
|
|
|
fb.click = function (event) { |
|
|
|
// Capture mouse
|
|
|
|
// Capture mouse
|
|
|
|
if (!document.dragging) { |
|
|
|
// if (!document.dragging) {
|
|
|
|
$(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); |
|
|
|
// $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup);
|
|
|
|
document.dragging = true; |
|
|
|
// document.dragging = true;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// Check which area is being dragged
|
|
|
|
// Check which area is being dragged
|
|
|
|
var pos = fb.widgetCoords(event); |
|
|
|
var pos = fb.widgetCoords(event); |
|
|
@ -70426,12 +70426,12 @@ jQuery._farbtastic = function (container, callback) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Mouseup handler |
|
|
|
* Mouseup handler |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fb.mouseup = function () { |
|
|
|
// fb.mouseup = function () {
|
|
|
|
// Uncapture mouse
|
|
|
|
// // Uncapture mouse
|
|
|
|
$(document).unbind('mousemove', fb.mousemove); |
|
|
|
// $(document).unbind('mousemove', fb.mousemove);
|
|
|
|
$(document).unbind('mouseup', fb.mouseup); |
|
|
|
// $(document).unbind('mouseup', fb.mouseup);
|
|
|
|
document.dragging = false; |
|
|
|
// document.dragging = false;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Update the markers and styles |
|
|
|
* Update the markers and styles |
|
|
@ -70549,7 +70549,7 @@ jQuery._farbtastic = function (container, callback) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Install mousedown handler (the others are set on the document on-demand)
|
|
|
|
// Install mousedown handler (the others are set on the document on-demand)
|
|
|
|
$('*', e).mousedown(fb.mousedown); |
|
|
|
$('*', e).click(fb.click); |
|
|
|
|
|
|
|
|
|
|
|
// Init color
|
|
|
|
// Init color
|
|
|
|
fb.setColor('#000000'); |
|
|
|
fb.setColor('#000000'); |
|
|
@ -88530,8 +88530,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { |
|
|
|
dynamic: false |
|
|
|
dynamic: false |
|
|
|
}, |
|
|
|
}, |
|
|
|
// onLoaded: o.onLoaded,
|
|
|
|
// onLoaded: o.onLoaded,
|
|
|
|
el: { |
|
|
|
el: {} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () { |
|
|
|
this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () { |
|
|
|
self.storeValue = this.getValue(); |
|
|
|
self.storeValue = this.getValue(); |
|
|
@ -88586,21 +88585,33 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
eventName: BI.Searcher.EVENT_PAUSE, |
|
|
|
eventName: BI.Searcher.EVENT_PAUSE, |
|
|
|
action: function () { |
|
|
|
action: function () { |
|
|
|
|
|
|
|
var keyword = this.getKeyword(); |
|
|
|
if (this.hasMatched()) { |
|
|
|
if (this.hasMatched()) { |
|
|
|
var keyword = this.getKeyword(); |
|
|
|
|
|
|
|
self._join({ |
|
|
|
self._join({ |
|
|
|
type: BI.Selection.Multi, |
|
|
|
type: BI.Selection.Multi, |
|
|
|
value: [keyword] |
|
|
|
value: [keyword] |
|
|
|
}, function () { |
|
|
|
}, function () { |
|
|
|
|
|
|
|
if (self.storeValue.type === BI.Selection.Multi) { |
|
|
|
|
|
|
|
self.storeValue.value.pushDistinct(keyword) |
|
|
|
|
|
|
|
} |
|
|
|
self._showAdapter(); |
|
|
|
self._showAdapter(); |
|
|
|
self.adapter.setValue(self.storeValue); |
|
|
|
self.adapter.setValue(self.storeValue); |
|
|
|
self._setStartValue(keyword); |
|
|
|
self._setStartValue(keyword); |
|
|
|
assertShowValue(); |
|
|
|
assertShowValue(); |
|
|
|
|
|
|
|
self.adapter.populate(); |
|
|
|
self._setStartValue(""); |
|
|
|
self._setStartValue(""); |
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
if (self.storeValue.type === BI.Selection.Multi) { |
|
|
|
|
|
|
|
self.storeValue.value.pushDistinct(keyword) |
|
|
|
|
|
|
|
} |
|
|
|
self._showAdapter(); |
|
|
|
self._showAdapter(); |
|
|
|
|
|
|
|
self.adapter.setValue(self.storeValue); |
|
|
|
|
|
|
|
self.adapter.populate(); |
|
|
|
|
|
|
|
if (self.storeValue.type === BI.Selection.Multi) { |
|
|
|
|
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, { |
|
|
|
}, { |
|
|
@ -88632,7 +88643,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { |
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
self._join(this.getValue(), function () {//安徽省 北京
|
|
|
|
self._join(this.getValue(), function () { |
|
|
|
assertShowValue(); |
|
|
|
assertShowValue(); |
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -88753,30 +88764,32 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_adjust: function (callback) { |
|
|
|
_adjust: function (callback) { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
if (!this._count) { |
|
|
|
// if (!this._count) {
|
|
|
|
o.itemsCreator({ |
|
|
|
// o.itemsCreator({
|
|
|
|
type: BI.MultiSelectList.REQ_GET_DATA_LENGTH |
|
|
|
// type: BI.MultiSelectList.REQ_GET_DATA_LENGTH
|
|
|
|
}, function (res) { |
|
|
|
// }, function (res) {
|
|
|
|
self._count = res.count; |
|
|
|
// self._count = res.count;
|
|
|
|
adjust(); |
|
|
|
// adjust();
|
|
|
|
callback(); |
|
|
|
// callback();
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
} else { |
|
|
|
// } else {
|
|
|
|
adjust(); |
|
|
|
adjust(); |
|
|
|
callback(); |
|
|
|
callback(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
function adjust() { |
|
|
|
function adjust() { |
|
|
|
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { |
|
|
|
// if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
|
|
|
|
self.storeValue = { |
|
|
|
// self.storeValue = {
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
// type: BI.Selection.Multi,
|
|
|
|
value: [] |
|
|
|
// value: []
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { |
|
|
|
// } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
|
|
|
|
self.storeValue = { |
|
|
|
// self.storeValue = {
|
|
|
|
type: BI.Selection.All, |
|
|
|
// type: BI.Selection.All,
|
|
|
|
value: [] |
|
|
|
// value: []
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|