* C/W Mars -> C/W MARS per member librarian :)
authorkenstir <kenstir@gmail.com>
Tue, 6 Oct 2015 01:42:25 +0000 (21:42 -0400)
committerkenstir <kenstir@gmail.com>
Tue, 6 Oct 2015 01:42:25 +0000 (21:42 -0400)
* use image from /jacket/small/r/$image rather than /jacket/small/$isbn, as the web client does.  There are a lot more images available that way.
* removed unused menu on "checked out" view
* fixed indenting on some lousy code

Open-ILS/src/Android/core/res/menu/checkout_menu.xml [deleted file]
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/checkout/ItemsCheckOutListView.java
Open-ILS/src/Android/core/src/org/evergreen_ils/globals/Utils.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/CopyInformation.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.java
Open-ILS/src/Android/core/src/org/evergreen_ils/utils/ui/BasicDetailsFragment.java
Open-ILS/src/Android/cwmars_app/AndroidManifest.xml

diff --git a/Open-ILS/src/Android/core/res/menu/checkout_menu.xml b/Open-ILS/src/Android/core/res/menu/checkout_menu.xml
deleted file mode 100644 (file)
index cbf72fa..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-       <item android:id="@+id/menu_refresh"
-        android:title="refresh"
-        android:icon="@drawable/ic_action_refresh"
-        android:orderInCategory="1"
-        android:showAsAction="always" />
-    <item android:id="@+id/menu_search"
-        android:title="search"
-        android:icon="@drawable/ic_launcher"
-        android:orderInCategory="0"
-        android:showAsAction="always" />
-</menu>
-
index 90a48b4..8c579f7 100644 (file)
@@ -158,20 +158,6 @@ public class ItemsCheckOutListView extends ActionBarActivity {
             progressDialog.dismiss();
     }
 
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        MenuInflater menuInflater = getMenuInflater();
-        menuInflater.inflate(R.menu.checkout_menu, menu);
-        return super.onCreateOptionsMenu(menu);
-
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-
-        return super.onOptionsItemSelected(item);
-    }
-
     class CheckOutArrayAdapter extends ArrayAdapter<CircRecord> {
         private static final String tag = "CheckoutArrayAdapter";
 
index ebdc57f..b9435c8 100644 (file)
@@ -84,8 +84,7 @@ public class Utils {
             }
             in.close();
         } catch (Exception e) {
-            System.err
-                    .println("Error in retrieving response " + e.getMessage());
+            System.err.println("Error in retrieving response " + e.getMessage());
         }
 
         result = str.toString();
@@ -112,8 +111,7 @@ public class Utils {
 
             return in;
         } catch (Exception e) {
-            System.err
-                    .println("Error in retrieving response " + e.getMessage());
+            System.err.println("Error in retrieving response " + e.getMessage());
         }
 
         return in;
@@ -129,8 +127,8 @@ public class Utils {
     public static void bookCoverImage(ImageView picture, String imageID,
             int size) {
 
-        String urlS = (GlobalConfigs.httpAddress
-                + "/opac/extras/ac/jacket/small/" + imageID);
+        String urlS = (GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/small/" + imageID);
+        Log.d(TAG, "cover image: " + urlS);
 
         Bitmap bmp = null; // create a new Bitmap variable called bmp, and
                            // initialize it to null
index f548ff2..323832a 100644 (file)
@@ -72,9 +72,9 @@ public class CopyInformation implements Serializable {
             if (hashValCopy.containsKey(entry.getKey())) {
                 statusInformation.put(entry.getValue(),
                         hashValCopy.get(entry.getKey()) + "");
-                Log.d(TAG, "Added " + entry.getKey() + " "
-                        + entry.getValue() + " "
-                        + hashValCopy.get(entry.getKey()));
+//                Log.d(TAG, "Added " + entry.getKey() + " "
+//                        + entry.getValue() + " "
+//                        + hashValCopy.get(entry.getKey()));
             }
         }
     }
index dd4c757..4ebddb6 100644 (file)
@@ -673,46 +673,39 @@ public class SearchCatalogListView extends ActionBarActivity {
             // Get item
             RecordInfo record = getItem(position);
 
-                // if it is the right type of view
-                if (row == null
-                        || row.findViewById(R.id.search_record_title) == null) {
-
-                    Log.d(tag, "Starting XML Row Inflation ... ");
-                    LayoutInflater inflater = (LayoutInflater) this
-                            .getContext().getSystemService(
-                                    Context.LAYOUT_INFLATER_SERVICE);
-                    row = inflater.inflate(R.layout.search_result_item, parent,
-                            false);
-                    Log.d(tag, "Successfully completed XML Row Inflation!");
+            // if it is the right type of view
+            if (row == null
+                || row.findViewById(R.id.search_record_title) == null) {
+
+                Log.d(tag, "Starting XML Row Inflation ... ");
+                LayoutInflater inflater = (LayoutInflater) this
+                        .getContext().getSystemService(
+                                Context.LAYOUT_INFLATER_SERVICE);
+                row = inflater.inflate(R.layout.search_result_item, parent,
+                        false);
+                Log.d(tag, "Successfully completed XML Row Inflation!");
 
-                }
+            }
+
+            // Get reference to ImageView
+            recordImage = (ImageView) row.findViewById(R.id.search_record_img);
+            //String imageHref = GlobalConfigs.httpAddress  + "/opac/extras/ac/jacket/small/" + record.isbn;
+            String imageHref = GlobalConfigs.httpAddress  + "/opac/extras/ac/jacket/small/r/" + record.image;
+            Log.d(TAG, "image url " + imageHref);
+
+            // start async download of image
+            imageDownloader.download(imageHref, recordImage);
+
+            recordTitle = (TextView) row.findViewById(R.id.search_record_title);
+            recordAuthor = (TextView) row.findViewById(R.id.search_record_author);
+            recordPublisher = (TextView) row.findViewById(R.id.search_record_publishing);
+
+            // set text
+            recordTitle.setText(record.title);
+            recordAuthor.setText(record.author);
+            recordPublisher
+                    .setText(record.pubdate + " " + record.publisher);
 
-                Log.d(TAG, "reord image value " + recordImage);
-                // Get reference to ImageView
-                recordImage = (ImageView) row
-                        .findViewById(R.id.search_record_img);
-                String imageHref = GlobalConfigs.httpAddress
-                        + "/opac/extras/ac/jacket/small/" + record.isbn;
-                // start async download of image
-                imageDownloader.download(imageHref, recordImage);
-                // Get reference to TextView - title
-                recordTitle = (TextView) row
-                        .findViewById(R.id.search_record_title);
-
-                // Get reference to TextView - author
-                recordAuthor = (TextView) row
-                        .findViewById(R.id.search_record_author);
-
-                // Get referance to TextView - record Publisher date+publisher
-                recordPublisher = (TextView) row
-                        .findViewById(R.id.search_record_publishing);
-
-                // set text
-                recordTitle.setText(record.title);
-                recordAuthor.setText(record.author);
-                recordPublisher
-                        .setText(record.pubdate + " " + record.publisher);
-            
             return row;
         }
     }
index 11ed9f9..804d398 100644 (file)
@@ -183,8 +183,8 @@ public class BasicDetailsFragment extends Fragment {
             }
         });
 
-        String imageHref = GlobalConfigs.httpAddress
-                + "/opac/extras/ac/jacket/large/" + record.isbn;
+        //String imageHref = GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/large/" + record.isbn;
+        String imageHref = GlobalConfigs.httpAddress + "/opac/extras/ac/jacket/large/r/" + record.image;
 
         // start async download of image
         imageDownloader.download(imageHref, recordImage);
index 445017f..1d093bf 100644 (file)
@@ -2,8 +2,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="org.cwmars"
           android:installLocation="auto"
-          android:versionCode="3"
-          android:versionName="1.0">
+          android:versionCode="4"
+          android:versionName="1.1">
 
     <uses-sdk
         android:minSdkVersion="8"