Skip to content

Commit

Permalink
Start work on documents manipulation
Browse files Browse the repository at this point in the history
TODO:
DOCUMENT MANIPULATION
DOCUMENT FILE MANIPULATION
TASK MANIPULATION
SHOW CONTEOLLED TASK FOR USER
SHOW USERS TASK
STOREHAUSE MANIPULATION
GOOD PRODUCTION AND SERVICE
  • Loading branch information
FairWindCo committed Nov 4, 2015
1 parent 123033c commit 658ed66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public JGridRowsResponse<Document> getTable(HttpServletRequest request){
int page;
try {
page = Integer.parseInt(request.getParameter("page")) - 1;
if(page<0)page=0;
rows = request.getParameter("rows") == null ? 10 : Integer.parseInt(request.getParameter("rows"));
if(request.getParameter("sidx")!=null && !request.getParameter("sidx").isEmpty()){
String direction=request.getParameter("sord");
Expand Down Expand Up @@ -113,6 +114,7 @@ public JGridRowsResponse<DocumentSecurity> getSecurityTable(HttpServletRequest r
int page;
try {
page = Integer.parseInt(request.getParameter("page")) - 1;
if(page<0)page=0;
rows = request.getParameter("rows") == null ? 10 : Integer.parseInt(request.getParameter("rows"));
if(request.getParameter("sidx")!=null && !request.getParameter("sidx").isEmpty()){
String direction=request.getParameter("sord");
Expand Down Expand Up @@ -155,6 +157,7 @@ public JGridRowsResponse<DocumentSubscribe> getSubscriberTable(HttpServletReques
int page;
try {
page = Integer.parseInt(request.getParameter("page")) - 1;
if(page<0)page=0;
rows = request.getParameter("rows") == null ? 10 : Integer.parseInt(request.getParameter("rows"));
if(request.getParameter("sidx")!=null && !request.getParameter("sidx").isEmpty()){
String direction=request.getParameter("sord");
Expand Down Expand Up @@ -509,11 +512,11 @@ public void editorSecurity(@RequestParam String oper,@RequestParam(required = fa
Person person = personRepository.findOne(personID);
ds.setDocument(document);
ds.setPerson(person);
Long action_id=Utils.getLongParameter("action_id",request);
Long action_id=Utils.getLongParameter("action",request);
if(action_id!=null){
ds.setAction(SECURITY_ACTION.fromInteger(action_id.intValue()));
}
Long permision_id=Utils.getLongParameter("permision_id",request);
Long permision_id=Utils.getLongParameter("permision",request);
if(permision_id!=null){
ds.setPermission(SECURITY_PERMISSION.fromInteger(permision_id.intValue()));
}
Expand Down
14 changes: 6 additions & 8 deletions src/main/webapp/jsp/documents_list.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,12 @@
//Таблица дескриптор безопасности
var select_sec_obj={};
var GridDataSec={
person_id:function(){return select_sec_obj.person_id},
personID:function(){return select_sec_obj.person_id},
};
jQuery("#"+subgrid_table_sec_id).jqGrid({
pager:subgrid_pager_sec_id,
url:"${pageContext.request.contextPath}/documents/security_listing?document_id="+row_id,
editurl:null,
fileurl:"${pageContext.request.contextPath}/documents/editSecurity?documentID="+row_id,
editurl:"${pageContext.request.contextPath}/documents/editSecurity?documentID="+row_id,
datatype: "json",
mtype: 'POST',
width:800,
Expand Down Expand Up @@ -259,7 +258,7 @@
id: "id",
height: '100%',
rowNum:20,
sortname: 'fileName',
sortname: 'person.surname',
dataProxy:$.jgrid.ext.ajaxFormProxy, //our charming dataProxy ^__^
sortorder: "asc"
}).jqGrid('extBindEvents');
Expand All @@ -281,13 +280,12 @@
//список лиц на утверждение
var select_sub_obj={};
var GridDataSub={
person_id:function(){return select_sub_obj.person_id},
personID:function(){return select_sub_obj.person_id},
};
jQuery("#"+subgrid_table_scr_id).jqGrid({
pager:subgrid_pager_scr_id,
url:"${pageContext.request.contextPath}/documents/subscriber_listing?document_id="+row_id,
editurl:null,
fileurl:"${pageContext.request.contextPath}/documents/editSubscribe?documentID="+row_id,
editurl:"${pageContext.request.contextPath}/documents/editSubscribe?documentID="+row_id,
datatype: "json",
mtype: 'POST',
width:800,
Expand All @@ -308,7 +306,7 @@
id: "id",
height: '100%',
rowNum:20,
sortname: 'fileName',
sortname: 'person.surname',
dataProxy:$.jgrid.ext.ajaxFormProxy, //our charming dataProxy ^__^
sortorder: "asc"
}).jqGrid('extBindEvents');
Expand Down

0 comments on commit 658ed66

Please sign in to comment.