Index: sites/all/modules/nodeadmin/nodeadmin.module
===================================================================
RCS file: /cvs/repos/WP-SKM-DEV/sites/all/modules/nodeadmin/nodeadmin.module,v
retrieving revision 1.2
diff -u -r1.2 nodeadmin.module
--- sites/all/modules/nodeadmin/nodeadmin.module	28 Jun 2010 00:35:22 -0000	1.2
+++ sites/all/modules/nodeadmin/nodeadmin.module	28 Jun 2010 01:20:15 -0000
@@ -44,7 +44,7 @@
 
 /**
  * Implementation of hook_form_alter().
- * 
+ *
  * Add node title to the node delete confirmation form
  * for improved clarity.
  */
@@ -84,12 +84,12 @@
   if (module_exists('search')) {
     $output .= '<div>Filter by text content: <input id="filterText" type="text" size="20" value="" /></div>';
   }
-  $output .= '<div>Results per page: <input id="optionLimit" type="text" size="6" value="50" /><span id="numberResults">&nbsp;</span><div id="pageResults"></div></div>';
-  $output .= '</div><br/><div class="nodeadmin-addnode"><img src="'. $base_url .'/'. drupal_get_path('module', 'nodeadmin') .'/icons/doc-option-add.png" width="16" height="16" /> Add new content by type: <select id="addType"><option value="" selected></option>';
-  foreach ($ctypes as $ctype => $cdata) {
-    $output .= '<option value="' . $ctype .'">'. $cdata->name .'</option>';
-  }
-  $output .= '</select></div>';
+  $output .= '<div>Results per page: <input id="optionLimit" type="text" size="6" value="50" /><span id="numberResults">&nbsp;</span><div id="pageResults"></div></div></div>';
+//  $output .= '<br/><div class="nodeadmin-addnode"><img src="'. $base_url .'/'. drupal_get_path('module', 'nodeadmin') .'/icons/doc-option-add.png" width="16" height="16" /> Add new content by type: <select id="addType"><option value="" selected></option>';
+//  foreach ($ctypes as $ctype => $cdata) {
+//    $output .= '<option value="' . $ctype .'">'. $cdata->name .'</option>';
+//  }
+//  $output .= '</select></div>';
 
   $results = array();
   nodeadmin_ajax_query($results);
@@ -100,9 +100,12 @@
   if (is_array($node_data) && count($node_data)) {
     foreach ($node_data as $nid => $node) {
       $links = '';
-      $links .= "<a href='javascript:viewNode({$node->nid})' title='". t('View') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-tab.png' alt='". t('View') ."' width='16' height='16' /></a>";
-      $links .= " <a href='javascript:editNode({$node->nid})' title='". t('Edit') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-edit.png' alt='". t('Edit') ."' width='16' height='16' /></a>";
-      $links .= " <a href='javascript:deleteNode({$node->nid})' title='". t('Delete') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-remove.png' alt='". t('Delete') ."' width='16' height='16' /></a>";
+//      $links .= "<a href='javascript:viewNode({$node->nid})' title='". t('View') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-tab.png' alt='". t('View') ."' width='16' height='16' /></a>";
+//      $links .= " <a href='javascript:editNode({$node->nid})' title='". t('Edit') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-edit.png' alt='". t('Edit') ."' width='16' height='16' /></a>";
+//      $links .= " <a href='javascript:deleteNode({$node->nid})' title='". t('Delete') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-remove.png' alt='". t('Delete') ."' width='16' height='16' /></a>";
+        $links .= "<a href='/{$node->path}' title='". t('View') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-tab.png' alt='". t('View') ."' width='16' height='16' /></a>";
+        $links .= " <a href='/node/{$node->nid}/edit' title='". t('Edit') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-edit.png' alt='". t('Edit') ."' width='16' height='16' /></a>";
+        $links .= " <a href='/node/{$node->nid}/delete' title='". t('Delete') ."'><img src='". $base_url .'/'. drupal_get_path('module', 'nodeadmin') ."/icons/doc-option-remove.png' alt='". t('Delete') ."' width='16' height='16' /></a>";
       $row = array(
         array(
           'data' => $links,
@@ -157,7 +160,7 @@
   if (is_array($options)) {
     $op = strtolower($options['ajax']);
     $results = array('op' => $op);
-    
+
     if ($op == 'query') {
       nodeadmin_ajax_query($results, $options);
     }
@@ -171,7 +174,7 @@
       $results['status'] = 'error';
       $results['message'] = 'Invalid operation';
     }
-    
+
     echo(json_encode($results));
     exit(0);
   }
@@ -291,6 +294,7 @@
       // if text search results exist, intersect with query results
       if (!is_array($text_results) || in_array($obj->nid, $text_results)) {
         $results['nodeData'][$obj->nid] = $obj;
+        $results['nodeData'][$obj->nid]->path = drupal_get_path_alias('node/'.$obj->nid);
       }
     }
     if (is_array($text_results)) {
@@ -329,7 +333,7 @@
     $results['form'] = $formtype;
     if (is_numeric($options['token']) && $options['token'] >= 0) {
       $results['token'] = $options['token'];
-    } 
+    }
     if ($formtype == 'add' && !empty($options['nodetype']) && node_access('create', $options['nodetype'])) {
       $results['nodetype'] = $options['nodetype'];
       module_load_include('inc', 'node', 'node.pages');
@@ -382,7 +386,7 @@
 }
 
 /**
- * Returns an array structure of the JavaScript files 
+ * Returns an array structure of the JavaScript files
  * and inline code included by all current processing.
  */
 function nodeadmin_get_js() {
Index: sites/all/modules/nodeadmin/nodeadmin.js
===================================================================
RCS file: /cvs/repos/WP-SKM-DEV/sites/all/modules/nodeadmin/nodeadmin.js,v
retrieving revision 1.2
diff -u -r1.2 nodeadmin.js
--- sites/all/modules/nodeadmin/nodeadmin.js	28 Jun 2010 00:35:22 -0000	1.2
+++ sites/all/modules/nodeadmin/nodeadmin.js	28 Jun 2010 01:20:15 -0000
@@ -61,7 +61,8 @@
       dateChanged = new Date(nodeData[nid].changed * 1000);
       dateString = dateChanged.getFullYear() + '/' + padNumber(dateChanged.getMonth(), 2) + '/' + padNumber(dateChanged.getDate(), 2) + ' - ' + padNumber(dateChanged.getHours(), 2) + ':' + padNumber(dateChanged.getMinutes(), 2);
       isOpen = nodeState.view && nodeState.view[nid];
-      tableBody.append('<tr class="row ' + rowClass + '"><td class="node-actions">' + formatNodeButtons(nid, isOpen) + '</td><td id="node-' + nid + '">' + nodeData[nid].title + '</td><td class="node-field">' + typeData[nodeData[nid].type] + '</td><td class="node-field">' + nodeData[nid].name + '</td><td class="node-field">' + dateString + '</td></tr>');
+//    tableBody.append('<tr class="row ' + rowClass + '"><td class="node-actions">' + formatNodeButtons(nid, isOpen) + '</td><td id="node-' + nid + '">' + nodeData[nid].title + '</td><td class="node-field">' + typeData[nodeData[nid].type] + '</td><td class="node-field">' + nodeData[nid].name + '</td><td class="node-field">' + dateString + '</td></tr>');
+      tableBody.append('<tr class="row ' + rowClass + '"><td class="node-actions">' + formatNodeButtons(nid, isOpen) + '</td><td id="node-' + nid + '">' + nodeData[nid].title + '</td><td class="node-field">' + typeData[nodeData[nid].type] + '</td><td class="node-field">' + nodeData[nid].name + '</td><td class="node-field">' + nodeData[nid].formattedDate + '</td></tr>');
       if (isOpen) {
         tableBody.append('<tr class="' + rowClass + '"><td class="node-actions"></td><td colspan="4">' + nodeState.view[nid] + '</td></tr>');
       }
@@ -372,12 +373,19 @@
 }
 
 function formatNodeButtons(nid, opened) {
-  str = "<a href='javascript:viewNode(" + nid + ")' title='View'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-tab.png' alt='View' width='16' height='16' /></a>" +
-    " <a href='javascript:editNode(" + nid + ")' title='Edit'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-edit.png' alt='Edit' width='16' height='16' /></a>" +
+//  str = "<a href='javascript:viewNode(" + nid + ")' title='View'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-tab.png' alt='View' width='16' height='16' /></a>" +
+//    " <a href='javascript:editNode(" + nid + ")' title='Edit'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-edit.png' alt='Edit' width='16' height='16' /></a>" +
+//    " <a href='javascript:deleteNode(" + nid + ")' title='Delete'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-remove.png' alt='Delete' width='16' height='16' /></a>";
+//  if (opened) {
+//    str += " <a href='javascript:hideNode(" + nid + ")' title='Close'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/arrow-end-up.png' alt='Close' width='10' height='10' /></a>";
+//  }
+//	str = "<a href='/node/"+nid+"' title='View'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-tab.png' alt='View' width='16' height='16' /></a>" +
+	str = "<a href='javascript:viewNode(" + nid + ")' title='View'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-tab.png' alt='View' width='16' height='16' /></a>" +
+	" <a href='/node/"+nid+"/edit?destination=/admin/content/nodeadmin' title='Edit'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-edit.png' alt='Edit' width='16' height='16' /></a>" +
     " <a href='javascript:deleteNode(" + nid + ")' title='Delete'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/doc-option-remove.png' alt='Delete' width='16' height='16' /></a>";
-  if (opened) {
-    str += " <a href='javascript:hideNode(" + nid + ")' title='Close'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/arrow-end-up.png' alt='Close' width='10' height='10' /></a>";
-  }
+	if (opened) {
+	  str += " <a href='javascript:hideNode(" + nid + ")' title='Close'><img src='" + Drupal.settings.nodeadmin.modulePath + "/icons/arrow-end-up.png' alt='Close' width='10' height='10' /></a>";
+	}
   return str;
 }
 
