【发布时间】:2016-10-13 08:46:46
【问题描述】:
【问题讨论】:
-
你能给我们你的代码吗?
标签: c# jquery model-view-controller
【问题讨论】:
标签: c# jquery model-view-controller
这是我的代码
$(document).ready(function () {
jQuery('#PropertySearchMap').css({
"position": "absolute !important",
"left": "-10000px !important"
});
if ($('#PropertySearchMap').is(':visible')) {
setTimeout(function () {
Initialize()
}, 500);
jQuery('#PropertySearchMap').show();
jQuery('#PropertySearchMap').css({
"position": "static !important"
});
}
});
function Initialize() {
$("#butSearch").click(function (e) {
ls.mapping.search();
e.preventDefault();
});
$("#butReset").click(function (e) {
var loc = document.location.href.toString().split("#");
document.location = loc[0];
});
$("#butAdd").click(function (e) {
parent.$("@Model.Source.GetTag()").trigger("property:selected", {
propertyId: 0
});
});
$("footer").hide();
$('#select_all').click(function () {
var c = this.checked;
$(':checkbox').prop('checked', c);
});
$(".body-content").css("height", "100%");
$(".body-content").css("width", "100%");
ls.rootUrl = "@System.Configuration.ConfigurationManager.AppSettings["
PropertyServiceUrl "]";
ls.mapping.initiAutoComplete();@
if (Model.DisableMap) {@: ls.mapping.disableClickSearch = true;
}@
if (Model.HideSearchControls && Model.DisableMap) {@: ls.mapping.initializeMap(true);
} else {@: ls.mapping.initializeMap(false);
}@ if (Model.Source == MapSourceEnum.CompSales) {
//@:window.setTimeout(ls.mapping.plotCompsales, 1000); Stephan - verify this is required
@: ls.mapping.plotCompsales();
}@ {@: ls.mapping.propertySelectedEventTarget = "@Model.Source.GetTag()";
}
ls.tools.initToolFuncs();
}
【讨论】: