Commit ee084ad9 by yuichiro ogawa

#38370 仕様変更取込

parent a8377931
......@@ -136,7 +136,6 @@
</LinearLayout>
<LinearLayout
android:id="@+id/print_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
......
......@@ -145,6 +145,19 @@
android:gravity="center">
<ImageButton
android:id="@+id/btn_operation_print"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:src="@drawable/btn_operation_print" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
<ImageButton
android:id="@+id/btn_setting"
style="@style/ToolBarIcon"
android:onClick="onClickSetting"
......
......@@ -136,7 +136,6 @@
</LinearLayout>
<LinearLayout
android:id="@+id/print_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
......
......@@ -136,6 +136,21 @@
android:gravity="center">
<ImageButton
android:id="@+id/btn_operation_print"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="@drawable/btn_operation_print" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center">
<ImageButton
android:id="@+id/btn_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -132,8 +132,6 @@ public class OperationListActivity extends ABVUIActivity {
private ImageButton mCategoryLocationButton; // カテゴリ選択ボタン
private ImageButton mQuickReportPrintButton; // 簡易帳票印刷ボタン
private LinearLayout mPrintLinearLayout; // 簡易帳票印刷ボタン表示領域
private TextView mOperationTitle; // 一覧のタイトル
......@@ -213,7 +211,6 @@ public class OperationListActivity extends ABVUIActivity {
mCommonContentButton = (ImageButton) findViewById(R.id.btn_common_content);
mCategoryLocationButton = (ImageButton) findViewById(R.id.btn_category_location);
mQuickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print);
mPrintLinearLayout = findViewById(R.id.print_layout);
// 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新
updateNeedSyncRoutineOperation();
......@@ -269,6 +266,7 @@ public class OperationListActivity extends ABVUIActivity {
showPrintTargetSelect();
}
});
mQuickReportPrintButton.setVisibility(View.VISIBLE);
// 一括同期ボタン
mOperationBatchSyncButton.setOnClickListener(new View.OnClickListener() {
......@@ -420,9 +418,6 @@ public class OperationListActivity extends ABVUIActivity {
if (isSearched()) {
mOperationTitle.setText(R.string.search_result);
}
// 簡易帳票印刷ボタンの活性制御
printButtonActivityControl();
}
// 検索ワードのクリア
......@@ -1898,20 +1893,4 @@ public class OperationListActivity extends ABVUIActivity {
return getABVUIDataCache().getSortCondition();
}
/**
* 簡易帳票印刷ボタン活性制御
* 簡易帳票区分が1のデータが存在する場合表示、それ以外非表示
*/
private void printButtonActivityControl() {
List<OperationDto> operations = mOperationDao.getAllOperation();
for (OperationDto operation : operations) {
if (operation.quickReport == 1) {
mQuickReportPrintButton.setVisibility(View.VISIBLE);
mPrintLinearLayout.setVisibility(View.VISIBLE);
return;
}
}
mQuickReportPrintButton.setVisibility(View.GONE);
mPrintLinearLayout.setVisibility(View.GONE);
}
}
......@@ -16,8 +16,11 @@ import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.exception.ExceptionHandler;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.CategoryContentDto;
import jp.agentec.abook.abv.bl.dto.ContentDto;
......@@ -29,12 +32,14 @@ import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.AlertDialogUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.adapter.OperationRelatedContentSectionAdapter;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
import jp.agentec.adf.util.StringUtil;
/**
......@@ -47,7 +52,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
private OperationRelatedContentSectionAdapter mOperationRelatedContentSectionAdapter;
private ImageButton mOperationHomeButton; // ホームボタン
private ImageButton mOperationRelatedContentButton; // 関連資料ボタン
private ImageButton mOperationRelatedContentButton; //
private ImageButton mQuickReportPrintButton; // 簡易帳票印刷ボタン
private TextView mTxtOperationRelatedContent;
private Button mAllSaveButton;
......@@ -74,6 +80,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
mContentListView = (ListView) findViewById(R.id.lv_content_list);
mTxtOperationRelatedContent = (TextView) findViewById(R.id.txt_operation_related_content);
mQuickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print);
// リソースパターンの適用
mTxtOperationRelatedContent.setText("" + PatternStringUtil.patternToString(getApplicationContext(),
R.string.title_common_content,
......@@ -101,6 +109,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showCommunicationMenuDialog();
}
});
// 印刷ボタン活性化
mQuickReportPrintButton.setVisibility(View.VISIBLE);
}
@Override
......@@ -330,6 +340,14 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
}.execute();
}
});
// 簡易帳票印刷ボタン
mQuickReportPrintButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showPrintTargetSelect();
}
});
}
/**
......@@ -383,6 +401,43 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showAlertDialog(cancelDownloadDialog);
}
/**
* 簡易帳票印刷対象選択画面表示
*/
private void showPrintTargetSelect() {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
showDisConnectNetworkDialog();
return;
}
Intent intent = new Intent();
intent.setClass(OperationRelatedContentActivity.this, OnlineHTMLWebViewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportSearch));
startActivity(intent, NaviConsts.Right);
}
/**
* インターネットが繋がってない場合のダイアログ表示
*/
private void showDisConnectNetworkDialog() {
handler.post(new Runnable() {
@Override
public void run() {
// ヘッダーの新着更新処理を完了にさせる
stopUpdateAnimation();
final ABookAlertDialog messageDialog = AlertDialogUtil.createAlertDialog(OperationRelatedContentActivity.this, R.string.app_name);
messageDialog.setMessage(getString(R.string.msg_network_offline));
messageDialog.setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
messageDialog.dismiss();
}
});
messageDialog.show();
}
});
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
......
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