|
$(document).ready(function () {
|
$("form").each(function (i) {
|
var action = location.href;
|
var tmpFun = function (UseNewType) {
|
// $("input[type='text']:not(.notchange)").each(function () {
|
// var $this = $(this);
|
// $this.replaceWith($("<lable>", { Class: "disabled " + $this.attr("class").replace("calendar", "")
|
// , html: $this.val()
|
// , /*style: "width:" + $this.outerWidth()+ "px;"*/width: $this.css("width")
|
// , height: $this.css("height")
|
// //, id: $this.attr("id")
|
// , title: $this.attr("CustomTitle") == null ? $this.text() : $this.attr("CustomTitle")
|
// }));
|
// });
|
|
$("textarea").each(function () {
|
var $this = $(this);
|
$this.replaceWith($("<lable>", { Class: "disabled " + $this.attr("class")
|
, html: $this.val()
|
, /*style: "width:" + $this.outerWidth()+ "px;"*/width: $this.css("width")
|
, height: $this.css("height")
|
, id: $this.attr("id")
|
, title: $this.attr("CustomTitle") == null ? $this.text() : $this.attr("CustomTitle")
|
}));
|
});
|
|
|
$("select").each(function () {
|
var $this = $(this);
|
$this.replaceWith($("<lable>", { Class: "disabled " + $this.attr("class"), html: $this.find("option:selected").html(), width: $this.css("width") == "auto" ? "auto" : (parseInt($this.css("width").replace("px", "")) - 5) + "px", id: $this.attr("id") }));
|
});
|
|
$(":checkbox").unbind("click").click(function () {
|
return false;
|
});
|
|
//$(":submit").hide();
|
|
|
$("input[type='text']:not(.notchange)").each(function () {
|
var $this = $(this);
|
$this.addClass("disabled")
|
$this.prop("disabled", "disabled");
|
$this.css("border", "1px solid #fff");
|
});
|
|
|
};
|
|
var locHref = location.href;
|
if (action.indexOf("View") >= 0 || locHref.indexOf("[View]") >= 0) {
|
tmpFun(false);
|
}
|
|
|
});
|
|
});
|
|
$(document).ready(function () {
|
if (!document.getElementById('__EVENTTARGET') && !document.getElementById('__EVENTARGUMENT')) {
|
__doPostBack = function (eventTarget, eventArgument) {
|
var theForm = document.forms['Form1'];
|
if (!theForm) {
|
theForm = document.Form1 || document.form1;
|
}
|
if (theForm) {
|
$('<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />').appendTo($(theForm));
|
$('<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />').appendTo($(theForm));
|
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
|
theForm.__EVENTTARGET.value = eventTarget;
|
theForm.__EVENTARGUMENT.value = eventArgument;
|
theForm.submit();
|
}
|
}
|
}
|
}
|
})
|