- 注册时间
- 2013-8-13
- 最后登录
- 2017-4-17
- 阅读权限
- 10
- 积分
- 1519
- 精华
- 0
- 帖子
- 418
 
|
该页面通过其他页面打开的页面
代码如下
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="scripts/boot.js" type="text/javascript"></script>
<script src="scripts/ckeditor/ckeditor.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var allowUserRole = ["*"];
var editor;
$(function () {
//身份验证
if (!hasPermission()) {
return;
}
//身份验证 End
document.pageID = 209;
mini.parse();
var editorId = "editor1";
editor = CreateEditor();
if (top.CmdSendToChildPages) {
var funcName = top.CmdSendToChildPages.funcName;
var para = top.CmdSendToChildPages.para;
if (top.CmdSendToChildPages.pageID == document.pageID) {
//消除命令标识,为了下次直接打开页面不重复执行
top.CmdSendToChildPages.pageID = "";
if (typeof (eval(funcName)) == "function") {
eval(funcName + "(para)");
//return以后就不会执行displayDefault
return;
}
}
}
});
//身份验证 每个htm页面都要有
function hasPermission() {
//身份验证 Begin
if (!top.getPermission) {
//没有在框架内运行
window.location = "Login.htm";
} else {
if (top.getPermission(allowUserRole)) {
return true;
} else {
//没有权限
$("body").html("对不起,您没有权限访问该页面!");
}
}
return false;
}
function EditDeviceOperatPointforSmall(data) {
DeviceSmallClassID = data.DeviceSmallClassID;
$("#StandardNorOperation").html(data.StandardNorOperation);
$("#OperatManagAndOperatPoint").html(data.OperatManagAndOperatPoint);
$("#ComProbAndSolutions").html(data.ComProbAndSolutions);
}
function CreateEditor() {
var editor = CKEDITOR.replace('editor1');
// mini.repaint(document.body);
// mini.parse;
return editor;
}
function openCEeditor(type) {
if (type == 1) {
editor.setData($("#StandardNorOperation").html())
mini.get("CEeditorName").setValue("正常运行的标准")
}
else if (type == 2) {
editor.setData($("#OperatManagAndOperatPoint").html())
mini.get("CEeditorName").setValue("运行管理及操作要点")
}
else if (type == 3) {
editor.setData($("#ComProbAndSolutions").html())
mini.get("CEeditorName").setValue("常见问题及对策")
}
var win = mini.get("win1");
win.show();
}
function showCEeditor() {
var text = mini.get("CEeditorName").getValue();
if (text == "正常运行的标准") {
$("#StandardNorOperation").html(editor.getData())
}
else if (text == "运行管理及操作要点") {
$("#OperatManagAndOperatPoint").html(editor.getData())
}
else if (text == "常见问题及对策") {
$("#ComProbAndSolutions").html(editor.getData())
}
var win = mini.get("win1");
win.hide();
}
function closeCEeditor() {
editor.setData("");
var win = mini.get("win1");
win.hide();
}
function onOk() {
var StandardNorOperation = $("#StandardNorOperation").html();
var OperatManagAndOperatPoint = $("#OperatManagAndOperatPoint").html();
var ComProbAndSolutions = $("#ComProbAndSolutions").html();
$.ajax({
url: "Data/DataServices.aspx?method=SaveDeviceOperatPointforSmall",
type: 'post',
data: { StandardNorOperation: StandardNorOperation, OperatManagAndOperatPoint: OperatManagAndOperatPoint, ComProbAndSolutions: ComProbAndSolutions, DeviceSmallClassID: DeviceSmallClassID },
cache: false,
success: function (text) {
if (text == "1") {
mini.showMessageBox({
showHeader: false,
width: 250,
title: "提示",
buttons: ["ok"],
message: "修改成功",
iconCls: "mini-messagebox-info",
callback: function (action) {
CloseWindow("save");
}
});
}
else {
alert("更新失败");
}
},
error: function (jqXHR, textStatus, errorThrown) {
mini.alert("操作失败,请重试")
CloseWindow("cancel");
}
});
}
function CloseWindow(action) {
top.callChildPageFunc(67, "BockLoad", action);
}
function onCancel() {
CloseWindow("cancel");
}
</script>
</head>
<body>
<div class="mini-toolbar" style="padding: 5px;">
<div style="padding: 1px;">
<a class="mini-button" style="width: 150px;">返回</a>
<a id="okBtn" class="mini-button" style="width: 120px; margin-right: 20px;">
保存</a>
</div>
</div>
<fieldset style="border: solid 1px #aaa; padding: 3px;">
<legend style="font-weight: bold; font-size: 15px;">设备运行管理信息</legend>
<div style="padding: 5px;">
<div style="padding-left: 0px; padding-bottom: 5px;">
<table cellpadding="5" style="width: 100%">
<tr>
<td style="background-color: #eee;">
正常运行的标准:
</td>
<td id="StandardNorOperation">
</td>
<td name="openCEeditor">
<a class="mini-button">编辑</a>
</td>
</tr>
<tr>
<td style="background-color: #eee;">
运行管理及操作要点:
</td>
<td id="OperatManagAndOperatPoint">
</td>
<td name="openCEeditor">
<a class="mini-button">编辑</a>
</td>
</tr>
<tr>
<td style="background-color: #eee;">
常见问题及对策:
</td>
<td id="ComProbAndSolutions">
</td>
<td name="openCEeditor">
<a class="mini-button">编辑</a>
</td>
</tr>
</table>
</div>
</div>
</fieldset>
<div id="win1" class="mini-window" title="Window" showmaxbutton="false" showcollapsebutton="false"
showshadow="false" showtoolbar="true" showheader="false" showfooter="true" showmodal="true"
allowresize="false" allowdrag="false" style="width: 600px; height: 600px">
<div property="toolbar" style="padding: 5px;">
名称:
<input id="CEeditorName" name="CEeditorName" class="mini-textbox asLabel" />
</div>
<textarea id="editor1" name="editor1" class="ckeditor" cols="80" rows="10"></textarea>
<div property="footer" style="text-align: center; padding: 5px; padding-right: 15px;">
<a class="mini-button" plain="true">确定</a> <a class="mini-button"
plain="true">取消</a>
</div>
</div>
</body>
</html>
当我从其他页面点击查看跳转到该页面时:会出现行: 224
错误: [CKEDITOR.resourceManager.load] Resource name "default" was not found at "http://localhost:56259/scripts/ckeditor/styles.js?t=E4KA". 此错误,是ckeditor.js里面的错误
请问我写的代码有问题吗,谢谢
|
|