Commit 5bb3133f by Jeong Gilmo

#32861 作業情報追加(Android)

- 削除機能追加
- 画像追加
parent 3144d053

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
......@@ -355,6 +355,7 @@
<string name="temp_save_info">一時保存しますか?</string>
<string name="save_info">保存してサーバへ送信しますか?</string>
<string name="msg_temp_save_result">保存されました。</string>
<string name="delete_info">保存されたデータを削除しますか?</string>
<!-- #32861 作業情報追加 end -->
<!-- Error Message -->
......
......@@ -355,6 +355,7 @@
<string name="temp_save_info">임시저장 하시겠습니까?</string>
<string name="save_info">저장하시고 서버로 송신하시겠습니까?</string>
<string name="msg_temp_save_result">저장되었습니다.</string>
<string name="delete_info">저장된 데이터를 삭제하시겠습니까?</string>
<!-- #32861 作業情報追加 end -->
<!-- Error Message -->
......
......@@ -355,6 +355,7 @@
<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="msg_temp_save_result">It has been saved.</string>
<string name="delete_info">Do you want to delete the saved data?</string>
<!-- #32861 作業情報追加 end -->
<!-- Error Message -->
......
......@@ -66,13 +66,21 @@
<!-- #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
android:id="@+id/btn_temp_save"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/ic_download_off" />
android:background="@drawable/ic_local_save" />
<Button
android:id="@+id/btn_save"
android:layout_width="30dp"
......@@ -80,7 +88,7 @@
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/ic_download_on" />
android:background="@drawable/ic_save" />
<!-- #32861 作業情報追加 end -->
</LinearLayout>
......
......@@ -1237,6 +1237,18 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
});
}
// 削除処理
public void ozdDeleteProcess() {
runOnUiThread(new Runnable() {
@Override
public void run () {
// 実行Javascript - 閉じる
webViewLoadUrl("javascript:CHK.deleteOzReport()");
Logger.d(TAG, "ozdDeleteProcess");
}
});
}
// 作業一覧画面に遷移
public void goToMain() {
ActivityHandlingHelper.getInstance().finishAllContentViewActivity(); // 一覧画面に遷移
......@@ -1251,9 +1263,11 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ozdCancelProcess(); // 閉じる
} else if (mButtonStatus == R.id.btn_temp_save) {
ozdLocalSaveProcess(); // 一時保存
} else if (mButtonStatus == R.id.btn_save){
} else if (mButtonStatus == R.id.btn_save) {
ozdSaveProcess(); // 保存
doneProcess(1);
} else if (mButtonStatus == R.id.btn_delete) {
ozdDeleteProcess(); // 削除
}
}
// #32861 作業情報追加 end
......
......@@ -167,4 +167,31 @@ public class OzdFileHelper {
}
return FileUtil.move(tempOzdFilePath, ozdFilePath, true);
}
// #32861 start
// 削除する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;
}
// #32861 end
}
\ No newline at end of file
......@@ -76,6 +76,7 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
// #32926 作業報告画面改善 start
private int mTaskReportLevel; // 作業報告レベル
boolean mIsOzFilePath; // 削除処理のフラグ
// #32926 作業報告画面改善 end
@Override
......@@ -129,12 +130,17 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
final Button closeButton = (Button) findViewById(R.id.btn_close);
final Button tempSaveButton = (Button) findViewById(R.id.btn_temp_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);
closeButton.setVisibility(mAddReport ? 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() {
@Override
......@@ -169,6 +175,15 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
showSaveConfirmAlert(R.string.save, R.string.save_info);
}
});
// 削除ボタン
deleteButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mButtonStatus = R.id.btn_delete; // HTML側の分岐処理を行うため変数に値を渡す
showSaveConfirmAlert(R.string.delete, R.string.delete_info);
}
});
// #32861 作業情報追加 end
// #32926 作業報告画面改善 start
......@@ -563,7 +578,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
logoutAkert.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.confirm), new DialogInterface.OnClickListener() {
@Override
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);
......@@ -579,7 +598,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
return;
}
}
doProcess(); // HTML側の処理を行う
}
// #32861 作業情報追加 end
}
\ No newline at end of file
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