Commit e10a7ddf authored by doc@bgerp.org's avatar doc@bgerp.org

p11897 Process statuses opens editor on page changing.

parent 791a700d
F: В редакторе статусов процессов перемотчик страниц открывает редактор.
......@@ -798,6 +798,8 @@ link:../../src/ru/bgcrm/struts/action/ProcessAction.java#L1236-L1238[ru.bgcrm.st
[[sample-jsp-ui]]
=== JSP UI
Простой справочник с промотчиком страниц, вызов редактора AJAX: link:../../webapps/WEB-INF/jspf/admin/process/status/list.jsp[webapps/WEB-INF/jspf/admin/process/status/list.jsp]
Отправка AJAX для сохранения, выхода, либо восстановления данных в <<kernel/process/index.adoc#type, редакторе свойств типа процесса>>:
[snippet, from="<div", to="/div>"]
link:../../webapps/WEB-INF/jspf/admin/process/type/properties.jsp#L194-L199[webapps/WEB-INF/jspf/admin/process/type/properties.jsp]
......
......@@ -2,11 +2,17 @@
<%@ include file="/WEB-INF/jspf/taglibs.jsp"%>
<html:form action="admin/process" styleClass="in-mr1">
<input type="hidden" name="action" value="statusGet"/>
<input type="hidden" name="action" value="statusList"/>
<input type="hidden" name="id" value="-1"/>
<input type="hidden" name="returnUrl" value="${form.requestUrl}"/>
<c:url var="url" value="/admin/process.do">
<c:param name="action" value="statusGet"/>
<c:param name="id" value="-1"/>
<c:param name="returnUrl" value="${form.requestUrl}"/>
</c:url>
<button type="button" class="btn-green" onclick="openUrlContent( formUrl( this.form) )">+</button>
<button type="button" class="btn-green" onclick="$$.ajax.load('${url}', $$.shell.$content())">+</button>
<%@ include file="/WEB-INF/jspf/page_control.jsp"%>
</html:form>
......@@ -30,7 +36,7 @@
<c:param name="action" value="statusDelete"/>
<c:param name="id" value="${item.id}"/>
</c:url>
<c:url var="deleteAjaxCommandAfter" value="openUrlContent( '${form.requestUrl}' )"/>
<c:url var="deleteAjaxCommandAfter" value="$$.ajax.load('${form.requestUrl}', $$.shell.$content())"/>
<td nowrap="nowrap"><%@ include file="/WEB-INF/jspf/edit_buttons.jsp"%>
<td>${item.id}</td>
......@@ -46,7 +52,7 @@
<c:param name="statusId" value="${statusId}" />
</c:url>
<button type="button" class="btn-white btn-small" style="width: 100%" onclick="$(this).hide(); openUrlTo('${showUrl}', $('#${showId}') );">Показать</button>
<button type="button" class="btn-white btn-small" style="width: 100%" onclick="$(this).hide(); $$.ajax.load('${showUrl}', $('#${showId}'));">Показать</button>
<div id="${showId}">
</div>
......
......@@ -508,6 +508,6 @@ function openUrlContent( url )
{
console.warn($$.deprecated);
openUrlTo( url, bgerp.shell.$content());
$$.ajax.load(url, $$.shell.$content());
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment