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

📄 dynaform.js

📁 OBPM是一个开源
💻 JS
📖 第 1 页 / 共 2 页
字号:
var selectedInputField;
// ??????????????????
function isInputFieldSelected() {
eWebEditor.focus();
	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(){
	var moduleid = parent.document.all('moduleid').value;
	if (isInputFieldSelected()){
		url = 'dialog/inputfield.jsp?action=modify';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 510, 290, true);
	}
	else {
		url = 'dialog/inputfield.jsp?action=new';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 510, 290, 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(){
    var moduleid = parent.document.all('moduleid').value;
	if (isSelectFieldSelected()){
		url = 'dialog/selectfield.jsp?action=modify';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 600, 320, true);
	}
	else {
		url = 'dialog/selectfield.jsp?action=new';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 600, 320, 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(){
	var moduleid = parent.document.all('moduleid').value;
	if (isTextareaFieldSelected()){
		url = 'dialog/textareafield.jsp?action=modify';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 510, 290, true);
	}
	else {
		url = 'dialog/textareafield.jsp?action=new';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 510, 290, 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(){
	var moduleid = parent.document.all('moduleid').value;
	if (isRadioFieldSelected()){
		url = 'dialog/radiofield.jsp?action=modify';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 480, 340, true);

	}
	else {
		url = 'dialog/radiofield.jsp?action=new';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 480, 340, 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(){
	var moduleid = parent.document.all('moduleid').value;
	if (isCheckboxFieldSelected()){
		url = 'dialog/checkboxfield.jsp?action=modify';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 480, 340, true);
	
	}
	else {
		url = 'dialog/checkboxfield.jsp?action=new';
		url = url + '&moduleid=' + moduleid;
		ShowDialog(url, 480, 340, 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!=null)&&(selectedCalctextField.type.toUpperCase() == "CALCTEXTFIELD")){
				return true;
			}
		}	
	}
} 

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

//Include??????
var selectedIncludeField;

// ????????Include??????
function isIncludeFieldSelected() {
	
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();
		if (oControlRange(0).tagName.toUpperCase() == "IMG") {
			selectedIncludeField = eWebEditor.document.selection.createRange()(0);
			if ((selectedIncludeField.type!=null)&&(selectedIncludeField.type.toUpperCase() == "INCLUDEFIELD")){
				return true;
			}
		}	
	}
} 

// ??Include?????
function IncludeFieldProp(){
	if (isIncludeFieldSelected()){
		url = 'dialog/includefield.jsp?action=modify';
		ShowDialog(url, 400, 375, true);
	}
	else {
		url = 'dialog/includefield.jsp?action=new';
		ShowDialog(url, 400, 375, true);
	} 
}

// component field;
var selectedComponentField;

function isComponentFieldSelected() {
	if (eWebEditor.document.selection.type == "Control") {
		var oControlRange = eWebEditor.document.selection.createRange();
		if (oControlRange(0).tagName.toUpperCase() == "IMG") {
			selectedComponentField = eWebEditor.document.selection.createRange()(0);
			if ((selectedComponentField.type!=null)&&(selectedComponentField.type.toUpperCase() == "COMPONENTFIELD")){
				return true;
			}
		}	
	}
} 

// component select
function ComponentFieldProp() {
	if (isComponentFieldSelected()){
		url =  contextPath + '/core/dynaform/component/fieldlist.action?action=modify';
		var id = selectedComponentField.componentid;
		url = url + '&id=' + id;
		ShowDialog(url, 400, 300, true);
	}
	else {
		url = contextPath + '/core/dynaform/component/selectlist.action?action=new';
		ShowDialog(url, 300, 400 ,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', 340, 250, true);
	}
	else {
		ShowDialog('dialog/imageupload.htm?action=new', 340, 250, true);
	} 
}

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

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

		if (oControlRange(0).tagName.toUpperCase() == "IMG") {

⌨️ 快捷键说明

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