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

📄 select.js

📁 OBPM是一个开源
💻 JS
字号:
function selectChannel(siteID, fieldID, fieldName,fieldFormTmpl,fieldFormTmplName,fieldSummaryTmpl,fieldSummaryTmplName,fieldDetailTmpl,fieldDetailTmplName,fieldPathname) {
  wx = '480px';
  wy = '400px';
  var url	= '';
  var title='频道信息选择';
  if (siteID == null || siteID == ''){
	  alert('请选择站点');
	  return;
  }
  url = contextPath + '/cms/channel/select.do?siteid=' + siteID;
  var rtn = showframe(title,url);

  if (rtn == null || rtn == 'undefined') {
  }
  else if (rtn == '') {
    if (fieldID!=null)  fieldID.value='';
    if (fieldName!=null)  fieldName.value='';
    if (fieldFormTmpl!=null)  fieldFormTmpl.value='';
    if (fieldFormTmplName!=null)  fieldFormTmplName.value='';
    if (fieldSummaryTmpl!=null)  fieldSummaryTmpl.value='';
    if (fieldSummaryTmplName!=null)  fieldSummaryTmplName.value='';
    if (fieldDetailTmpl!=null)  fieldDetailTmpl.value='';
    if (fieldDetailTmplName!=null)  fieldDetailTmplName.value='';
    if (fieldPathname!=null)  fieldPathname.value='';	
  }
  else {
    var t = rtn.split(';');
    if (fieldID!=null)  fieldID.value=t[0];
    if (fieldName!=null)  fieldName.value=t[1];
    if (fieldFormTmpl!=null)  fieldFormTmpl.value=t[2];
    if (fieldFormTmplName!=null)  fieldFormTmplName.value=t[3];
    if (fieldSummaryTmpl!=null)  fieldSummaryTmpl.value=t[4];
    if (fieldSummaryTmplName!=null)  fieldSummaryTmplName.value=t[5];
    if (fieldDetailTmpl!=null)  fieldDetailTmpl.value=t[6];
    if (fieldDetailTmplName!=null)  fieldDetailTmplName.value=t[7];
    if (fieldPathname!=null)  fieldPathname.value=t[8];	
  }
}
function selectChannels(siteID, fieldID, fieldName) {
  wx = '480px';
  wy = '400px';
  var url	= '';
  var title='频道信息选择';
  url = contextPath + '/cms/channel/select.do?siteid=' + siteID + '&MULTISELECT=TRUE';
  var rtn	= showframe(title,url);

  if (rtn == null || rtn == 'undefined') {
  }
  else if (rtn == '') {
    if (fieldID!=null)  fieldID.value = '';
    if (fieldName!=null) fieldName.value = '';
  }else{
	  var fieldIDValue = "";
    var fieldNameValue = "";
    
	  for(i=0;i<rtn.length;++i){
		  var str = rtn[i];      
		  fieldIDValue += (str.split(';'))[0];
		  fieldNameValue += (str.split(';'))[1];
      fieldIDValue = (i==rtn.length-1) ? fieldIDValue : fieldIDValue + ";" ;
      fieldNameValue = (i==rtn.length-1) ? fieldNameValue : fieldNameValue + ";" ;
		}

    if (fieldID!=null)  fieldID.value = fieldIDValue;
    if (fieldName!=null) fieldName.value = fieldNameValue;
  }
}
function selectSite(fieldID, fieldName,filedSiteHttp) {
  wx = '480px';
  wy = '400px';
  var url	= '';
  var title='站点信息选择';

  url = contextPath + '/cms/site/select.do';
  var rtn = showframe(title,url);
  if (rtn == null || rtn == 'undefined') {
  }
  else if (rtn == '') {
    if (fieldID!=null) fieldID.value = '';
    if (fieldName != null) fieldName.value = '';
    if (filedSiteHttp != null) filedSiteHttp.value = '';
  }
  else {
    var t = rtn.split(';');
    if (fieldID!=null)  fieldID.value=t[0];
    if (fieldName!=null)  fieldName.value=t[1];
    if (filedSiteHttp!=null)  filedSiteHttp.value=t[2]+":"+t[3];
  }
}
function selectFields(parentID,fieldID) {
  wx = '480px';
  wy = '400px';
  var url	= '';
  var title='文档模板信息选择';

  if (parentID=='') {
	  alert('请先选择表单模板!');
	  return;
  }
  
  url = contextPath + '/dynaform/form/selectFields.do?formids=' + parentID + '&MULTISELECT=TRUE';
  var rtn = showframe(title,url);
  if (rtn == null || rtn == 'undefined') {
  }
  else if (rtn == '') {
    if (fieldID!=null) fieldID.value = '';
  }
  else {
    var t = rtn.split(',');
    if (fieldID!=null)  fieldID.value=t[0];
  }
}
function selectField(parentID,fieldID,fieldDataType, multiSelect) {
  wx = '480px';
  wy = '400px';
  var url	= '';
  var title='文档模板信息选择';

  if (parentID=='') {
	  alert('请先选择表单模板!');
	  return;
  }

  url = contextPath + '/dynaform/form/selectField.do?formids=' + parentID ;
  if (multiSelect != null && multiSelect) {
    url = url + '&MULTISELECT=TRUE';
  }
  var rtn = showframe(title,url);
  if (rtn == null || rtn == 'undefined') {
  }
  else if (rtn == '') {
    if (fieldID!=null) fieldID.value = '';
  }
  else {
    if (multiSelect != null && multiSelect) {
      fieldID.value = '';
      for (var i=0; i < rtn.length; i++) {
        fieldID.value += rtn[i] + ';';
      }
		}else{
	    var t = rtn.split(',');
	    if (fieldID!=null)  fieldID.value=t[1];
	    if (fieldDataType!=null)  fieldDataType.value=t[4];
    }
  }
}

function selectOneField(parentName,fieldID,fieldName) {
  wx = '480px';
  wy = '400px';
  var url	= '';
  var title='文档模板信息选择';

  if (parentName=='') {
	  alert('请先选择表单模板!');
	  return;
  }

  url = contextPath + '/core/dynaform/form/selectField.action?_formname=' + parentName ;
  var rtn = showframe(title,url);
  if (rtn == null || rtn == 'undefined') {
  }
  else if (rtn == '') {
    if (fieldID!=null) fieldID.value = '';
    if (fieldName!=null) fieldName.value = '';
  }
  else {
	    var t = rtn.split(',');
	    if (fieldID!=null)  fieldID.value=t[0];
	    if (fieldName!=null)  fieldName.value=t[1];
  }
}

function selectDocument(channelID,fieldID, fieldName) {
  wx = '480px';
  wy = '400px';
  var url	= '';
  var title='稿件选择';
  if (channelID==''){
	  alert('请先选择频道');
	  return;
  }
  url = contextPath + '/dynaform/document/selectbychn.do?channelid=' + channelID;
  var rtn = showframe(title,url);

  if (rtn == null || rtn == 'undefined') {
  }
  else if (rtn == '') {
    if (fieldID!=null) fieldID.value = '';
    if (fieldName != null) fieldName.value = '';
  }
  else {
    var t = rtn.split(';');
    if (fieldID!=null)  fieldID.value=t[0];
    if (fieldName!=null)  fieldName.value=t[1];
  }
}
function selcetReourcePage(siteID,fieldID, fieldName,fieldDesc,type){
  wx = '480px';
  wy = '400px';
  var url	= '';
  var title='??????';

  if (siteID==''){
	  alert('??????');
	  return;
  }
  if(type==null)
  	type="";
  url = contextPath + '/cms/staticresource/select.jsp?type='+type+'&siteid='+siteID;

  var rtn = window.showModalDialog(url,window,"dialogwidth:50;dialogheight:30");
  if (rtn == null || rtn == 'undefined') {
  }
  else if (rtn == '') {
    if (fieldID!=null)fieldID.value = '';
    if (fieldName != null) fieldName.value = '';
  }
  else {
    var t = rtn.split(';');
	if (fieldID!=null)  fieldID.value=t[0];
    if (fieldName!=null)  fieldName.value=t[1];
    if (fieldDesc!=null)  fieldDesc.value=t[2];
  }
}

⌨️ 快捷键说明

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