⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dynaform.js

📁 OBPM是一个开源
💻 JS
字号:
var selectedInputField;
// ??????????????????
function isInputFieldSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();
		if (oControlRange(0).tagName.toUpperCase() == "INPUT") {
			selectedInputField = eWebEditor.document.selection.createRange()(0);
			if (selectedInputField.type.toUpperCase() == "TEXT"){
				return true;
			}
		}	
	}
} 

// ??????????????????
function InputFieldProp(){
	if (isInputFieldSelected()){
		ShowDialog('dialog/inputfield.htm?action=modify', 460, 280, true);
	}
	else {
		ShowDialog('dialog/inputfield.htm?action=new', 460, 280, true);
	} 
}

var selectedSelectField;
// ??????????????????
function isSelectFieldSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();
		if (oControlRange(0).tagName.toUpperCase() == "SELECT") {
			selectedInputField = eWebEditor.document.selection.createRange()(0);
			return true;
		}	
	}
} 

// ??????????????????????
function SelectFieldProp(){
	alert("test1");
	if (isSelectFieldSelected()){
		ShowDialog('dialog/selectfield.htm?action=modify', 460, 280, true);
	}
	else {
		ShowDialog('dialog/selectfield.htm?action=new', 460, 280, true);
	} 
}

var selectedTextareaField;
// ??????????????????
function isTextareaFieldSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();
		if (oControlRange(0).tagName.toUpperCase() == "TEXTAREA") {
			selectedTextareaField = eWebEditor.document.selection.createRange()(0);
			return true;
		}	
	}
} 

// ??????????????????
function TextareaFieldProp(){
	if (isTextareaFieldSelected()){
		ShowDialog('dialog/textareafield.htm?action=modify', 460, 280, true);
	}
	else {
		ShowDialog('dialog/textareafield.htm?action=new', 460, 280, true);
	} 
}

var selectedRadioField;
// ??????????????
function isRadioFieldSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();
		if (oControlRange(0).tagName.toUpperCase() == "INPUT") {
			selectedRadioField = eWebEditor.document.selection.createRange()(0);
			if (selectedRadioField.type.toUpperCase() == "RADIO"){
				return true;
			}
		}	
	}
} 

// ??????????????
function RadioFieldProp(){
	if (isRadioFieldSelected()){
		ShowDialog('dialog/radiofield.htm?action=modify', 460, 280, true);
	}
	else {
		ShowDialog('dialog/radiofield.htm?action=new', 460, 280, true);
	} 
}

var selectedCheckboxField;
// ??????????????
function isCheckboxFieldSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();
		if (oControlRange(0).tagName.toUpperCase() == "INPUT") {
			selectedCheckboxField = eWebEditor.document.selection.createRange()(0);
			if (selectedCheckboxField.type.toUpperCase() == "CHECKBOX"){
				return true;
			}
		}	
	}
} 

// ??????????????
function CheckboxFieldProp(){
	if (isCheckboxFieldSelected()){
		ShowDialog('dialog/checkboxfield.htm?action=modify', 460, 280, true);
	}
	else {
		ShowDialog('dialog/checkboxfield.htm?action=new', 460, 280, true);
	} 
}

var selectedCalctextField;
// ????????????????
function isCalctextFieldSelected() {
//	if (eWebEditor.document.selection.type == "Control") {
//		var oControlRange = eWebEditor.document.selection.createRange();
//		if (oControlRange(0).tagName.toUpperCase() == "IMG") {
//			selectedCalctextField = eWebEditor.document.selection.createRange()(0);
//			if (selectedCalctextField.type.toUpperCase() == "CALCTEXT"){
//				return true;
//			}
//		}	
//	}
} 

// ????????????????
function CalctextFieldProp(){
	if (isCalctextFieldSelected()){
//		ShowDialog('dialog/calctextfield.htm?action=modify', 460, 280, true);
	}
	else {
		ShowDialog('dialog/calctextfield.htm?action=new', 460, 280, true);
	} 
}

//??????????
var selectedImageUpload;

// ??????????????????
function isImageUploadSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();

		if (oControlRange(0).tagName.toUpperCase() == "IMG") {
			selectedImageUpload = eWebEditor.document.selection.createRange()(0);
			if ((selectedImageUpload.type!=null)&&(selectedImageUpload.type.toUpperCase() == "IMAGEUPLOAD")){
				return true;
			}
		}	
	}
} 

// ??????????????????
function ImageUploadProp(){
	if (isImageUploadSelected()){
		ShowDialog('dialog/imageupload.htm?action=modify', 320, 230, true);
	}
	else {
		ShowDialog('dialog/imageupload.htm?action=new', 320, 230, true);
	} 
}

//??????????
var selectedAttachmentUpload;

// ??????????????????
function isAttachmentUploadSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();

		if (oControlRange(0).tagName.toUpperCase() == "IMG") {
			 selectedAttachmentUpload = eWebEditor.document.selection.createRange()(0);
			if ((selectedAttachmentUpload.type!=null)&&(selectedAttachmentUpload.toUpperCase() == "ATTACHMENTUPLOAD")){
				return true;
			}
		}	
	}
} 

// ??????????????
function AttachmentUploadProp(){
	if (isAttachmentUploadSelected()){
		ShowDialog('dialog/attachmentupload.htm?action=modify', 320, 230, true);
	}
	else {
		ShowDialog('dialog/attachmentupload.htm?action=new', 320, 230, true);
	} 
}

//HTML??????
var selectedHTMLEditorField;

// ????????HTML??????
function isHTMLEditorFieldSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();

		if (oControlRange(0).tagName.toUpperCase() == "IMG") {
			selectedHTMLEditorField = eWebEditor.document.selection.createRange()(0);
			if ((selectedHTMLEditorField.type!=null)&&(selectedHTMLEditorField.type.toUpperCase() == "HTMLEDITORFIELD")){
				return true;
			}
		}	
	}
} 

// HTML??????????
function HTMLEditorFieldProp(){
	if (isHTMLEditorFieldSelected()){
		ShowDialog('dialog/htmleditorfield.htm?action=modify', 320, 230, true);
	}
	else {
		ShowDialog('dialog/htmleditorfield.htm?action=new', 320, 230, true);
	} 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -