r1273 - branches/dev/menu/ui

r1273 - branches/dev/menu/ui


Author: paul.bakaus
Date: Mon Dec 29 07:39:04 2008
New Revision: 1273
Modified:
branches/dev/menu/ui/ui.menu.js
Log:
menu: fixed add/remove/replace syntax, now uses jQuery selectors and a
third argument to define the insertion type ('before/after/append') [fixed
ajax, replace]
Modified: branches/dev/menu/ui/ui.menu.js
==============================================================================
--- branches/dev/menu/ui/ui.menu.js    (original)
+++ branches/dev/menu/ui/ui.menu.js    Mon Dec 29 07:39:04 2008
@@ -130,7 +130,7 @@
                subList.data('menu-ajax').apply(this.element, [function(markup) {
                    subList.empty();
-                    self.add(markup, item);
+                    self.add(markup, item, 'append');
                    item.find('a >
span').removeClass('ui-loading-right-default').addClass('ui-arrow-right-default');
                    //If we want to cache it, remove the ajax binding when it's called
once
@@ -430,7 +430,7 @@
        var old = $(position, this.items);
        if(old.length) return;
        
-        this.add(item, position);
+        this.add(item, position, 'before');
        old.remove();
    },