|
|
@@ -681,8 +681,11 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
}
|
|
|
if (subid == null || subid.isEmpty()) {
|
|
|
try {
|
|
|
-
|
|
|
- sub_action.put("dirty","true");
|
|
|
+ if(refresh)
|
|
|
+ sub_action.put("dirty","false");
|
|
|
+ else
|
|
|
+ sub_action.put("dirty","true");
|
|
|
+// sub_action.put("dirty","true");
|
|
|
section_json = content_data_download.optJSONObject("section_" + group);
|
|
|
int count = 0;
|
|
|
count = section_json.optInt("count");
|
|
|
@@ -712,8 +715,11 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
sub_action = enum_subitem_changed(olditem,idarr,sub_action,2);
|
|
|
|
|
|
try {
|
|
|
-
|
|
|
- sub_action.put("dirty","true");
|
|
|
+ if(refresh)
|
|
|
+ sub_action.put("dirty","false");
|
|
|
+ else
|
|
|
+ sub_action.put("dirty","true");
|
|
|
+// sub_action.put("dirty","true");
|
|
|
item_json.put("item_" + value.optInt("subaction_tag"),sub_action);
|
|
|
section_json.put("item_" + item,item_json);
|
|
|
|
|
|
@@ -736,8 +742,12 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
if (valuestr != null) {
|
|
|
try {
|
|
|
|
|
|
+ if(refresh)
|
|
|
+ modify_item.put("dirty","false");
|
|
|
+ else
|
|
|
+ modify_item.put("dirty","true");
|
|
|
modify_item.put("value",valuestr);
|
|
|
- modify_item.put("dirty","true");
|
|
|
+// modify_item.put("dirty","true");
|
|
|
section_json.put("item_" + ic,modify_item);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
@@ -762,7 +772,11 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
try {
|
|
|
|
|
|
- olditem_sub_action.put("dirty","true");
|
|
|
+ if(refresh)
|
|
|
+ olditem_sub_action.put("dirty","false");
|
|
|
+ else
|
|
|
+ olditem_sub_action.put("dirty","true");
|
|
|
+// olditem_sub_action.put("dirty","true");
|
|
|
olditem.put("item_" + value.optInt("subaction_tag"),olditem_sub_action);
|
|
|
section_json.put("item_" + item,olditem);
|
|
|
|
|
|
@@ -844,7 +858,11 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
if (subid == null || subid.isEmpty()) {
|
|
|
try {
|
|
|
- item_json.put("dirty","true");
|
|
|
+ if(refresh)
|
|
|
+ item_json.put("dirty","false");
|
|
|
+ else
|
|
|
+ item_json.put("dirty","true");
|
|
|
+// item_json.put("dirty","true");
|
|
|
section_json = content_data_download.optJSONObject("section_" + group);
|
|
|
int count = 0;
|
|
|
count = section_json.optInt("count");
|
|
|
@@ -868,7 +886,11 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
JSONObject olditem = section_json.optJSONObject("item_" + item);
|
|
|
item_json = enum_subitem_changed(olditem,idarr,item_json,2);
|
|
|
try {
|
|
|
- item_json.put("dirty","true");
|
|
|
+ if(refresh)
|
|
|
+ item_json.put("dirty","false");
|
|
|
+ else
|
|
|
+ item_json.put("dirty","true");
|
|
|
+// item_json.put("dirty","true");
|
|
|
section_json.put("item_" + item,item_json);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -890,8 +912,12 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
|
|
|
if (valuestr != null) {
|
|
|
try {
|
|
|
+ if(refresh)
|
|
|
+ modify_item.put("dirty","false");
|
|
|
+ else
|
|
|
+ modify_item.put("dirty","true");
|
|
|
modify_item.put("value",valuestr);
|
|
|
- modify_item.put("dirty","true");
|
|
|
+// modify_item.put("dirty","true");
|
|
|
section_json.put("item_" + ic,modify_item);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -912,7 +938,13 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
|
|
|
olditem = fill_switch_subitem_subid_mapping(olditem,null,value,jsonmap);
|
|
|
|
|
|
try {
|
|
|
- olditem.put("dirty","true");
|
|
|
+
|
|
|
+ if(refresh)
|
|
|
+ olditem.put("dirty","false");
|
|
|
+ else
|
|
|
+ olditem.put("dirty","true");
|
|
|
+
|
|
|
+// olditem.put("dirty","true");
|
|
|
section_json.put("item_" + item,olditem);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -2538,7 +2570,11 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
try
|
|
|
{
|
|
|
item_json.put("value",value);
|
|
|
- item_json.put("dirty",true);
|
|
|
+ if(refresh)
|
|
|
+ item_json.put("dirty","false");
|
|
|
+ else
|
|
|
+ item_json.put("dirty","true");
|
|
|
+// item_json.put("dirty",true);
|
|
|
|
|
|
if(TextUtils.isEmpty(subid))
|
|
|
{
|
|
|
@@ -2573,8 +2609,11 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
|
|
|
item_json = enum_subitem_changed(olditem,idarr,item_json,2);
|
|
|
|
|
|
-
|
|
|
- item_json.put("dirty",true);
|
|
|
+ if(refresh)
|
|
|
+ item_json.put("dirty","false");
|
|
|
+ else
|
|
|
+ item_json.put("dirty","true");
|
|
|
+// item_json.put("dirty",true);
|
|
|
section_json.put("item_"+item,item_json);
|
|
|
|
|
|
}
|
|
|
@@ -3635,6 +3674,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
} else if (control_type.equals("switch")){
|
|
|
item_json = switch_subitem_changed(olditem,idarr,item_json,2);
|
|
|
}
|
|
|
+
|
|
|
item_json.put("dirty","true");
|
|
|
section_json.put("item_" + item,item_json);
|
|
|
}
|
|
|
@@ -3664,7 +3704,11 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
item_json.put("img_url_" + index,url_down);
|
|
|
item_json.put("avalue",url_up);
|
|
|
item_json.put("img_url_aname_" + index,url_index);
|
|
|
- item_json.put("dirty","true");
|
|
|
+ if(refresh)
|
|
|
+ item_json.put("dirty","false");
|
|
|
+ else
|
|
|
+ item_json.put("dirty","true");
|
|
|
+// item_json.put("dirty","true");
|
|
|
if (subid == null || subid.isEmpty()) {
|
|
|
|
|
|
section_json = content_data_download.optJSONObject("section_" + group);
|
|
|
@@ -3731,8 +3775,11 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
-
|
|
|
- item_json.put("dirty","true");
|
|
|
+ if(refresh)
|
|
|
+ item_json.put("dirty","false");
|
|
|
+ else
|
|
|
+ item_json.put("dirty","true");
|
|
|
+// item_json.put("dirty","true");
|
|
|
item_json.put("value",check);
|
|
|
|
|
|
if (subid == null || subid.isEmpty()) {
|
|
|
@@ -3753,7 +3800,11 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
section_json = content_data_download.optJSONObject("section_" + section);
|
|
|
JSONObject olditem = section_json.optJSONObject("item_" + item);
|
|
|
item_json = enum_subitem_changed(olditem,idarr,item_json,2);
|
|
|
- item_json.put("dirty","true");
|
|
|
+ if(refresh)
|
|
|
+ item_json.put("dirty","false");
|
|
|
+ else
|
|
|
+ item_json.put("dirty","true");
|
|
|
+// item_json.put("dirty","true");
|
|
|
section_json.put("item_" + item,item_json);
|
|
|
}
|
|
|
|
|
|
@@ -4054,6 +4105,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
+
|
|
|
modify_item.put("dirty","true");
|
|
|
subjson.put("item_" + l,modify_item);
|
|
|
} catch (Exception e) {
|
|
|
@@ -4388,6 +4440,7 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
|
|
|
String control_type = olditem.optString("control");
|
|
|
JSONObject new_item = null;
|
|
|
+
|
|
|
item_json.put("dirty","true");
|
|
|
if (control_type.equals("enum")) {
|
|
|
new_item = enum_subitem_changed(olditem,idarr,item_json,2);
|
|
|
@@ -4545,7 +4598,10 @@ protected void commonAction(String value, int groupIndex,int itemIndex,JSONObjec
|
|
|
item_json.put("cadedate",value);
|
|
|
|
|
|
if (subid == null || subid.isEmpty()) {
|
|
|
- item_json.put("dirty","dirty");
|
|
|
+ if(refresh)
|
|
|
+ item_json.put("dirty","false");
|
|
|
+ else
|
|
|
+ item_json.put("dirty","true");
|
|
|
section_json = content_data_download.optJSONObject("section_" + group);
|
|
|
int count = 0;
|
|
|
count = section_json.optInt("count");
|