2013-11-07 Miguel de Dios <miguel.dedios@artica.es>

* src/pandroid_event_viewer/pandorafms/EventList.java,
	src/pandroid_event_viewer/pandorafms/PopupValidationEvent.java:
	fixed the validation event.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9031 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-11-07 15:45:37 +00:00
parent e9eb7ed605
commit 837ae9918d
3 changed files with 24 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2013-11-07 Miguel de Dios <miguel.dedios@artica.es>
* src/pandroid_event_viewer/pandorafms/EventList.java,
src/pandroid_event_viewer/pandorafms/PopupValidationEvent.java:
fixed the validation event.
2013-11-07 Miguel de Dios <miguel.dedios@artica.es>
* src/pandroid_event_viewer/pandorafms/EventList.java,

View File

@ -18,6 +18,7 @@ package pandroid_event_viewer.pandorafms;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map.Entry;
import android.app.Activity;
@ -324,8 +325,19 @@ public class EventList extends ListActivity {
if (resultCode == RESULT_OK) {
String text;
if (data.getExtras().getBoolean("validated")) {
currentElement.setBackgroundColor(getResources().getColor(
R.color.Green));
TextView timestamp = (TextView) currentElement
.findViewById(R.id.timestamp);
Core.setTextViewLeftImage(timestamp, getResources()
.getDrawable(R.drawable.tick), 24);
for (int i = 0; i < this.object.eventList.size(); i++) {
int id_event = data.getIntExtra("id_event", -1);
if (this.object.eventList.get(i).id_event == id_event)
this.object.eventList.get(i).status = 1;
}
text = getApplicationContext().getString(
R.string.successful_validate_event_str);
}
@ -770,7 +782,7 @@ public class EventList extends ListActivity {
}
API.createNewIncident(getApplicationContext(), incidentParams);
}
/**
* Performs the api call to add the new incident
*

View File

@ -102,7 +102,10 @@ public class PopupValidationEvent extends Activity {
else {
Intent resultIntent = new Intent();
resultIntent.putExtra("validated", result);
resultIntent.putExtra("id_event", id_event);
setResult(RESULT_OK, resultIntent);
finish();
}
}