|
|
|
|
@ -171,7 +171,12 @@ |
|
|
|
|
sb_realty_top.setHeader("Объект"); |
|
|
|
|
sb_realty_top.connectSelectedContainer(select_realty); |
|
|
|
|
sb_realty_top.dataPromise.then(function () { |
|
|
|
|
if (!sb_realty_top.dataTree.data.length) sb_realty_top.hide(); |
|
|
|
|
if (!sb_realty_top.dataTree.data.length) { |
|
|
|
|
sb_realty_top.hide(); |
|
|
|
|
} else { |
|
|
|
|
var id = window.location.hash.replace("#", ""); |
|
|
|
|
sb_realty_top.setElementById(id); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
select_realty.on("add", function (args) { |
|
|
|
|
//TODO: Костыли!!!
|
|
|
|
|
@ -922,19 +927,24 @@ |
|
|
|
|
this._fillOptionsData(); |
|
|
|
|
this._bindEvents(); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
key: 'setElementById', |
|
|
|
|
value: function setElementById(id) { |
|
|
|
|
_get(NoTreeSelect.prototype.__proto__ || Object.getPrototypeOf(NoTreeSelect.prototype), 'setElementById', this).call(this, id); |
|
|
|
|
this.selectedContainer.add(id); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
key: '_onclickOptionsElement', |
|
|
|
|
value: function _onclickOptionsElement(e) { |
|
|
|
|
var id = $(e.target).data("id"); |
|
|
|
|
this.selectedEl.id = id; |
|
|
|
|
this.selectedEl.value = $(e.target).html(); |
|
|
|
|
this.$searchInput.val($(e.target).html()); |
|
|
|
|
|
|
|
|
|
this.$buttonAddOptions.show(); |
|
|
|
|
this.$optionsBox.hide(); |
|
|
|
|
|
|
|
|
|
// this.selectedEl.id = id;
|
|
|
|
|
// this.selectedEl.value = $(e.target).html();
|
|
|
|
|
// this.$searchInput.val($(e.target).html());
|
|
|
|
|
//
|
|
|
|
|
// this.$buttonAddOptions.show();
|
|
|
|
|
// this.$optionsBox.hide();
|
|
|
|
|
_get(NoTreeSelect.prototype.__proto__ || Object.getPrototypeOf(NoTreeSelect.prototype), '_onclickOptionsElement', this).call(this, e); |
|
|
|
|
this.clear(); |
|
|
|
|
this.selectedContainer.add(id); |
|
|
|
|
// let id = $(e.target).data("id");
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
@ -1348,13 +1358,20 @@ |
|
|
|
|
$(this).find('.header').hide(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
key: "setElementById", |
|
|
|
|
value: function setElementById(id) { |
|
|
|
|
var value = this.dataTree.getElementById(id).name; |
|
|
|
|
this.selectedEl.id = id; |
|
|
|
|
this.selectedEl.value = value; |
|
|
|
|
this.$searchInput.val(value); |
|
|
|
|
this.updateEditableContainer(id); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
key: "_onclickOptionsElement", |
|
|
|
|
value: function _onclickOptionsElement(e) { |
|
|
|
|
this.selectedEl.id = $(e.target).data("id"); |
|
|
|
|
this.selectedEl.value = $(e.target).html(); |
|
|
|
|
this.$searchInput.val($(e.target).html()); |
|
|
|
|
this.updateEditableContainer($(e.target).data("id")); |
|
|
|
|
var id = $(e.target).data("id"); |
|
|
|
|
this.setElementById(id); |
|
|
|
|
this.$buttonAddOptions.show(); |
|
|
|
|
this.$optionsBox.hide(); |
|
|
|
|
} |
|
|
|
|
|