}
Roo.log('button on click ');
- if(this.preventDefault){
+ if(this.href === '' || this.preventDefault){
e.preventDefault();
}
* @class Roo.bootstrap.menu.Menu
* @extends Roo.bootstrap.Component
* @licence LGPL
- * @children Roo.bootstrap.menu.Item
+ * @children Roo.bootstrap.menu.Item Roo.bootstrap.menu.Separator
* @parent none
* Bootstrap Menu class - container for MenuItems - normally has to be added to a object that supports the menu property
*
* @cfg {bool} hidden if the menu should be hidden when rendered.
* @cfg {bool} stopEvent (true|false) Stop event after trigger press (default true)
* @cfg {bool} isLink (true|false) the menu has link disable auto expand and collaspe (default false)
- * @cfg {bool} hideTrigger (true|false) default false - hide the carret for trigger.
- * @cfg {String} align default tl-bl? == below - how the menu should be aligned.
+* @cfg {bool} hideTrigger (true|false) default false - hide the carret for trigger.
+* @cfg {String} align default tl-bl? == below - how the menu should be aligned.
* @constructor
* Create a new Menu
},
onClick : function(e)
{
- Roo.log('item on click ');
+ //Roo.log('item on click ');
- if(this.preventDefault){
+ if(this.href === false || this.preventDefault){
e.preventDefault();
}
//this.parent().hideMenuItems();
}
if(
- this.preventDefault ||
- this.href == '#'
+ this.preventDefault ||
+ this.href === false ||
+ this.href === '#'
){
Roo.log("NavItem - prevent Default?");
e.preventDefault();
try {
result = o.reader.read(response);
}catch(e){
+ o.success = false;
+ o.raw = { errorMsg : response.responseText };
this.fireEvent("loadexception", this, o, response, e);
- o.request.callback.call(o.request.scope, {
- success : false,
- raw : {
- errorMsg : response.responseText
- }
-
- }, o.request.arg, false);
+ o.request.callback.call(o.request.scope, o, o.request.arg, false);
return;
}
},
// private
- onLoadError : function(){
+ onLoadError : function(proxy, o){
this.loading.enable();
+ if (this.ds.events.loadexception.listeners.length < 2) {
+ // nothing has been assigned to loadexception except this...
+ // so
+ Roo.MessageBox.alert("Error loading",o.raw.errorMsg);
+
+ }
},
// private