Commit 91abb85b by Lee Munkyeong

#44087対応

parent 50d72136
...@@ -58,9 +58,11 @@ import jp.agentec.abook.abv.bl.data.dao.ContentDao; ...@@ -58,9 +58,11 @@ import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.download.ContentDownloader; import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification; import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic; import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic;
import jp.agentec.abook.abv.bl.logic.ContractLogic; import jp.agentec.abook.abv.bl.logic.ContractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil; import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil; import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
...@@ -86,6 +88,8 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity { ...@@ -86,6 +88,8 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
private int objectLogId; private int objectLogId;
private XWalkView webView; private XWalkView webView;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private HTMLXWalkWebViewActivity.JsInf jsInf = new HTMLXWalkWebViewActivity.JsInf(); private HTMLXWalkWebViewActivity.JsInf jsInf = new HTMLXWalkWebViewActivity.JsInf();
private Integer lastPageNo = 0; private Integer lastPageNo = 0;
...@@ -576,6 +580,15 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity { ...@@ -576,6 +580,15 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
public void openEditPage() { public void openEditPage() {
commonOpenEditPage(); commonOpenEditPage();
} }
@org.xwalk.core.JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
} }
@Override @Override
......
...@@ -20,6 +20,7 @@ import android.widget.RelativeLayout; ...@@ -20,6 +20,7 @@ import android.widget.RelativeLayout;
import org.json.adf.JSONObject; import org.json.adf.JSONObject;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.common.Constant; import jp.agentec.abook.abv.bl.common.Constant;
...@@ -27,8 +28,11 @@ import jp.agentec.abook.abv.bl.common.constant.ABookKeys; ...@@ -27,8 +28,11 @@ import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao; import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.TaskDao; import jp.agentec.abook.abv.bl.data.dao.TaskDao;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationTaskDto; import jp.agentec.abook.abv.bl.dto.OperationTaskDto;
import jp.agentec.abook.abv.bl.dto.TaskDto; import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVActivity; import jp.agentec.abook.abv.ui.common.activity.ABVActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity; import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
...@@ -67,6 +71,8 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -67,6 +71,8 @@ public class OperationTaskLayout extends RelativeLayout {
private ContentViewActivity mContext; private ContentViewActivity mContext;
private JsInf jsInf = new JsInf(); private JsInf jsInf = new JsInf();
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private static TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class); private static TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
public OperationTaskLayout(final Context context, final long contentId, final String linkUrl, boolean isNormalSize) { public OperationTaskLayout(final Context context, final long contentId, final String linkUrl, boolean isNormalSize) {
...@@ -553,5 +559,14 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -553,5 +559,14 @@ public class OperationTaskLayout extends RelativeLayout {
public void openEditPage() { public void openEditPage() {
((ABVContentViewActivity) OperationTaskLayout.this.mContext).commonOpenEditPage(); ((ABVContentViewActivity) OperationTaskLayout.this.mContext).commonOpenEditPage();
} }
@JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mContext.mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
} }
} }
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