Commit b700f4ac5b49ec19047561f5ce2b00d5580fdc1d
1 parent
e612faac
- fix addbook routine
Showing
3 changed files
with
6 additions
and
4 deletions
app/src/main/java/net/devfac/userstory/Constants.java
... | ... | @@ -53,7 +53,7 @@ public class Constants { |
53 | 53 | public static final String BOOK_ADD_ID_READ_STATUS = "category"; |
54 | 54 | public static final String BOOK_ADD_ID_HAVING_STATUS = "category2"; |
55 | 55 | public static final String BOOK_ADD_ID_RATING = "starsgiven"; |
56 | - public static final String BOOK_ADD_ID_MEMO = "comment"; | |
56 | + public static final String BOOK_ADD_ID_MEMO = "comments"; | |
57 | 57 | public static final String BOOK_ADD_ID_DATE_START = "startDate"; |
58 | 58 | public static final String BOOK_ADD_ID_DATE_END = "endDate"; |
59 | 59 | public static final String BOOK_ADD_ID_DATE_PURCHASED = "purchaseDate"; | ... | ... |
app/src/main/java/net/devfac/userstory/FSM/state/StateInputInfoToAdd.java
1 | 1 | package net.devfac.userstory.FSM.state; |
2 | 2 | |
3 | +import android.os.Handler; | |
4 | + | |
3 | 5 | import net.devfac.userstory.Constants; |
4 | 6 | import net.devfac.userstory.DialogAddBook; |
5 | 7 | import net.devfac.userstory.FSM.Action; |
... | ... | @@ -117,14 +119,14 @@ public class StateInputInfoToAdd implements State { |
117 | 119 | scriptUrl = |
118 | 120 | UrlGenerator.getInstance(mStateContext.mContext) |
119 | 121 | .getJavascriptSetCheckbox( |
120 | - Constants.BOOK_ADD_ID_DATE_PURCHASED, | |
122 | + Constants.BOOK_ADD_ID_IS_RENTABLE, | |
121 | 123 | true); |
122 | 124 | } |
123 | 125 | else if(mBookInfoToAdd.isRentable == Constants.IS_NOT_RENTABLE ){ |
124 | 126 | scriptUrl = |
125 | 127 | UrlGenerator.getInstance(mStateContext.mContext) |
126 | 128 | .getJavascriptSetCheckbox( |
127 | - Constants.BOOK_ADD_ID_DATE_PURCHASED, | |
129 | + Constants.BOOK_ADD_ID_IS_RENTABLE, | |
128 | 130 | false); |
129 | 131 | } |
130 | 132 | ... | ... |
app/src/main/java/net/devfac/userstory/Utils/UrlGenerator.java
... | ... | @@ -74,7 +74,7 @@ public class UrlGenerator { |
74 | 74 | } |
75 | 75 | |
76 | 76 | public String getJavascriptSetValueOfId(String id, String value){ |
77 | - return "javascript:document.getElementById('" + id + "').value=" + value + ";"; | |
77 | + return "document.getElementById('" + id + "').value='" + value + "';"; | |
78 | 78 | } |
79 | 79 | |
80 | 80 | public String getJavascriptSetCheckbox(String id, boolean checked){ | ... | ... |