Merge lp:~openerp-dev/openerp-mobile-client/trunk-note_grid_update-sla into lp:openerp-mobile-client
- trunk-note_grid_update-sla
- Merge into openerp-mobile-client
Proposed by
Shailesh Lakum(OpenERP)
Status: | Merged |
---|---|
Merged at revision: | 158 |
Proposed branch: | lp:~openerp-dev/openerp-mobile-client/trunk-note_grid_update-sla |
Merge into: | lp:openerp-mobile-client |
Diff against target: |
329 lines (+42/-36) 8 files modified
res/layout/fragment_note_compose.xml (+8/-12) res/layout/fragment_note_detail.xml (+4/-4) res/menu/menu_fragment_note_new_edit.xml (+4/-3) res/values/strings.xml (+2/-0) src/com/openerp/addons/note/Note.java (+3/-2) src/com/openerp/addons/note/NoteComposeActivity.java (+14/-11) src/com/openerp/addons/note/NoteDB.java (+2/-0) src/com/openerp/addons/note/NoteDetail.java (+5/-4) |
To merge this branch: | bzr merge lp:~openerp-dev/openerp-mobile-client/trunk-note_grid_update-sla |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dharmang Soni (OpenERP) | Pending | ||
Review via email: mp+217383@code.launchpad.net |
Commit message
Description of the change
Hello,
Following updates are done in Note module:
1) Attachment with Expandable Grid Support
2) Audio, File, Image attachment support
3) Speech to text in note compose
Thanks,
Shailesh Lakum (sla)
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'res/drawable-hdpi/ic_action_cancel.png' | |||
2 | 0 | Binary files res/drawable-hdpi/ic_action_cancel.png 1970-01-01 00:00:00 +0000 and res/drawable-hdpi/ic_action_cancel.png 2014-04-28 07:01:36 +0000 differ | 0 | Binary files res/drawable-hdpi/ic_action_cancel.png 1970-01-01 00:00:00 +0000 and res/drawable-hdpi/ic_action_cancel.png 2014-04-28 07:01:36 +0000 differ |
3 | === added file 'res/drawable-hdpi/ic_menu_action_content_new_attachment.png' | |||
4 | 1 | Binary files res/drawable-hdpi/ic_menu_action_content_new_attachment.png 1970-01-01 00:00:00 +0000 and res/drawable-hdpi/ic_menu_action_content_new_attachment.png 2014-04-28 07:01:36 +0000 differ | 1 | Binary files res/drawable-hdpi/ic_menu_action_content_new_attachment.png 1970-01-01 00:00:00 +0000 and res/drawable-hdpi/ic_menu_action_content_new_attachment.png 2014-04-28 07:01:36 +0000 differ |
5 | === added file 'res/drawable-mdpi/ic_action_cancel.png' | |||
6 | 2 | Binary files res/drawable-mdpi/ic_action_cancel.png 1970-01-01 00:00:00 +0000 and res/drawable-mdpi/ic_action_cancel.png 2014-04-28 07:01:36 +0000 differ | 2 | Binary files res/drawable-mdpi/ic_action_cancel.png 1970-01-01 00:00:00 +0000 and res/drawable-mdpi/ic_action_cancel.png 2014-04-28 07:01:36 +0000 differ |
7 | === added file 'res/drawable-mdpi/ic_menu_action_content_new_attachment.png' | |||
8 | 3 | Binary files res/drawable-mdpi/ic_menu_action_content_new_attachment.png 1970-01-01 00:00:00 +0000 and res/drawable-mdpi/ic_menu_action_content_new_attachment.png 2014-04-28 07:01:36 +0000 differ | 3 | Binary files res/drawable-mdpi/ic_menu_action_content_new_attachment.png 1970-01-01 00:00:00 +0000 and res/drawable-mdpi/ic_menu_action_content_new_attachment.png 2014-04-28 07:01:36 +0000 differ |
9 | === added file 'res/drawable-xhdpi/ic_action_cancel.png' | |||
10 | 4 | Binary files res/drawable-xhdpi/ic_action_cancel.png 1970-01-01 00:00:00 +0000 and res/drawable-xhdpi/ic_action_cancel.png 2014-04-28 07:01:36 +0000 differ | 4 | Binary files res/drawable-xhdpi/ic_action_cancel.png 1970-01-01 00:00:00 +0000 and res/drawable-xhdpi/ic_action_cancel.png 2014-04-28 07:01:36 +0000 differ |
11 | === added file 'res/drawable-xhdpi/ic_menu_action_content_new_attachment.png' | |||
12 | 5 | Binary files res/drawable-xhdpi/ic_menu_action_content_new_attachment.png 1970-01-01 00:00:00 +0000 and res/drawable-xhdpi/ic_menu_action_content_new_attachment.png 2014-04-28 07:01:36 +0000 differ | 5 | Binary files res/drawable-xhdpi/ic_menu_action_content_new_attachment.png 1970-01-01 00:00:00 +0000 and res/drawable-xhdpi/ic_menu_action_content_new_attachment.png 2014-04-28 07:01:36 +0000 differ |
13 | === added file 'res/drawable-xxhdpi/ic_action_cancel.png' | |||
14 | 6 | Binary files res/drawable-xxhdpi/ic_action_cancel.png 1970-01-01 00:00:00 +0000 and res/drawable-xxhdpi/ic_action_cancel.png 2014-04-28 07:01:36 +0000 differ | 6 | Binary files res/drawable-xxhdpi/ic_action_cancel.png 1970-01-01 00:00:00 +0000 and res/drawable-xxhdpi/ic_action_cancel.png 2014-04-28 07:01:36 +0000 differ |
15 | === added file 'res/drawable-xxhdpi/ic_menu_action_content_new_attachment.png' | |||
16 | 7 | Binary files res/drawable-xxhdpi/ic_menu_action_content_new_attachment.png 1970-01-01 00:00:00 +0000 and res/drawable-xxhdpi/ic_menu_action_content_new_attachment.png 2014-04-28 07:01:36 +0000 differ | 7 | Binary files res/drawable-xxhdpi/ic_menu_action_content_new_attachment.png 1970-01-01 00:00:00 +0000 and res/drawable-xxhdpi/ic_menu_action_content_new_attachment.png 2014-04-28 07:01:36 +0000 differ |
17 | === modified file 'res/layout/fragment_note_compose.xml' | |||
18 | --- res/layout/fragment_note_compose.xml 2014-04-14 13:27:33 +0000 | |||
19 | +++ res/layout/fragment_note_compose.xml 2014-04-28 07:01:36 +0000 | |||
20 | @@ -4,17 +4,13 @@ | |||
21 | 4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
22 | 5 | android:background="#f5f5f5" | 5 | android:background="#f5f5f5" |
23 | 6 | android:clipToPadding="false" | 6 | android:clipToPadding="false" |
24 | 7 | android:fillViewport="true" | ||
25 | 8 | android:paddingBottom="10dp" | ||
26 | 9 | android:paddingLeft="10dp" | ||
27 | 10 | android:paddingRight="10dp" | ||
28 | 11 | android:paddingTop="?android:attr/actionBarSize" > | 7 | android:paddingTop="?android:attr/actionBarSize" > |
29 | 12 | 8 | ||
30 | 13 | <LinearLayout | 9 | <LinearLayout |
31 | 14 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
32 | 15 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
33 | 16 | android:orientation="vertical" | 12 | android:orientation="vertical" |
35 | 17 | android:padding="15dp" > | 13 | android:padding="10dp" > |
36 | 18 | 14 | ||
37 | 19 | <EditText | 15 | <EditText |
38 | 20 | android:id="@+id/edtNoteTitleInput" | 16 | android:id="@+id/edtNoteTitleInput" |
39 | @@ -48,19 +44,19 @@ | |||
40 | 48 | android:fontFamily="sans-serif-light" | 44 | android:fontFamily="sans-serif-light" |
41 | 49 | android:hint="@string/compose_note_description" /> | 45 | android:hint="@string/compose_note_description" /> |
42 | 50 | 46 | ||
44 | 51 | <GridView | 47 | <WebView |
45 | 48 | android:id="@+id/webNoteComposeWebViewPad" | ||
46 | 49 | android:layout_width="match_parent" | ||
47 | 50 | android:layout_height="wrap_content" | ||
48 | 51 | android:visibility="invisible" /> | ||
49 | 52 | |||
50 | 53 | <com.openerp.util.controls.ExpandableHeightGridView | ||
51 | 52 | android:id="@+id/noteAttachmentGrid" | 54 | android:id="@+id/noteAttachmentGrid" |
52 | 53 | android:layout_width="match_parent" | 55 | android:layout_width="match_parent" |
53 | 54 | android:layout_height="match_parent" | 56 | android:layout_height="match_parent" |
54 | 55 | android:horizontalSpacing="5dp" | 57 | android:horizontalSpacing="5dp" |
55 | 56 | android:numColumns="2" | 58 | android:numColumns="2" |
56 | 57 | android:verticalSpacing="5dp" /> | 59 | android:verticalSpacing="5dp" /> |
57 | 58 | |||
58 | 59 | <WebView | ||
59 | 60 | android:id="@+id/webNoteComposeWebViewPad" | ||
60 | 61 | android:layout_width="match_parent" | ||
61 | 62 | android:layout_height="match_parent" | ||
62 | 63 | android:visibility="invisible" /> | ||
63 | 64 | </LinearLayout> | 60 | </LinearLayout> |
64 | 65 | 61 | ||
65 | 66 | </ScrollView> | 62 | </ScrollView> |
66 | 67 | \ No newline at end of file | 63 | \ No newline at end of file |
67 | 68 | 64 | ||
68 | === modified file 'res/layout/fragment_note_detail.xml' | |||
69 | --- res/layout/fragment_note_detail.xml 2014-04-14 13:27:33 +0000 | |||
70 | +++ res/layout/fragment_note_detail.xml 2014-04-28 07:01:36 +0000 | |||
71 | @@ -40,23 +40,23 @@ | |||
72 | 40 | android:layout_width="fill_parent" | 40 | android:layout_width="fill_parent" |
73 | 41 | android:layout_height="wrap_content" | 41 | android:layout_height="wrap_content" |
74 | 42 | android:layout_marginBottom="10dp" | 42 | android:layout_marginBottom="10dp" |
75 | 43 | android:fontFamily="sans-serif-condensed" | ||
76 | 43 | android:padding="10dp" | 44 | android:padding="10dp" |
77 | 44 | android:fontFamily="sans-serif-condensed" | ||
78 | 45 | android:textAppearance="?android:attr/textAppearanceMedium" | 45 | android:textAppearance="?android:attr/textAppearanceMedium" |
79 | 46 | android:textStyle="bold" /> | 46 | android:textStyle="bold" /> |
80 | 47 | 47 | ||
81 | 48 | <TextView | 48 | <TextView |
82 | 49 | android:id="@+id/txvNoteDetailMemo" | 49 | android:id="@+id/txvNoteDetailMemo" |
83 | 50 | android:fontFamily="sans-serif-light" | ||
84 | 51 | android:layout_width="fill_parent" | 50 | android:layout_width="fill_parent" |
85 | 52 | android:layout_height="wrap_content" | 51 | android:layout_height="wrap_content" |
86 | 53 | android:layout_marginBottom="10dp" | 52 | android:layout_marginBottom="10dp" |
87 | 54 | android:autoLink="web" | 53 | android:autoLink="web" |
88 | 55 | android:background="@android:color/transparent" | 54 | android:background="@android:color/transparent" |
89 | 55 | android:fontFamily="sans-serif-light" | ||
90 | 56 | android:padding="10dp" | 56 | android:padding="10dp" |
91 | 57 | android:textAppearance="?android:attr/textAppearanceMedium" /> | 57 | android:textAppearance="?android:attr/textAppearanceMedium" /> |
94 | 58 | 58 | ||
95 | 59 | <GridView | 59 | <com.openerp.util.controls.ExpandableHeightGridView |
96 | 60 | android:id="@+id/noteGridViewAttach" | 60 | android:id="@+id/noteGridViewAttach" |
97 | 61 | android:layout_width="fill_parent" | 61 | android:layout_width="fill_parent" |
98 | 62 | android:layout_height="fill_parent" | 62 | android:layout_height="fill_parent" |
99 | 63 | 63 | ||
100 | === modified file 'res/menu/menu_fragment_note_new_edit.xml' | |||
101 | --- res/menu/menu_fragment_note_new_edit.xml 2014-04-14 13:27:33 +0000 | |||
102 | +++ res/menu/menu_fragment_note_new_edit.xml 2014-04-28 07:01:36 +0000 | |||
103 | @@ -4,10 +4,10 @@ | |||
104 | 4 | android:id="@+id/menu_note_speech_to_text" | 4 | android:id="@+id/menu_note_speech_to_text" |
105 | 5 | android:icon="@drawable/ic_action_speech_to_text" | 5 | android:icon="@drawable/ic_action_speech_to_text" |
106 | 6 | android:showAsAction="always" | 6 | android:showAsAction="always" |
108 | 7 | android:title="Speech to text"/> | 7 | android:title="@string/note_menu_title_speech_to_text"/> |
109 | 8 | <item | 8 | <item |
110 | 9 | android:id="@+id/menu_note_attach" | 9 | android:id="@+id/menu_note_attach" |
112 | 10 | android:icon="@drawable/ic_action_content_new_attachment" | 10 | android:icon="@drawable/ic_menu_action_content_new_attachment" |
113 | 11 | android:showAsAction="always" | 11 | android:showAsAction="always" |
114 | 12 | android:title="Attachement"> | 12 | android:title="Attachement"> |
115 | 13 | <menu> | 13 | <menu> |
116 | @@ -27,7 +27,8 @@ | |||
117 | 27 | </item> | 27 | </item> |
118 | 28 | <item | 28 | <item |
119 | 29 | android:id="@+id/menu_note_cancel" | 29 | android:id="@+id/menu_note_cancel" |
121 | 30 | android:showAsAction="never" | 30 | android:icon="@drawable/ic_action_cancel" |
122 | 31 | android:showAsAction="always" | ||
123 | 31 | android:title="Cancel"> | 32 | android:title="Cancel"> |
124 | 32 | </item> | 33 | </item> |
125 | 33 | 34 | ||
126 | 34 | 35 | ||
127 | === modified file 'res/values/strings.xml' | |||
128 | --- res/values/strings.xml 2014-04-14 13:27:33 +0000 | |||
129 | +++ res/values/strings.xml 2014-04-28 07:01:36 +0000 | |||
130 | @@ -27,5 +27,7 @@ | |||
131 | 27 | <!-- Detail Note Fragment Strings --> | 27 | <!-- Detail Note Fragment Strings --> |
132 | 28 | <string name="detail_note_name">Note Name</string> | 28 | <string name="detail_note_name">Note Name</string> |
133 | 29 | <string name="detail_note_memo">Note Memo</string> | 29 | <string name="detail_note_memo">Note Memo</string> |
134 | 30 | |||
135 | 31 | <string name="note_menu_title_speech_to_text">Speech to text</string> | ||
136 | 30 | 32 | ||
137 | 31 | </resources> | 33 | </resources> |
138 | 32 | \ No newline at end of file | 34 | \ No newline at end of file |
139 | 33 | 35 | ||
140 | === modified file 'src/com/openerp/addons/note/Note.java' | |||
141 | --- src/com/openerp/addons/note/Note.java 2014-04-14 13:27:33 +0000 | |||
142 | +++ src/com/openerp/addons/note/Note.java 2014-04-28 07:01:36 +0000 | |||
143 | @@ -250,8 +250,9 @@ | |||
144 | 250 | whereArgs = new String[] { "true", mStageId + "" }; | 250 | whereArgs = new String[] { "true", mStageId + "" }; |
145 | 251 | break; | 251 | break; |
146 | 252 | } | 252 | } |
149 | 253 | mNotesList.addAll(db().select(where, whereArgs, null, null, | 253 | List<OEDataRow> result = db().select(where, whereArgs, null, null, |
150 | 254 | "id DESC")); | 254 | "id DESC"); |
151 | 255 | mNotesList.addAll(result); | ||
152 | 255 | return null; | 256 | return null; |
153 | 256 | } | 257 | } |
154 | 257 | 258 | ||
155 | 258 | 259 | ||
156 | === modified file 'src/com/openerp/addons/note/NoteComposeActivity.java' | |||
157 | --- src/com/openerp/addons/note/NoteComposeActivity.java 2014-04-14 13:27:33 +0000 | |||
158 | +++ src/com/openerp/addons/note/NoteComposeActivity.java 2014-04-28 07:01:36 +0000 | |||
159 | @@ -52,7 +52,6 @@ | |||
160 | 52 | import android.view.ViewGroup; | 52 | import android.view.ViewGroup; |
161 | 53 | import android.webkit.WebView; | 53 | import android.webkit.WebView; |
162 | 54 | import android.widget.EditText; | 54 | import android.widget.EditText; |
163 | 55 | import android.widget.GridView; | ||
164 | 56 | import android.widget.ImageView; | 55 | import android.widget.ImageView; |
165 | 57 | import android.widget.TextView; | 56 | import android.widget.TextView; |
166 | 58 | import android.widget.Toast; | 57 | import android.widget.Toast; |
167 | @@ -70,6 +69,7 @@ | |||
168 | 70 | import com.openerp.support.OEUser; | 69 | import com.openerp.support.OEUser; |
169 | 71 | import com.openerp.support.listview.OEListAdapter; | 70 | import com.openerp.support.listview.OEListAdapter; |
170 | 72 | import com.openerp.util.HTMLHelper; | 71 | import com.openerp.util.HTMLHelper; |
171 | 72 | import com.openerp.util.controls.ExpandableHeightGridView; | ||
172 | 73 | import com.openerp.util.tags.MultiTagsTextView.TokenListener; | 73 | import com.openerp.util.tags.MultiTagsTextView.TokenListener; |
173 | 74 | import com.openerp.util.tags.TagsView; | 74 | import com.openerp.util.tags.TagsView; |
174 | 75 | import com.openerp.util.tags.TagsView.CustomTagViewListener; | 75 | import com.openerp.util.tags.TagsView.CustomTagViewListener; |
175 | @@ -121,12 +121,12 @@ | |||
176 | 121 | EditText edtNoteTitle = null; | 121 | EditText edtNoteTitle = null; |
177 | 122 | EditText edtNoteDescription = null; | 122 | EditText edtNoteDescription = null; |
178 | 123 | TagsView mNoteTagsView = null; | 123 | TagsView mNoteTagsView = null; |
180 | 124 | GridView mNoteAttachmentGrid = null; | 124 | ExpandableHeightGridView mNoteAttachmentGrid = null; |
181 | 125 | List<Object> mNoteAttachmentList = new ArrayList<Object>(); | 125 | List<Object> mNoteAttachmentList = new ArrayList<Object>(); |
182 | 126 | OEListAdapter mNoteListAdapterAttach = null; | 126 | OEListAdapter mNoteListAdapterAttach = null; |
183 | 127 | Attachment mAttachment = null; | 127 | Attachment mAttachment = null; |
184 | 128 | |||
185 | 129 | PackageManager mPackageManager = null; | 128 | PackageManager mPackageManager = null; |
186 | 129 | String oldName = null; | ||
187 | 130 | 130 | ||
188 | 131 | @Override | 131 | @Override |
189 | 132 | protected void onCreate(Bundle savedInstanceState) { | 132 | protected void onCreate(Bundle savedInstanceState) { |
190 | @@ -153,7 +153,6 @@ | |||
191 | 153 | private void handleIntent() { | 153 | private void handleIntent() { |
192 | 154 | Log.d(TAG, "NoteComposeActivity->handleIntent()"); | 154 | Log.d(TAG, "NoteComposeActivity->handleIntent()"); |
193 | 155 | Intent intent = getIntent(); | 155 | Intent intent = getIntent(); |
194 | 156 | |||
195 | 157 | if (intent.hasExtra("request_code")) { | 156 | if (intent.hasExtra("request_code")) { |
196 | 158 | Attachment.Types type = (Types) intent.getExtras().get( | 157 | Attachment.Types type = (Types) intent.getExtras().get( |
197 | 159 | "request_code"); | 158 | "request_code"); |
198 | @@ -175,7 +174,8 @@ | |||
199 | 175 | @SuppressLint("SetJavaScriptEnabled") | 174 | @SuppressLint("SetJavaScriptEnabled") |
200 | 176 | private void initNote() { | 175 | private void initNote() { |
201 | 177 | Intent intent = getIntent(); | 176 | Intent intent = getIntent(); |
203 | 178 | mNoteAttachmentGrid = (GridView) findViewById(R.id.noteAttachmentGrid); | 177 | mNoteAttachmentGrid = (ExpandableHeightGridView) findViewById(R.id.noteAttachmentGrid); |
204 | 178 | mNoteAttachmentGrid.setExpanded(true); | ||
205 | 179 | edtNoteTitle = (EditText) findViewById(R.id.edtNoteTitleInput); | 179 | edtNoteTitle = (EditText) findViewById(R.id.edtNoteTitleInput); |
206 | 180 | edtNoteDescription = (EditText) findViewById(R.id.edtNoteComposeDescription); | 180 | edtNoteDescription = (EditText) findViewById(R.id.edtNoteComposeDescription); |
207 | 181 | mWebViewPad = (WebView) findViewById(R.id.webNoteComposeWebViewPad); | 181 | mWebViewPad = (WebView) findViewById(R.id.webNoteComposeWebViewPad); |
208 | @@ -200,6 +200,7 @@ | |||
209 | 200 | .get("key_" + mStageId)); | 200 | .get("key_" + mStageId)); |
210 | 201 | if (intent.hasExtra("note_title")) { | 201 | if (intent.hasExtra("note_title")) { |
211 | 202 | edtNoteTitle.setText(intent.getStringExtra("note_title")); | 202 | edtNoteTitle.setText(intent.getStringExtra("note_title")); |
212 | 203 | oldName = intent.getStringExtra("note_title"); | ||
213 | 203 | } | 204 | } |
214 | 204 | 205 | ||
215 | 205 | if (mPadInstalled) { | 206 | if (mPadInstalled) { |
216 | @@ -230,6 +231,7 @@ | |||
217 | 230 | } | 231 | } |
218 | 231 | if (mEditMode) { | 232 | if (mEditMode) { |
219 | 232 | edtNoteTitle.setText(mNoteRow.getString("name")); | 233 | edtNoteTitle.setText(mNoteRow.getString("name")); |
220 | 234 | oldName = mNoteRow.getString("name"); | ||
221 | 233 | List<OEDataRow> tags = mNoteRow.getM2MRecord("tag_ids") | 235 | List<OEDataRow> tags = mNoteRow.getM2MRecord("tag_ids") |
222 | 234 | .browseEach(); | 236 | .browseEach(); |
223 | 235 | if (tags != null) { | 237 | if (tags != null) { |
224 | @@ -515,7 +517,9 @@ | |||
225 | 515 | } | 517 | } |
226 | 516 | 518 | ||
227 | 517 | public void saveNote(Integer mNoteId) { | 519 | public void saveNote(Integer mNoteId) { |
229 | 518 | if (mOpenERP != null) { | 520 | if (mOpenERP == null) { |
230 | 521 | Toast.makeText(mContext, "No Connection", Toast.LENGTH_LONG).show(); | ||
231 | 522 | } else { | ||
232 | 519 | OEValues values = new OEValues(); | 523 | OEValues values = new OEValues(); |
233 | 520 | String name = edtNoteTitle.getText().toString(); | 524 | String name = edtNoteTitle.getText().toString(); |
234 | 521 | String memo = ""; | 525 | String memo = ""; |
235 | @@ -536,7 +540,9 @@ | |||
236 | 536 | } catch (Exception e) { | 540 | } catch (Exception e) { |
237 | 537 | } | 541 | } |
238 | 538 | } else { | 542 | } else { |
240 | 539 | memo = name + "<br/>" + edtNoteDescription.getText().toString(); | 543 | memo = edtNoteDescription.getText().toString(); |
241 | 544 | if (oldName != name) | ||
242 | 545 | memo = name + "<br/>" + memo.replace(oldName, ""); | ||
243 | 540 | } | 546 | } |
244 | 541 | name = noteName(name + "\n" + memo); | 547 | name = noteName(name + "\n" + memo); |
245 | 542 | List<Integer> tag_ids = new ArrayList<Integer>(); | 548 | List<Integer> tag_ids = new ArrayList<Integer>(); |
246 | @@ -569,10 +575,8 @@ | |||
247 | 569 | data.putExtra("result", id); | 575 | data.putExtra("result", id); |
248 | 570 | data.putExtra("is_new", is_new); | 576 | data.putExtra("is_new", is_new); |
249 | 571 | setResult(RESULT_OK, data); | 577 | setResult(RESULT_OK, data); |
250 | 572 | finish(); | ||
251 | 573 | } else { | ||
252 | 574 | Toast.makeText(mContext, "No Connection", Toast.LENGTH_LONG).show(); | ||
253 | 575 | } | 578 | } |
254 | 579 | finish(); | ||
255 | 576 | } | 580 | } |
256 | 577 | 581 | ||
257 | 578 | private String noteName(String memo) { | 582 | private String noteName(String memo) { |
258 | @@ -637,7 +641,6 @@ | |||
259 | 637 | 641 | ||
260 | 638 | builder.setPositiveButton("Create", new OnClickListener() { | 642 | builder.setPositiveButton("Create", new OnClickListener() { |
261 | 639 | public void onClick(DialogInterface di, int i) { | 643 | public void onClick(DialogInterface di, int i) { |
262 | 640 | // do something with onClick | ||
263 | 641 | String mToast = "No Connection "; | 644 | String mToast = "No Connection "; |
264 | 642 | if ((stage.getText().toString()).equalsIgnoreCase("Add New") | 645 | if ((stage.getText().toString()).equalsIgnoreCase("Add New") |
265 | 643 | || (stage.getText().toString()) | 646 | || (stage.getText().toString()) |
266 | 644 | 647 | ||
267 | === modified file 'src/com/openerp/addons/note/NoteDB.java' | |||
268 | --- src/com/openerp/addons/note/NoteDB.java 2014-04-09 12:50:36 +0000 | |||
269 | +++ src/com/openerp/addons/note/NoteDB.java 2014-04-28 07:01:36 +0000 | |||
270 | @@ -82,8 +82,10 @@ | |||
271 | 82 | public List<OEColumn> getModelColumns() { | 82 | public List<OEColumn> getModelColumns() { |
272 | 83 | List<OEColumn> cols = new ArrayList<OEColumn>(); | 83 | List<OEColumn> cols = new ArrayList<OEColumn>(); |
273 | 84 | cols.add(new OEColumn("name", "Name", OEFields.text())); | 84 | cols.add(new OEColumn("name", "Name", OEFields.text())); |
274 | 85 | cols.add(new OEColumn("sequence", "Sequence", OEFields.integer())); | ||
275 | 85 | cols.add(new OEColumn("stage_color", "Stage Color", OEFields | 86 | cols.add(new OEColumn("stage_color", "Stage Color", OEFields |
276 | 86 | .varchar(10), false)); | 87 | .varchar(10), false)); |
277 | 88 | |||
278 | 87 | return cols; | 89 | return cols; |
279 | 88 | } | 90 | } |
280 | 89 | 91 | ||
281 | 90 | 92 | ||
282 | === modified file 'src/com/openerp/addons/note/NoteDetail.java' | |||
283 | --- src/com/openerp/addons/note/NoteDetail.java 2014-04-15 11:59:20 +0000 | |||
284 | +++ src/com/openerp/addons/note/NoteDetail.java 2014-04-28 07:01:36 +0000 | |||
285 | @@ -38,7 +38,6 @@ | |||
286 | 38 | import android.view.View; | 38 | import android.view.View; |
287 | 39 | import android.view.View.OnClickListener; | 39 | import android.view.View.OnClickListener; |
288 | 40 | import android.view.ViewGroup; | 40 | import android.view.ViewGroup; |
289 | 41 | import android.widget.GridView; | ||
290 | 42 | import android.widget.ImageView; | 41 | import android.widget.ImageView; |
291 | 43 | import android.widget.TextView; | 42 | import android.widget.TextView; |
292 | 44 | import android.widget.Toast; | 43 | import android.widget.Toast; |
293 | @@ -55,6 +54,7 @@ | |||
294 | 55 | import com.openerp.support.listview.OEListAdapter; | 54 | import com.openerp.support.listview.OEListAdapter; |
295 | 56 | import com.openerp.util.HTMLHelper; | 55 | import com.openerp.util.HTMLHelper; |
296 | 57 | import com.openerp.util.TextViewTags; | 56 | import com.openerp.util.TextViewTags; |
297 | 57 | import com.openerp.util.controls.ExpandableHeightGridView; | ||
298 | 58 | import com.openerp.util.drawer.DrawerItem; | 58 | import com.openerp.util.drawer.DrawerItem; |
299 | 59 | 59 | ||
300 | 60 | public class NoteDetail extends BaseFragment { | 60 | public class NoteDetail extends BaseFragment { |
301 | @@ -69,7 +69,7 @@ | |||
302 | 69 | String mPadURL = ""; | 69 | String mPadURL = ""; |
303 | 70 | String mNoteMemo = ""; | 70 | String mNoteMemo = ""; |
304 | 71 | String mMessageBody = ""; | 71 | String mMessageBody = ""; |
306 | 72 | GridView mNoteGridViewAttach = null; | 72 | ExpandableHeightGridView mNoteGridViewAttach = null; |
307 | 73 | List<Object> mNotesListAttach = new ArrayList<Object>(); | 73 | List<Object> mNotesListAttach = new ArrayList<Object>(); |
308 | 74 | OEListAdapter mNoteListAdapterAttach = null; | 74 | OEListAdapter mNoteListAdapterAttach = null; |
309 | 75 | Ir_AttachmentDBHelper mAttachmentDB = null; | 75 | Ir_AttachmentDBHelper mAttachmentDB = null; |
310 | @@ -103,8 +103,9 @@ | |||
311 | 103 | private void showNoteDetails(int note_id) { | 103 | private void showNoteDetails(int note_id) { |
312 | 104 | mNoteDetailTitle = (TextView) mView | 104 | mNoteDetailTitle = (TextView) mView |
313 | 105 | .findViewById(R.id.txvNoteDetailTitle); | 105 | .findViewById(R.id.txvNoteDetailTitle); |
315 | 106 | mNoteGridViewAttach = (GridView) mView | 106 | mNoteGridViewAttach = (ExpandableHeightGridView) mView |
316 | 107 | .findViewById(R.id.noteGridViewAttach); | 107 | .findViewById(R.id.noteGridViewAttach); |
317 | 108 | mNoteGridViewAttach.setExpanded(true); | ||
318 | 108 | mNoteDetailMemo = (TextView) mView.findViewById(R.id.txvNoteDetailMemo); | 109 | mNoteDetailMemo = (TextView) mView.findViewById(R.id.txvNoteDetailMemo); |
319 | 109 | mNoteTags = (TextView) mView.findViewById(R.id.edtNoteTagsView); | 110 | mNoteTags = (TextView) mView.findViewById(R.id.edtNoteTagsView); |
320 | 110 | 111 | ||
321 | @@ -251,7 +252,7 @@ | |||
322 | 251 | NoteComposeActivity.class); | 252 | NoteComposeActivity.class); |
323 | 252 | Bundle noteArgs = new Bundle(); | 253 | Bundle noteArgs = new Bundle(); |
324 | 253 | noteArgs.putInt("note_id", mArgument.getInt("note_id")); | 254 | noteArgs.putInt("note_id", mArgument.getInt("note_id")); |
326 | 254 | noteArgs.putString("Attachment", "New"); | 255 | // noteArgs.putString("Attachment", "New"); |
327 | 255 | manageNote.putExtras(noteArgs); | 256 | manageNote.putExtras(noteArgs); |
328 | 256 | startActivity(manageNote); | 257 | startActivity(manageNote); |
329 | 257 | return true; | 258 | return true; |