|
@@ -16,6 +16,7 @@ import android.text.InputFilter;
|
|
|
import android.text.InputType;
|
|
import android.text.InputType;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
import android.text.TextWatcher;
|
|
import android.text.TextWatcher;
|
|
|
|
|
+import android.util.JsonReader;
|
|
|
import android.util.Log;
|
|
import android.util.Log;
|
|
|
import android.view.LayoutInflater;
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.Menu;
|
|
import android.view.Menu;
|
|
@@ -2280,16 +2281,26 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
|
|
boolean readonly = content_data_download.optBoolean("readonly");
|
|
boolean readonly = content_data_download.optBoolean("readonly");
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
JSONObject item_json = content_data_control.optJSONArray(groupPosition).optJSONObject(childPosition);
|
|
JSONObject item_json = content_data_control.optJSONArray(groupPosition).optJSONObject(childPosition);
|
|
|
|
|
+
|
|
|
|
|
+ boolean disable = item_json.optBoolean("disable");
|
|
|
|
|
+ if (disable || readonly) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
String control = item_json.optString("control");
|
|
String control = item_json.optString("control");
|
|
|
if (control.equals("editor")) {
|
|
if (control.equals("editor")) {
|
|
|
handle_editor_cell_select(groupPosition,childPosition,item_json);
|
|
handle_editor_cell_select(groupPosition,childPosition,item_json);
|
|
|
}
|
|
}
|
|
|
else if (control.equals("enum")) {
|
|
else if (control.equals("enum")) {
|
|
|
- boolean disable = item_json.optBoolean("disable");
|
|
|
|
|
- if (disable || readonly) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// boolean disable = item_json.optBoolean("disable");
|
|
|
|
|
+// if (disable || readonly) {
|
|
|
|
|
+// return false;
|
|
|
|
|
+// }
|
|
|
JSONObject cadedate_json = item_json.optJSONObject("cadedate");
|
|
JSONObject cadedate_json = item_json.optJSONObject("cadedate");
|
|
|
String single_select = item_json.optString("single_select");
|
|
String single_select = item_json.optString("single_select");
|
|
|
String title = item_json.optString("aname");
|
|
String title = item_json.optString("aname");
|
|
@@ -2306,6 +2317,10 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
|
|
JSONObject paramsjson = item_json.optJSONObject("params");
|
|
JSONObject paramsjson = item_json.optJSONObject("params");
|
|
|
|
|
|
|
|
|
|
+ JSONObject projectParams = prepare_project_parameters();
|
|
|
|
|
+
|
|
|
|
|
+ RAUtil.mergeJson(paramsjson,projectParams);
|
|
|
|
|
+
|
|
|
Bundle params=RAUtil.Json2Bundle(paramsjson);
|
|
Bundle params=RAUtil.Json2Bundle(paramsjson);
|
|
|
|
|
|
|
|
intent = new EnumSlectOnlineActivity.Builder().build(mCtx,title,max_select,groupPosition,childPosition,singleSelect,true,ONLINE_ENUM_URL,params);
|
|
intent = new EnumSlectOnlineActivity.Builder().build(mCtx,title,max_select,groupPosition,childPosition,singleSelect,true,ONLINE_ENUM_URL,params);
|
|
@@ -2489,6 +2504,10 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ protected JSONObject prepare_project_parameters()
|
|
|
|
|
+ {
|
|
|
|
|
+ throw new AssertionError("CommonEditor.prepare_project_parameters not impl");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
protected void handle_editor_cell_select( int groupIndex,int itemIndex,JSONObject item_json)
|
|
protected void handle_editor_cell_select( int groupIndex,int itemIndex,JSONObject item_json)
|
|
|
{
|
|
{
|
|
@@ -3167,6 +3186,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
String value = null;
|
|
String value = null;
|
|
|
String required = null;
|
|
String required = null;
|
|
|
JSONObject data = null;
|
|
JSONObject data = null;
|
|
|
|
|
+ boolean disable = false;
|
|
|
|
|
|
|
|
holder.group = group;
|
|
holder.group = group;
|
|
|
holder.child = child;
|
|
holder.child = child;
|
|
@@ -3177,6 +3197,14 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
value = item_json.optString("value");
|
|
value = item_json.optString("value");
|
|
|
required = item_json.optString("required");
|
|
required = item_json.optString("required");
|
|
|
data = item_json.optJSONObject("data");
|
|
data = item_json.optJSONObject("data");
|
|
|
|
|
+ data = item_json.optJSONObject("data");
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if (disable || readonly) {
|
|
|
|
|
+ holder.action_lb.setTextColor(Color.LTGRAY);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ holder.action_lb.setTextColor(Color.BLACK);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -3186,9 +3214,16 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
title = title + "*";
|
|
title = title + "*";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
holder.action_lb.setText(title);
|
|
holder.action_lb.setText(title);
|
|
|
holder.action_code = value;
|
|
holder.action_code = value;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if (cancommit && required.equals("true") && data == null) {
|
|
if (cancommit && required.equals("true") && data == null) {
|
|
|
// Shadow red
|
|
// Shadow red
|
|
|
} else {
|
|
} else {
|