If you look at the current code of ajax_view.js you will realize really fast, that it's hard to understand :)
One reason for this is that it's using a lot of nested anonymous functions.

Let's convert it to proper a proper js object, which is much nicer.

Comments

dawehner’s picture

Assigned: Unassigned » dawehner

Assign to myself.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new7.72 KB

Okay here is the initial version.

Pager works nice as expected
Exposed form works in general but for a certain reason the behavior get's attached twice, so you will see two throbbers.

dawehner’s picture

Status: Needs review » Needs work
+++ b/js/ajax_view.jsundefined
@@ -11,72 +11,98 @@
diff --git a/modules/node.views.inc b/modules/node.views.inc

diff --git a/modules/node.views.inc b/modules/node.views.inc
index 056c31c..39f61d8 100644

index 056c31c..39f61d8 100644
--- a/modules/node.views.inc

--- a/modules/node.views.inc
+++ b/modules/node.views.incundefined

+++ b/modules/node.views.incundefined
+++ b/modules/node.views.incundefined
@@ -380,7 +380,7 @@ function node_views_data() {

@@ -380,7 +380,7 @@ function node_views_data() {
   // uid field
   $data['node']['uid'] = array(
     'title' => t('Author uid'),
-    'help' => t('The user authoring the content. If you need more fields then the uid add the content: author relationship'),
+    'help' => t('If you need more fields then the uid add the content: author relationship'),
     'relationship' => array(
       'title' => t('Author'),
       'help' => t('Relate content to the user who created it.'),
@@ -390,7 +390,7 @@ function node_views_data() {

@@ -390,7 +390,7 @@ function node_views_data() {
       'label' => t('author'),
     ),
     'filter' => array(
-      'handler' => 'views_handler_filter_user_name',
+      'handler' => 'views_handler_filter_numeric',
     ),
     'argument' => array(
       'handler' => 'views_handler_argument_numeric',
diff --git a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc

diff --git a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
index c4864fa..dc5e331 100644

index c4864fa..dc5e331 100644
--- a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc

--- a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
+++ b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.incundefined

+++ b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.incundefined
+++ b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.incundefined
@@ -144,7 +144,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d

@@ -144,7 +144,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d
     // find the tid argument and return it.
     $views_page = views_get_page_view();
     if ($views_page && isset($views_page->argument['tid'])) {
-      return $views_page->argument['tid']->argument;
+      return $views_page->view->argument['tid']->argument;
     }
   }

aaaaaaaarg

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new6.1 KB
+++ b/js/ajax_view.jsundefined
@@ -11,72 +11,98 @@
+  this.attachExposedFormAjax();

This line caused the double-execution. The patch now works really nice.

dawehner’s picture

Status: Needs review » Fixed

Tested again: pager, exposed form, exposed form block, glossary view and it worked fine.

So commited to 7.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.