Commit b35eb4a4 by Jeong Gilmo

Merge branch 'feature/1.0.1' into feature/1.0.1_33006

parents 8d189837 167e720e
...@@ -135,7 +135,7 @@ public class ABVEnvironment { ...@@ -135,7 +135,7 @@ public class ABVEnvironment {
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
// 作業報告レベル(taskReportLevel)によってディレクトリを追加する // 作業報告レベル(taskReportLevel)によってディレクトリを追加する
public static final String TaskReportLevelDir = "/%s"; public static final String TaskReportLevelDir = "/%s";
public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%s"; public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir;
public static final String RoutineTaskSavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%d/%s/%s"; public static final String RoutineTaskSavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%d/%s/%s";
public static final String OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d"; public static final String OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d";
public static final String OperationTaskKeyRoutineTaskReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d/%s/%d"; public static final String OperationTaskKeyRoutineTaskReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d/%s/%d";
...@@ -603,7 +603,7 @@ public class ABVEnvironment { ...@@ -603,7 +603,7 @@ public class ABVEnvironment {
* @return ファイルパス * @return ファイルパス
*/ */
public String getSavedOzFileTaskReportLevelPath(long operationId, String taskKey, String fileName, String taskReportLevel) { public String getSavedOzFileTaskReportLevelPath(long operationId, String taskKey, String fileName, String taskReportLevel) {
return String.format(SavedOzFileFormat, rootDirectory, operationId, taskKey, taskReportLevel, "report", fileName); return String.format(SavedOzFileFormat, rootDirectory, operationId, taskKey, taskReportLevel, fileName);
} }
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
......
...@@ -111,11 +111,9 @@ public class ABookKeys { ...@@ -111,11 +111,9 @@ public class ABookKeys {
public static final String URI = "uri"; public static final String URI = "uri";
public static final String OK = "OK"; public static final String OK = "OK";
// #32861 作業情報追加 start
public static final String LOCAL_SAVE = "localSave"; // 一時保存情報 public static final String LOCAL_SAVE = "localSave"; // 一時保存情報
public static final String ADD_REPORT = "addReport"; // 作業追加区分 public static final String ADD_REPORT = "addReport"; // 作業追加区分
public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存 public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存
// #32861 作業情報追加 end
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
public static final String HAS_AUTHORITY = "hasAuthority"; public static final String HAS_AUTHORITY = "hasAuthority";
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
......

488 Bytes | W: | H:

607 Bytes | W: | H:

ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_delete.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_delete.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_delete.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_delete.png
  • 2-up
  • Swipe
  • Onion skin
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -178,12 +178,11 @@ ...@@ -178,12 +178,11 @@
<string name="access_location_message">"%1$s"は現在の位置情報を使用します。よろしいですか?</string> <string name="access_location_message">"%1$s"は現在の位置情報を使用します。よろしいですか?</string>
<!-- #32861 作業情報追加 start -->
<string name="temp_save">一時保存</string> <string name="temp_save">一時保存</string>
<string name="temp_save_info">一時保存しますか?</string> <string name="temp_save_info">一時保存しますか?</string>
<string name="save_info">保存してサーバへ送信しますか?</string> <string name="save_info">保存してサーバへ送信しますか?</string>
<string name="msg_temp_save_result">保存されました。</string> <string name="msg_temp_save_result">保存されました。</string>
<!-- #32861 作業情報追加 end --> <string name="delete_info">保存されたデータを削除しますか?</string>
<!-- Error Message --> <!-- Error Message -->
<string name="E000">事業者IDを入力してください。</string> <string name="E000">事業者IDを入力してください。</string>
......
...@@ -179,12 +179,11 @@ ...@@ -179,12 +179,11 @@
<string name="access_location_message">"%1$s"에서 현재 위치 정보를 사용하고자 합니다.</string> <string name="access_location_message">"%1$s"에서 현재 위치 정보를 사용하고자 합니다.</string>
<!-- #32861 作業情報追加 start -->
<string name="temp_save">임시저장</string> <string name="temp_save">임시저장</string>
<string name="temp_save_info">임시저장 하시겠습니까?</string> <string name="temp_save_info">임시저장 하시겠습니까?</string>
<string name="save_info">저장하시고 서버로 송신하시겠습니까?</string> <string name="save_info">저장하시고 서버로 송신하시겠습니까?</string>
<string name="msg_temp_save_result">저장되었습니다.</string> <string name="msg_temp_save_result">저장되었습니다.</string>
<!-- #32861 作業情報追加 end --> <string name="delete_info">저장된 데이터를 삭제하시겠습니까?</string>
<!-- Error Message --> <!-- Error Message -->
<string name="E000">어카운트패스 입력해 주십시오.</string> <string name="E000">어카운트패스 입력해 주십시오.</string>
......
...@@ -178,12 +178,11 @@ ...@@ -178,12 +178,11 @@
<string name="access_location_message">"%1$s" Would Like to Use Your Current Location</string> <string name="access_location_message">"%1$s" Would Like to Use Your Current Location</string>
<!-- #32861 作業情報追加 start -->
<string name="temp_save">Temporarily saved</string> <string name="temp_save">Temporarily saved</string>
<string name="temp_save_info">Do you want to temporarily save it?</string> <string name="temp_save_info">Do you want to temporarily save it?</string>
<string name="save_info">Save it and send it to the server?</string> <string name="save_info">Save it and send it to the server?</string>
<string name="msg_temp_save_result">It has been saved.</string> <string name="msg_temp_save_result">It has been saved.</string>
<!-- #32861 作業情報追加 end --> <string name="delete_info">Do you want to delete the saved data?</string>
<!-- Error Message --> <!-- Error Message -->
<string name="E000">Please enter company ID.</string> <string name="E000">Please enter company ID.</string>
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
style="@style/OperationSearchToolBar" style="@style/OperationSearchToolBar"
android:minHeight="50dp"> android:minHeight="50dp">
<!-- #32861 作業情報追加 start -->
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -38,7 +37,6 @@ ...@@ -38,7 +37,6 @@
android:background="@drawable/ic_operation_home" /> android:background="@drawable/ic_operation_home" />
</LinearLayout> </LinearLayout>
<!-- #32861 作業情報追加 end -->
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -64,7 +62,14 @@ ...@@ -64,7 +62,14 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true"> android:layout_centerVertical="true">
<!-- #32861 作業情報追加 start --> <Button
android:id="@+id/btn_delete"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/ic_delete" />
<Button <Button
android:id="@+id/btn_temp_save" android:id="@+id/btn_temp_save"
android:layout_width="30dp" android:layout_width="30dp"
...@@ -72,7 +77,7 @@ ...@@ -72,7 +77,7 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:background="@drawable/ic_download_off" /> android:background="@drawable/ic_local_save" />
<Button <Button
android:id="@+id/btn_save" android:id="@+id/btn_save"
android:layout_width="30dp" android:layout_width="30dp"
...@@ -80,8 +85,7 @@ ...@@ -80,8 +85,7 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:background="@drawable/ic_download_on" /> android:background="@drawable/ic_save" />
<!-- #32861 作業情報追加 end -->
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
......
...@@ -33,6 +33,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic; ...@@ -33,6 +33,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; 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.ABVContentViewActivity; import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil; import jp.agentec.adf.util.FileUtil;
...@@ -74,6 +75,11 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -74,6 +75,11 @@ public class ABookCheckWebViewHelper extends ABookHelper {
int taskReportSendId = 0; int taskReportSendId = 0;
mFinishCallback = finishCallback; mFinishCallback = finishCallback;
// ActivityであるClassからCheckOZDViewActivityを確認してContextの値を変更する。
if (ActivityHandlingHelper.getInstance().searchOzdActivityStack()) {
context = (ABVContentViewActivity) ActivityHandlingHelper.getInstance().selectedOzdAtivityContext();
}
switch (cmd) { switch (cmd) {
case ABookKeys.CMD_INSERT_TASK_REPORT: case ABookKeys.CMD_INSERT_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, true, reportType, taskReportLevel); insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, true, reportType, taskReportLevel);
...@@ -163,6 +169,7 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -163,6 +169,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
public void run() { public void run() {
OperationDto operationDto = mOperationLogic.getOperation(operationId); OperationDto operationDto = mOperationLogic.getOperation(operationId);
boolean isError = false; boolean isError = false;
try { try {
mOperationLogic.updateSyncOperation(operationId, true); mOperationLogic.updateSyncOperation(operationId, true);
if (mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback)) { if (mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback)) {
......
...@@ -1547,7 +1547,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1547,7 +1547,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param addReport * @param addReport
* @param taskReportLevel * @param taskReportLevel
*/ */
// #32861 作業情報追加 start
public void startOZViewerActivity(Context context, long operationId, long contentId, String taskKey, boolean isReadOnly, int taskReportId, String reportStartDate, String reportFileName, boolean localSave, boolean addReport, int taskReportLevel) { public void startOZViewerActivity(Context context, long operationId, long contentId, String taskKey, boolean isReadOnly, int taskReportId, String reportStartDate, String reportFileName, boolean localSave, boolean addReport, int taskReportLevel) {
reportStartDate = reportStartDate.replace("T", " "); reportStartDate = reportStartDate.replace("T", " ");
String strReportStartDate = DateTimeUtil.toString(DateTimeUtil.toDate(reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmm_none); String strReportStartDate = DateTimeUtil.toString(DateTimeUtil.toDate(reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmm_none);
...@@ -1562,17 +1561,15 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1562,17 +1561,15 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra(ABookKeys.TASK_REPORT_ID, taskReportId); intent.putExtra(ABookKeys.TASK_REPORT_ID, taskReportId);
intent.putExtra(ABookKeys.REPORT_START_DATE, strReportStartDate); intent.putExtra(ABookKeys.REPORT_START_DATE, strReportStartDate);
intent.putExtra(ABookKeys.REPORT_FILE_NAME, reportFileName); intent.putExtra(ABookKeys.REPORT_FILE_NAME, reportFileName);
// #32861 作業情報追加 start
intent.putExtra(ABookKeys.LOCAL_SAVE, localSave); // 一時保存情報 intent.putExtra(ABookKeys.LOCAL_SAVE, localSave); // 一時保存情報
intent.putExtra(ABookKeys.ADD_REPORT, addReport); // 作業追加区分 intent.putExtra(ABookKeys.ADD_REPORT, addReport); // 作業追加区分
// #32861 作業情報追加 end
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
intent.putExtra(ABookKeys.TASK_REPORT_LEVEL, taskReportLevel); // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答)) intent.putExtra(ABookKeys.TASK_REPORT_LEVEL, taskReportLevel); // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
context.startActivity(intent); context.startActivity(intent);
} }
// #32861 作業情報追加 end
public boolean isMeetingConnected() { public boolean isMeetingConnected() {
return meetingManager.isConnected(); return meetingManager.isConnected();
...@@ -1594,4 +1591,53 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1594,4 +1591,53 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
@Override @Override
public void onAuthenticationFailed() { public void onAuthenticationFailed() {
} // ignore : not come here } // ignore : not come here
// 上位のClassからHTML側のコールを行うための処理
public void callOzdHtmlScript(String url) {
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
final String scriptUrl = url;
if (activity instanceof ParentWebViewActivity) {
((ParentWebViewActivity) activity).callViewLoadUrl(scriptUrl);
}
}
}
}
// ActivityであるClassからCheckOZDViewActivityを確認する処理
public boolean searchOzdActivityStack() {
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof CheckOZDViewActivity) {
return true;
}
}
}
return false;
}
// ActivityであるClassからCheckOZDViewActivityを確認して画面を閉じる処理
public void selectedOzdActivityClose() {
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof CheckOZDViewActivity) {
((CheckOZDViewActivity) activity).finishActivity();
}
}
}
}
// ActivityであるClassからCheckOZDViewActivityを確認してContextの値を変更する。
public Context selectedOzdAtivityContext() {
Context context = null;
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof CheckOZDViewActivity) {
context = activity;
return context;
}
}
}
return context;
}
} }
...@@ -27,11 +27,12 @@ public class OzdFileHelper { ...@@ -27,11 +27,12 @@ public class OzdFileHelper {
/** /**
* OZDファイルをPDFに変換したファイルをCMSへアップロードする。 * OZDファイルをPDFに変換したファイルをCMSへアップロードする。
* @param pdfFile String *
* @param jsonData String * @param pdfFile String
* @param jsonData String
* @param contentId long * @param contentId long
* @param objectId long * @param objectId long
* @param sendTime String(GMT) * @param sendTime String(GMT)
* @throws Exception * @throws Exception
*/ */
public static final void sendOzdToAcms(final File pdfFile, final String jsonData, final long contentId, final long objectId, final String sendTime, final int fileType) throws AcmsException, NetworkDisconnectedException, IOException { public static final void sendOzdToAcms(final File pdfFile, final String jsonData, final long contentId, final long objectId, final String sendTime, final int fileType) throws AcmsException, NetworkDisconnectedException, IOException {
...@@ -48,6 +49,7 @@ public class OzdFileHelper { ...@@ -48,6 +49,7 @@ public class OzdFileHelper {
/** /**
* 優先的なOZDファイルのフォルダを返す。 * 優先的なOZDファイルのフォルダを返す。
* 保存先のファイルを優先する。 * 保存先のファイルを優先する。
*
* @param contentId * @param contentId
* @param ozdFileName * @param ozdFileName
* @return * @return
...@@ -63,6 +65,7 @@ public class OzdFileHelper { ...@@ -63,6 +65,7 @@ public class OzdFileHelper {
/** /**
* OZDファイルの日付取得する。 * OZDファイルの日付取得する。
*
* @param contentId * @param contentId
* @param objectId * @param objectId
* @return * @return
...@@ -81,6 +84,7 @@ public class OzdFileHelper { ...@@ -81,6 +84,7 @@ public class OzdFileHelper {
// GetOzdFileDateParameters parameters = new GetOzdFileDateParameters(sId, contentId, objectId); // GetOzdFileDateParameters parameters = new GetOzdFileDateParameters(sId, contentId, objectId);
// AcmsClient.getInstance(URL_PATH, ABVEnvironment.getInstance().networkAdapter).downloadOzdFile(parameters, outputFilePath); // AcmsClient.getInstance(URL_PATH, ABVEnvironment.getInstance().networkAdapter).downloadOzdFile(parameters, outputFilePath);
} }
public static final String getSaveOzFileName(boolean directionFlg, String reportFileName) { public static final String getSaveOzFileName(boolean directionFlg, String reportFileName) {
if (reportFileName != null) { if (reportFileName != null) {
String replacedFileName = replaceFileName(reportFileName); String replacedFileName = replaceFileName(reportFileName);
...@@ -141,8 +145,8 @@ public class OzdFileHelper { ...@@ -141,8 +145,8 @@ public class OzdFileHelper {
} }
public static final String replaceFileName(String fileName) { public static final String replaceFileName(String fileName) {
String editingName=fileName.replace("Ozr", "Ozd"); String editingName = fileName.replace("Ozr", "Ozd");
String replacedName=editingName.replace("ozr", "ozd"); String replacedName = editingName.replace("ozr", "ozd");
return replacedName; return replacedName;
} }
...@@ -153,7 +157,7 @@ public class OzdFileHelper { ...@@ -153,7 +157,7 @@ public class OzdFileHelper {
} }
} }
public static final String getTempTaskDirPath(long contentId, String taskKey) { public static final String getTempTaskDirPath(long contentId, String taskKey) {
return ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey); return ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
} }
...@@ -167,4 +171,30 @@ public class OzdFileHelper { ...@@ -167,4 +171,30 @@ public class OzdFileHelper {
} }
return FileUtil.move(tempOzdFilePath, ozdFilePath, true); return FileUtil.move(tempOzdFilePath, ozdFilePath, true);
} }
// 削除するOZDファイルがあるかを確認する
public static final boolean checkOzFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate, String reportFileName, int taskReportLevel) {
String ozdFileName = null;
if (reportFileName != null) {
ozdFileName = reportFileName;
} else {
if (taskReportLevel == 0) {
ozdFileName = DIRECTION_OZD_FILE_NAME;
} else {
ozdFileName = REPORT_OZD_FILE_NAME;
}
}
String ozFilePath = null;
if (taskReportId > 0 && !StringUtil.isNullOrEmpty(reportStartDate)) {
ozFilePath = ABVEnvironment.getInstance().getRoutineTaskSavedOzFilePath(operationId, taskKey, taskReportId, reportStartDate, ozdFileName, String.valueOf(taskReportLevel));
} else {
ozFilePath = ABVEnvironment.getInstance().getSavedOzFileTaskReportLevelPath(operationId, taskKey, ozdFileName, String.valueOf(taskReportLevel));
}
if (FileUtil.exists(ozFilePath)) {
return true;
}
return false;
}
} }
\ No newline at end of file
...@@ -76,6 +76,8 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -76,6 +76,8 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
private int mTaskReportLevel; // 作業報告レベル private int mTaskReportLevel; // 作業報告レベル
boolean mIsOzFilePath; // 削除処理のフラグ
boolean mLocalSave; // 一時保存フラグ
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
@Override @Override
...@@ -118,7 +120,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -118,7 +120,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
TextView tvTitle = (TextView) findViewById(R.id.tv_title); TextView tvTitle = (TextView) findViewById(R.id.tv_title);
tvTitle.setText(frontTitle + rearTitle); tvTitle.setText(frontTitle + rearTitle);
// #32861 作業情報追加 start
// OZ閲覧画面に表示するボタン表示の可否設定 // OZ閲覧画面に表示するボタン表示の可否設定
// 一時保存情報についてボタン表示:「0:false、一時保存ボタン非表示」「1:ture、一時保存ボタン表示」 // 一時保存情報についてボタン表示:「0:false、一時保存ボタン非表示」「1:ture、一時保存ボタン表示」
mLocalSave = intent.getBooleanExtra(ABookKeys.LOCAL_SAVE, false); mLocalSave = intent.getBooleanExtra(ABookKeys.LOCAL_SAVE, false);
...@@ -129,12 +130,17 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -129,12 +130,17 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
final Button closeButton = (Button) findViewById(R.id.btn_close); final Button closeButton = (Button) findViewById(R.id.btn_close);
final Button tempSaveButton = (Button) findViewById(R.id.btn_temp_save); final Button tempSaveButton = (Button) findViewById(R.id.btn_temp_save);
final Button saveButton = (Button) findViewById(R.id.btn_save); final Button saveButton = (Button) findViewById(R.id.btn_save);
final Button deleteButton = (Button) findViewById(R.id.btn_delete);
// 一時ボタン表示可否判断 // 一時ボタン表示可否判断
homeButton.setVisibility(mAddReport ? View.GONE : View.VISIBLE); homeButton.setVisibility(mAddReport ? View.GONE : View.VISIBLE);
closeButton.setVisibility(mAddReport ? View.VISIBLE : View.GONE); closeButton.setVisibility(mAddReport ? View.VISIBLE : View.GONE);
tempSaveButton.setVisibility(mLocalSave ? View.VISIBLE : View.GONE); tempSaveButton.setVisibility(mLocalSave ? View.VISIBLE : View.GONE);
// 削除ボタン表示可否判断
mIsOzFilePath = OzdFileHelper.checkOzFilePath(mOperationId, mTaskKey, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel);
deleteButton.setVisibility(mIsOzFilePath ? View.VISIBLE : View.GONE);
// 作業一覧へ戻るボタン // 作業一覧へ戻るボタン
homeButton.setOnClickListener(new OnClickListener() { homeButton.setOnClickListener(new OnClickListener() {
@Override @Override
...@@ -169,7 +175,15 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -169,7 +175,15 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
showSaveConfirmAlert(R.string.save, R.string.save_info); showSaveConfirmAlert(R.string.save, R.string.save_info);
} }
}); });
// #32861 作業情報追加 end
// 削除ボタン
deleteButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mButtonStatus = R.id.btn_delete; // HTML側の分岐処理を行うため変数に値を渡す
showSaveConfirmAlert(R.string.delete, R.string.delete_info);
}
});
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel); mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel);
...@@ -301,13 +315,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -301,13 +315,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
@Override @Override
public boolean onKeyUp(int keyCode, KeyEvent event) { public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { if (keyCode == KeyEvent.KEYCODE_BACK) {
// #32861 作業情報追加 start if (!mAddReport) { // 作業追加区分がなしの場合
if (!mAddReport) {
goToMain(); // 一覧画面に遷移 goToMain(); // 一覧画面に遷移
} else { } else {
finishActivity(); // Ozd作業画面を閉じる finishActivity(); // Ozd作業画面を閉じる
} }
// #32861 作業情報追加 end
} else { } else {
return super.onKeyUp(keyCode, event); return super.onKeyUp(keyCode, event);
} }
...@@ -537,7 +549,7 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -537,7 +549,7 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
param.append("export.mode=silent#"); param.append("export.mode=silent#");
param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#"); param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#");
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#"); param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "#"); //OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#");
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
param.append("export.confirmsave=false#"); param.append("export.confirmsave=false#");
param.append("export.format=ozd"); param.append("export.format=ozd");
...@@ -555,7 +567,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -555,7 +567,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
return true; return true;
} }
// #32861 作業情報追加 start
// アラート表示処理 // アラート表示処理
private void showSaveConfirmAlert(final int dialogTitle, int dialogMessage) { private void showSaveConfirmAlert(final int dialogTitle, int dialogMessage) {
ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle); ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle);
...@@ -563,7 +574,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -563,7 +574,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
logoutAkert.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.confirm), new DialogInterface.OnClickListener() { logoutAkert.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.confirm), new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
tempSaved(); // 一時保存処理 // 削除ボタン以外には臨時保存処理を行う
if (mButtonStatus != R.id.btn_delete) {
tempSaved(); // 臨時保存処理
}
doProcess(); // HTML側の処理を行う
} }
}); });
logoutAkert.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), (DialogInterface.OnClickListener) null); logoutAkert.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), (DialogInterface.OnClickListener) null);
...@@ -579,7 +594,5 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -579,7 +594,5 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
return; return;
} }
} }
doProcess(); // HTML側の処理を行う
} }
// #32861 作業情報追加 end
} }
\ No newline at end of file
...@@ -63,7 +63,9 @@ import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; ...@@ -63,7 +63,9 @@ import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
public class HTMLWebViewActivity extends ParentWebViewActivity { public class HTMLWebViewActivity extends ParentWebViewActivity {
private static final String TAG = "HTMLWebViewActivity"; private static final String TAG = "HTMLWebViewActivity";
/** Called when the activity is first created. */ /**
* Called when the activity is first created.
*/
boolean forwardCheckFlg = false; boolean forwardCheckFlg = false;
boolean backCheckFlg = false; boolean backCheckFlg = false;
...@@ -74,6 +76,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -74,6 +76,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
private WebView webView; private WebView webView;
private JsInf jsInf = new JsInf(); private JsInf jsInf = new JsInf();
private ValueCallback<Uri[]> mUploadMessage; private ValueCallback<Uri[]> mUploadMessage;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
Logger.i(TAG, "onCreate"); Logger.i(TAG, "onCreate");
...@@ -145,7 +148,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -145,7 +148,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
mShowedPopupWindow = new ABVPopupListWindow(HTMLWebViewActivity.this); mShowedPopupWindow = new ABVPopupListWindow(HTMLWebViewActivity.this);
if (isNormalSize()) { if (isNormalSize()) {
mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_normal)); mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_normal));
} else { } else {
mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_large)); mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_large));
...@@ -164,11 +167,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -164,11 +167,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
@Override @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0 : case 0:
// お気に入り // お気に入り
contentLogic.setFavoriteContent(getContentId(), !isExist); contentLogic.setFavoriteContent(getContentId(), !isExist);
break; break;
default : default:
break; break;
} }
mShowedPopupWindow.dismiss(); mShowedPopupWindow.dismiss();
...@@ -278,7 +281,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -278,7 +281,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
@Override @Override
public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) { public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
Logger.e(TAG, "onReceivedError errorCode=%s, description=%s, failingUrl=%s", errorCode, description, failingUrl); Logger.e(TAG, "onReceivedError errorCode=%s, description=%s, failingUrl=%s", errorCode, description, failingUrl);
} }
...@@ -342,8 +345,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -342,8 +345,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
Logger.d(TAG, "ReloadUrl"); Logger.d(TAG, "ReloadUrl");
if (latitude != null && longitude != null) { if (latitude != null && longitude != null) {
webView.loadUrl(url + "&reload=true&latitude=" + latitude + "&longitude=" + longitude); webView.loadUrl(url + "&reload=true&latitude=" + latitude + "&longitude=" + longitude);
} } else {
else {
webView.loadUrl(url + "&reload=true"); webView.loadUrl(url + "&reload=true");
} }
} }
...@@ -359,7 +361,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -359,7 +361,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
ContentDownloader.getInstance().download(contentId); ContentDownloader.getInstance().download(contentId);
ABVToastUtil.showMakeText(getApplicationContext(), R.string.download_start, Toast.LENGTH_SHORT); ABVToastUtil.showMakeText(getApplicationContext(), R.string.download_start, Toast.LENGTH_SHORT);
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, "Download failed." ,e); Logger.e(TAG, "Download failed.", e);
downloadButton.setEnabled(true); downloadButton.setEnabled(true);
handleErrorMessageToast(e); handleErrorMessageToast(e);
} }
...@@ -369,8 +371,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -369,8 +371,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
downloadButton.setVisibility(View.VISIBLE); downloadButton.setVisibility(View.VISIBLE);
if (isUpdate) { if (isUpdate) {
downloadButton.setBackgroundResource(R.drawable.btn_update); downloadButton.setBackgroundResource(R.drawable.btn_update);
} } else {
else {
downloadButton.setBackgroundResource(R.drawable.btn_download); downloadButton.setBackgroundResource(R.drawable.btn_download);
} }
} }
...@@ -411,7 +412,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -411,7 +412,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
historyListBtn.setVisibility(View.GONE); historyListBtn.setVisibility(View.GONE);
if(isLinkedContent) { if (isLinkedContent) {
ContentDto contentDto = AbstractDao.getDao(ContentDao.class).getContent(contentId); ContentDto contentDto = AbstractDao.getDao(ContentDao.class).getContent(contentId);
if (ContentJSON.KEY_MOVIE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(contentDto.contentType) if (ContentJSON.KEY_MOVIE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(contentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_IMAGE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(contentDto.contentType)
...@@ -453,8 +454,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -453,8 +454,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
Logger.d(TAG, "existSetLocation=%s", ret); Logger.d(TAG, "existSetLocation=%s", ret);
if (ret != null && ret.equals("true")) { // setLocationメソッドが存在する場合、ページ読み込み完了とみなす if (ret != null && ret.equals("true")) { // setLocationメソッドが存在する場合、ページ読み込み完了とみなす
isPageFinished = true; isPageFinished = true;
} } else { // 存在しない場合、ページ読み込み未完了とみなし1秒後に再度呼出しを繰り返す
else { // 存在しない場合、ページ読み込み未完了とみなし1秒後に再度呼出しを繰り返す
handler.postDelayed(new Runnable() { handler.postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -478,11 +478,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -478,11 +478,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
} }
}); });
} } else {
else {
finishActivity(); finishActivity();
} }
} }
@JavascriptInterface @JavascriptInterface
public void getAttachedDataUrl(String data) { public void getAttachedDataUrl(String data) {
commonAttachedDataUrl(data); commonAttachedDataUrl(data);
...@@ -671,7 +671,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -671,7 +671,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
@Override @Override
protected void webViewLoadUrl(String url){ protected void webViewLoadUrl(String url) {
if (webView != null) { if (webView != null) {
webView.loadUrl(url); webView.loadUrl(url);
} }
......
...@@ -401,4 +401,9 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -401,4 +401,9 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
return null; return null;
} }
// 上位のClassからHTML側のコールを行うための処理
public void callViewLoadUrl(String url) {
webViewLoadUrl(url);
}
} }
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