var cfg = Roo.apply({}, this.getAutoCreate());
+
cfg.id = this.id || Roo.id();
// fill in the extra attributes
if (settings[size] === false) {
return;
}
- Roo.log(settings[size]);
+
if (!settings[size]) { // 0 = hidden
cfg.cls += ' hidden-' + size;
return;
this.triggerEl.addClass('dropdown-toggle');
-
-
-
if (Roo.isTouch) {
this.el.on('touchstart' , this.onTouch, this);
}
this.el.on("mouseover", this.onMouseOver, this);
this.el.on("mouseout", this.onMouseOut, this);
-
},
- findTargetItem : function(e){
+
+ findTargetItem : function(e)
+ {
var t = e.getTarget(".dropdown-menu-item", this.el, true);
if(!t){
return false;
return false;
},
- onTouch : function(e) {
- e.stopEvent();
+ onTouch : function(e)
+ {
+ //e.stopEvent(); this make the user popdown broken
this.onClick(e);
},
- onClick : function(e){
+ onClick : function(e)
+ {
Roo.log("menu.onClick");
var t = this.findTargetItem(e);
if(!t || t.isContainer){
//var type = this.el.dom.type;
-
-
if(this.tabIndex !== undefined){
this.el.dom.setAttribute('tabIndex', this.tabIndex);
}
this.el.setStyle('display', 'block');
- if(this.animate){
+ if(this.animate){ // element has 'fade' - so stuff happens after .3s ?- not sure why the delay?
var _this = this;
(function(){
- _this.el.addClass('in');
-
- }).defer(50);
+ this.el.addClass('in');
+ }).defer(50, this);
}else{
this.el.addClass('in');
this.el.setStyle('zIndex', '10001');
this.fireEvent('show', this);
- this.el.setStyle.defer(500, this.el, ['position', 'fixed'] ); // try and fix top jump?
+
},
this.maskEl.hide();
Roo.get(document.body).removeClass("x-body-masked");
this.el.removeClass('in');
+ this.el.select('.modal-dialog', true).first().setStyle('transform','');
- if(this.animate){
+ if(this.animate){ // why
var _this = this;
(function(){ _this.el.setStyle('display', 'none'); }).defer(150);
}else{
/**
* Returns true if the cell is editable.
* @param {Number} colIndex The column index
- * @param {Number} rowIndex The row index
+ * @param {Number} rowIndex The row index - this is nto actually used..?
* @return {Boolean}
*/
isCellEditable : function(colIndex, rowIndex){
}
if (!config[size]) { // 0 = hidden
- cfg.cls += ' hidden-' + size;
+ c.cls += ' hidden-' + size;
return;
}
- cfg.cls += ' col-' + size + '-' + config[size];
+ c.cls += ' col-' + size + '-' + config[size];
});
onLoad : function()
{
- Roo.log('ds onload');
+// Roo.log('ds onload');
this.clear();
var _this = this;
// closure these in so they are only created once.
var alpha = /^[a-zA-Z_]+$/;
var alphanum = /^[a-zA-Z0-9_]+$/;
- var email = /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/;
+ var email = /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,24}$/;
var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
// All these messages and functions are configurable
}
if (this.before && typeof(this.before) == 'object') {
this.before = Roo.factory(this.before);
- Roo.log(this.before);
+
inputblock.cn.push({
tag :'span',
cls : 'roo-input-before input-group-' +
}
if (this.after && typeof(this.after) == 'object') {
this.after = Roo.factory(this.after);
- Roo.log(this.after);
+
inputblock.cn.push({
tag :'span',
cls : 'roo-input-after input-group-' +
};
if (align ==='left' && this.fieldLabel.length) {
- Roo.log("left and has label");
+
cfg.cn = [
{
];
} else if ( this.fieldLabel.length) {
- Roo.log(" label");
+
cfg.cn = [
{
} else {
- Roo.log(" no label && no align");
cfg.cn = [
inputblock
};
- Roo.log('input-parentType: ' + this.parentType);
if (this.parentType === 'Navbar' && this.parent().bar) {
cfg.cls += ' navbar-form';
- Roo.log(cfg);
}
return cfg;
}
if (align ==='left' && this.fieldLabel.length) {
- Roo.log("left and has label");
+// Roo.log("left and has label");
cfg.cn = [
{
];
} else if ( this.fieldLabel.length) {
- Roo.log(" label");
+// Roo.log(" label");
cfg.cn = [
{
} else {
- Roo.log(" no label && no align");
+// Roo.log(" no label && no align");
cfg.cn = [
inputblock
};
if(this.multiple){
- Roo.log('multiple');
-
box = {
tag: 'div',
cn: [
if (align ==='left' && this.fieldLabel.length) {
- Roo.log("left and has label");
+// Roo.log("left and has label");
cfg.cn = [
{
];
} else if ( this.fieldLabel.length) {
- Roo.log(" label");
+// Roo.log(" label");
cfg.cn = [
{
} else {
- Roo.log(" no label && no align");
+// Roo.log(" no label && no align");
cfg = combobox
cfg.cls += ' col-' + size + '-' + settings[size];
}
});
- Roo.log(cfg);
+
return cfg;
},
if (align ==='left' && this.fieldLabel.length) {
- Roo.log("left and has label");
+// Roo.log("left and has label");
cfg.cn = [
{
];
} else if ( this.fieldLabel.length) {
- Roo.log(" label");
+// Roo.log(" label");
cfg.cn = [
{
} else {
- Roo.log(" no label && no align");
+// Roo.log(" no label && no align");
cfg = combobox
this.el.dom.scrollTop = 0;
}, this);
+ this.originalValue = this.getValue();
+
this.inputEl().on("click", this.showTouchView, this);
+
this.touchViewFooterEl.select('.roo-touch-view-cancel', true).first().on('click', this.hideTouchView, this);
this.touchViewFooterEl.select('.roo-touch-view-ok', true).first().on('click', this.setTouchViewValue, this);
close.on('click', this.removeBtnClick, this, close);
}
}
+ /*
+ * fix the bug in Safari iOS8
+ */
+ this.inputEl().on("focus", function(e){
+ document.activeElement.blur();
+ }, this);
return;
showTouchView : function()
{
+ if(this.disabled){
+ return;
+ }
+
this.touchViewHeaderEl.hide();
if(this.fieldLabel.length){
{
tag: 'div',
cls: 'modal-dialog',
+ style : 'position:fixed', // we have to fix position....
cn: [
{
tag: 'div',
},
getAutoCreate : function(){
- Roo.log('make popover?');
+
var cfg = {
cls : 'popover roo-dynamic',
style: 'display:block',
}
//Roo.log("adding to ");
this.el = Roo.get(document.body).createChild(cfg, position);
- Roo.log(this.el);
+// Roo.log(this.el);
}
this.initEvents();
},
cfg.cls += ' tab-content';
- Roo.log('get auto create...............');
-
if (this.carousel) {
cfg.cls += ' carousel slide';
initEvents: function()
{
- Roo.log('-------- init events on tab group ---------');
-
-
-
- Roo.log(this);
-
if(Roo.isTouch && this.slideOnTouch){
this.el.on("touchstart", this.onTouchStart, this);
}
*/
showPanel : function (pan)
{
- if(this.transition){
+ if(this.transition || typeof(pan) == 'undefined'){
Roo.log("waiting for the transitionend");
return;
}
if (typeof(pan) == 'number') {
pan = this.tabs[pan];
}
+
if (typeof(pan) == 'string') {
pan = this.getPanelByName(pan);
}
+
+ var cur = this.getActivePanel();
+
+ if(!pan || !cur){
+ Roo.log('pan or acitve pan is undefined');
+ return false;
+ }
+
if (pan.tabId == this.getActivePanel().tabId) {
return true;
}
- var cur = this.getActivePanel();
if (false === cur.fireEvent('beforedeactivate')) {
return false;
initEvents: function()
{
- Roo.log('-------- init events on tab panel ---------');
-
var p = this.parent();
this.navId = this.navId || p.navId;
if (typeof(this.navId) != 'undefined') {
// not really needed.. but just in case.. parent should be a NavGroup.
var tg = Roo.bootstrap.TabGroup.get(this.navId);
- Roo.log(['register', tg, this]);
+
tg.register(this);
var i = tg.tabs.length - 1;
}
if (align ==='left' && this.fieldLabel.length) {
- Roo.log("left and has label");
+// Roo.log("left and has label");
cfg.cn = [
{
];
} else if ( this.fieldLabel.length) {
- Roo.log(" label");
+// Roo.log(" label");
cfg.cn = [
{
} else {
- Roo.log(" no label && no align");
+// Roo.log(" no label && no align");
cfg.cn = [ inputblock ] ;
// add the buttons to the navgroup
if(this.displayInfo){
- Roo.log(this.el.select('ul.navbar-nav',true).first());
this.el.select('ul.navbar-nav',true).first().createChild({cls:'x-paging-info'});
this.displayEl = this.el.select('.x-paging-info', true).first();
// var navel = this.navgroup.addItem( { tagtype : 'span', html : '', cls : 'x-paging-info', preventDefault : true } );