From: Alan Knowles Date: Thu, 14 Sep 2017 06:18:39 +0000 (+0800) Subject: sync X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=cfb2c9fb219dd0c7d450013a357228469dee2f32 sync --- diff --git a/Roo/bootstrap/CheckBox.js b/Roo/bootstrap/CheckBox.js index f6270b296b..66d9b5f24f 100644 --- a/Roo/bootstrap/CheckBox.js +++ b/Roo/bootstrap/CheckBox.js @@ -66,12 +66,20 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { tag: 'input', id : id, type : this.inputType, - value : this.inputType == 'radio' ? this.inputValue : ((!this.checked) ? this.valueOff : this.inputValue), + value : this.inputValue, cls : 'roo-' + this.inputType, //'form-box', placeholder : this.placeholder || '' }; + + var hidden = { + tag: 'input', + type : 'hidden', + cls : 'roo-hidden-value', + value : this.checked ? this.valueOff : this.inputValue + }; + if (this.weight) { // Validity check? cfg.cls += " " + this.inputType + "-" + this.weight; } @@ -82,10 +90,13 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { if(this.checked){ input.checked = this.checked; + } + if (this.name) { - input.name = this.name; + hidden.name = this.name; + input.name = '_hidden_' + this.name; } if (this.size) { @@ -100,7 +111,13 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { } }); - var inputblock = input; + var inputblock = { + tag: 'span', + cn : [ + input, + hidden + ] + }; if (this.before || this.after) { @@ -118,6 +135,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { } inputblock.cn.push(input); + inputblock.cn.push(hidden); if (this.after) { inputblock.cn.push({ @@ -201,6 +219,10 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { { return this.el.select('input.roo-' + this.inputType,true).first(); }, + hiddenEl: function () + { + return this.el.select('input.hidden-value',true).first(); + }, labelEl: function() { @@ -267,7 +289,8 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { this.inputEl().dom.checked = state; - this.inputEl().dom.value = state ? this.inputValue : this.valueOff; + + this.hiddenEl().dom.value = state ? this.inputValue : this.valueOff; if(suppressEvent !== true){ this.fireEvent('check', this, state); @@ -282,7 +305,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { return this.getGroupValue(); } - return this.inputEl().getValue(); + return this.hiddenEl() ? this.hiddenEl().dom.value : this.value; }, diff --git a/docs/symbols/Array.html b/docs/symbols/Array.html index 708d16c818..530bd4c533 100644 --- a/docs/symbols/Array.html +++ b/docs/symbols/Array.html @@ -385,7 +385,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Date.html b/docs/symbols/Date.html index a994da8167..3182e00f5a 100644 --- a/docs/symbols/Date.html +++ b/docs/symbols/Date.html @@ -1809,7 +1809,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Function.html b/docs/symbols/Function.html index 23ea966db4..8a92cb94c9 100644 --- a/docs/symbols/Function.html +++ b/docs/symbols/Function.html @@ -600,7 +600,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Number.html b/docs/symbols/Number.html index 0a9125c497..4ad50e5cd5 100644 --- a/docs/symbols/Number.html +++ b/docs/symbols/Number.html @@ -267,7 +267,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.Ajax.html b/docs/symbols/Roo.Ajax.html index 5469e89e5b..5fc4dffc1f 100644 --- a/docs/symbols/Roo.Ajax.html +++ b/docs/symbols/Roo.Ajax.html @@ -1479,7 +1479,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.BasicDialog.html b/docs/symbols/Roo.BasicDialog.html index 93505f2cff..32b9449994 100644 --- a/docs/symbols/Roo.BasicDialog.html +++ b/docs/symbols/Roo.BasicDialog.html @@ -3908,7 +3908,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.BasicLayoutRegion.html b/docs/symbols/Roo.BasicLayoutRegion.html index 4e69d35bc5..a58c13874f 100644 --- a/docs/symbols/Roo.BasicLayoutRegion.html +++ b/docs/symbols/Roo.BasicLayoutRegion.html @@ -2309,7 +2309,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.BorderLayout.html b/docs/symbols/Roo.BorderLayout.html index 0a7109e9ba..d991304942 100644 --- a/docs/symbols/Roo.BorderLayout.html +++ b/docs/symbols/Roo.BorderLayout.html @@ -2230,7 +2230,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.BoxComponent.html b/docs/symbols/Roo.BoxComponent.html index 8b8c3f71d0..8a9fb2f4ac 100644 --- a/docs/symbols/Roo.BoxComponent.html +++ b/docs/symbols/Roo.BoxComponent.html @@ -3257,7 +3257,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.Button.html b/docs/symbols/Roo.Button.html index 1d40f81540..62c1134dcd 100644 --- a/docs/symbols/Roo.Button.html +++ b/docs/symbols/Roo.Button.html @@ -2713,7 +2713,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.CalendarPanel.html b/docs/symbols/Roo.CalendarPanel.html index 1a96b74b31..86964cf4cc 100644 --- a/docs/symbols/Roo.CalendarPanel.html +++ b/docs/symbols/Roo.CalendarPanel.html @@ -2713,7 +2713,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.ColorPalette.html b/docs/symbols/Roo.ColorPalette.html index 8aa33375ba..1516858c5d 100644 --- a/docs/symbols/Roo.ColorPalette.html +++ b/docs/symbols/Roo.ColorPalette.html @@ -2575,7 +2575,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.Component.html b/docs/symbols/Roo.Component.html index 1166086093..5066d0ecae 100644 --- a/docs/symbols/Roo.Component.html +++ b/docs/symbols/Roo.Component.html @@ -2359,7 +2359,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.ComponentMgr.html b/docs/symbols/Roo.ComponentMgr.html index eee61be05d..e13efd01c7 100644 --- a/docs/symbols/Roo.ComponentMgr.html +++ b/docs/symbols/Roo.ComponentMgr.html @@ -446,7 +446,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.CompositeElement.html b/docs/symbols/Roo.CompositeElement.html index c7e290ea2f..772a457a88 100644 --- a/docs/symbols/Roo.CompositeElement.html +++ b/docs/symbols/Roo.CompositeElement.html @@ -1190,7 +1190,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.CompositeElementLite.html b/docs/symbols/Roo.CompositeElementLite.html index 7fe98266ee..5065f0c813 100644 --- a/docs/symbols/Roo.CompositeElementLite.html +++ b/docs/symbols/Roo.CompositeElementLite.html @@ -1196,7 +1196,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.ContentPanel.html b/docs/symbols/Roo.ContentPanel.html index 027b1bd621..2738631a1b 100644 --- a/docs/symbols/Roo.ContentPanel.html +++ b/docs/symbols/Roo.ContentPanel.html @@ -2520,7 +2520,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.DDView.html b/docs/symbols/Roo.DDView.html index d23908d2d7..7aa0cd53aa 100644 --- a/docs/symbols/Roo.DDView.html +++ b/docs/symbols/Roo.DDView.html @@ -1048,7 +1048,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.DatePicker.html b/docs/symbols/Roo.DatePicker.html index 1e8826dc08..b385f85293 100644 --- a/docs/symbols/Roo.DatePicker.html +++ b/docs/symbols/Roo.DatePicker.html @@ -3296,7 +3296,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.DialogManager.html b/docs/symbols/Roo.DialogManager.html index 65c6185ba0..bec4336a05 100644 --- a/docs/symbols/Roo.DialogManager.html +++ b/docs/symbols/Roo.DialogManager.html @@ -515,7 +515,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.DomHelper.html b/docs/symbols/Roo.DomHelper.html index f4c6ca8c42..40bbe48ffa 100644 --- a/docs/symbols/Roo.DomHelper.html +++ b/docs/symbols/Roo.DomHelper.html @@ -942,7 +942,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.DomQuery.html b/docs/symbols/Roo.DomQuery.html index 49186a091c..22273e16c4 100644 --- a/docs/symbols/Roo.DomQuery.html +++ b/docs/symbols/Roo.DomQuery.html @@ -770,7 +770,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.DomTemplate.html b/docs/symbols/Roo.DomTemplate.html index f949b3c77e..7fce530f4c 100644 --- a/docs/symbols/Roo.DomTemplate.html +++ b/docs/symbols/Roo.DomTemplate.html @@ -1155,7 +1155,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.Editor.html b/docs/symbols/Roo.Editor.html index 7f0b32d41f..59c25a5a46 100644 --- a/docs/symbols/Roo.Editor.html +++ b/docs/symbols/Roo.Editor.html @@ -3491,7 +3491,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.Element.html b/docs/symbols/Roo.Element.html index 7177d66410..4f3ca869f5 100644 --- a/docs/symbols/Roo.Element.html +++ b/docs/symbols/Roo.Element.html @@ -11154,7 +11154,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.EventManager.html b/docs/symbols/Roo.EventManager.html index f737002b3e..9638765d1e 100644 --- a/docs/symbols/Roo.EventManager.html +++ b/docs/symbols/Roo.EventManager.html @@ -923,7 +923,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.EventObject.html b/docs/symbols/Roo.EventObject.html index b441cb0b21..fd5cf94f38 100644 --- a/docs/symbols/Roo.EventObject.html +++ b/docs/symbols/Roo.EventObject.html @@ -1105,7 +1105,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.Fx.html b/docs/symbols/Roo.Fx.html index 5d844426e6..82ed506d00 100644 --- a/docs/symbols/Roo.Fx.html +++ b/docs/symbols/Roo.Fx.html @@ -1909,7 +1909,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.GridPanel.html b/docs/symbols/Roo.GridPanel.html index c4102d632a..119bd39075 100644 --- a/docs/symbols/Roo.GridPanel.html +++ b/docs/symbols/Roo.GridPanel.html @@ -2568,7 +2568,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.HtmlEditorCore.html b/docs/symbols/Roo.HtmlEditorCore.html index 2ea78637b2..8526d40cda 100644 --- a/docs/symbols/Roo.HtmlEditorCore.html +++ b/docs/symbols/Roo.HtmlEditorCore.html @@ -3612,7 +3612,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.JsonView.html b/docs/symbols/Roo.JsonView.html index aab6f061cd..fb99ed8ba7 100644 --- a/docs/symbols/Roo.JsonView.html +++ b/docs/symbols/Roo.JsonView.html @@ -3565,7 +3565,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.KeyMap.html b/docs/symbols/Roo.KeyMap.html index b48a05a8eb..589d92e366 100644 --- a/docs/symbols/Roo.KeyMap.html +++ b/docs/symbols/Roo.KeyMap.html @@ -560,7 +560,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.KeyNav.html b/docs/symbols/Roo.KeyNav.html index 6032ceaaa8..d542f84a8c 100644 --- a/docs/symbols/Roo.KeyNav.html +++ b/docs/symbols/Roo.KeyNav.html @@ -462,7 +462,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.Layer.html b/docs/symbols/Roo.Layer.html index 792681d222..4a0b9218a3 100644 --- a/docs/symbols/Roo.Layer.html +++ b/docs/symbols/Roo.Layer.html @@ -11319,7 +11319,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.LayoutDialog.html b/docs/symbols/Roo.LayoutDialog.html index 96cd75796e..fdd18e6195 100644 --- a/docs/symbols/Roo.LayoutDialog.html +++ b/docs/symbols/Roo.LayoutDialog.html @@ -4143,7 +4143,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.LayoutManager.html b/docs/symbols/Roo.LayoutManager.html index ea98609599..fa4e1b4bca 100644 --- a/docs/symbols/Roo.LayoutManager.html +++ b/docs/symbols/Roo.LayoutManager.html @@ -1504,7 +1504,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.LayoutRegion.html b/docs/symbols/Roo.LayoutRegion.html index fc881b9e2b..860047b300 100644 --- a/docs/symbols/Roo.LayoutRegion.html +++ b/docs/symbols/Roo.LayoutRegion.html @@ -3685,7 +3685,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.LoadMask.html b/docs/symbols/Roo.LoadMask.html index dce665aa89..7e039361a5 100644 --- a/docs/symbols/Roo.LoadMask.html +++ b/docs/symbols/Roo.LoadMask.html @@ -462,7 +462,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/Roo.html b/docs/symbols/Roo.html index f313e1a5bc..050a243ac8 100644 --- a/docs/symbols/Roo.html +++ b/docs/symbols/Roo.html @@ -3072,7 +3072,7 @@
- Documentation generated by Introspection Doc Generator on Tue Aug 08 2017 12:05:50 GMT+0800 (HKT) + Documentation generated by Introspection Doc Generator on Fri Sep 01 2017 13:17:16 GMT+0800 (HKT) Based on JsDoc Toolkit
diff --git a/docs/symbols/src/Roo_XComponent.js.html b/docs/symbols/src/Roo_XComponent.js.html index ef8f341805..983e930ed0 100644 --- a/docs/symbols/src/Roo_XComponent.js.html +++ b/docs/symbols/src/Roo_XComponent.js.html @@ -225,6 +225,7 @@ return; } } + Roo.debug && Roo.log("EL:"); Roo.debug && Roo.log(el); Roo.debug && Roo.log("this.parent.el:"); @@ -251,24 +252,45 @@ Roo.debug && Roo.log("no parent - creating one"); el = el ? Roo.get(el) : false; - - // it's a top level one.. - this.parent = { - el : new Roo.BorderLayout(el || document.body, { + if (typeof(Roo.BorderLayout) == 'undefined' ) { - center: { - titlebar: false, - autoScroll:false, - closeOnTab: true, - tabPosition: 'top', - //resizeTabs: true, - alwaysShowTabs: el && hp? false : true, - hideTabs: el || !hp ? true : false, - minTabWidth: 140 - } - }) - }; + this.parent = { + el : new Roo.bootstrap.layout.Border({ + el: el || document.body, + + center: { + titlebar: false, + autoScroll:false, + closeOnTab: true, + tabPosition: 'top', + //resizeTabs: true, + alwaysShowTabs: false, + hideTabs: true, + minTabWidth: 140, + overflow: 'visible' + } + }) + }; + } else { + + // it's a top level one.. + this.parent = { + el : new Roo.BorderLayout(el || document.body, { + + center: { + titlebar: false, + autoScroll:false, + closeOnTab: true, + tabPosition: 'top', + //resizeTabs: true, + alwaysShowTabs: el && hp? false : true, + hideTabs: el || !hp ? true : false, + minTabWidth: 140 + } + }) + }; + } } if (!this.parent.el) { diff --git a/docs/symbols/src/Roo_bootstrap_CheckBox.js.html b/docs/symbols/src/Roo_bootstrap_CheckBox.js.html index 6a9ff92986..01151cd0b4 100644 --- a/docs/symbols/src/Roo_bootstrap_CheckBox.js.html +++ b/docs/symbols/src/Roo_bootstrap_CheckBox.js.html @@ -345,6 +345,10 @@ validateRadio : function() { + if(this.allowBlank){ + return true; + } + var valid = false; Roo.each(this.el.up('form').select('input[name='+this.name+']', true).elements, function(e){ @@ -485,8 +489,51 @@ group[i].el.findParent('.form-group', false, true).addClass(this.invalidClass); } + }, + + disable : function() + { + if(this.inputType != 'radio'){ + Roo.bootstrap.CheckBox.superclass.disable.call(this); + return; + } + + var _this = this; + + if(this.rendered){ + Roo.each(this.el.up('form').select('input[name='+this.name+']', true).elements, function(e){ + _this.getActionEl().addClass(this.disabledClass); + e.dom.disabled = true; + }); + } + + this.disabled = true; + this.fireEvent("disable", this); + return this; + }, + + enable : function() + { + if(this.inputType != 'radio'){ + Roo.bootstrap.CheckBox.superclass.enable.call(this); + return; + } + + var _this = this; + + if(this.rendered){ + Roo.each(this.el.up('form').select('input[name='+this.name+']', true).elements, function(e){ + _this.getActionEl().removeClass(this.disabledClass); + e.dom.disabled = false; + }); + } + + this.disabled = false; + this.fireEvent("enable", this); + return this; } + }); Roo.apply(Roo.bootstrap.CheckBox, { diff --git a/docs/symbols/src/Roo_bootstrap_DateField.js.html b/docs/symbols/src/Roo_bootstrap_DateField.js.html index 0064c3fa1f..ead092dbef 100644 --- a/docs/symbols/src/Roo_bootstrap_DateField.js.html +++ b/docs/symbols/src/Roo_bootstrap_DateField.js.html @@ -147,7 +147,7 @@ this.isInput = true; this.component = this.el.select('.add-on', true).first() || false; this.component = (this.component && this.component.length === 0) ? false : this.component; - this.hasInput = this.component && this.inputEL().length; + this.hasInput = this.component && this.inputEl().length; if (typeof(this.minViewMode === 'string')) { switch (this.minViewMode) { @@ -926,6 +926,54 @@ remove: function() { this.picker().remove(); + }, + + validateValue : function(value) + { + if(value.length < 1) { + if(this.allowBlank){ + return true; + } + return false; + } + + if(value.length < this.minLength){ + return false; + } + if(value.length > this.maxLength){ + return false; + } + if(this.vtype){ + var vt = Roo.form.VTypes; + if(!vt[this.vtype](value, this)){ + return false; + } + } + if(typeof this.validator == "function"){ + var msg = this.validator(value); + if(msg !== true){ + return false; + } + } + + if(this.regex && !this.regex.test(value)){ + return false; + } + + if(typeof(this.parseDate(value)) == 'undefined'){ + return false; + } + + if (this.endDate !== Infinity && this.parseDate(value).getTime() > this.endDate.getTime()) { + return false; + } + + if (this.startDate !== -Infinity && this.parseDate(value).getTime() < this.startDate.getTime()) { + return false; + } + + + return true; } }); diff --git a/docs/symbols/src/Roo_bootstrap_Img.js.html b/docs/symbols/src/Roo_bootstrap_Img.js.html index e57b3bed3c..52fcac2222 100644 --- a/docs/symbols/src/Roo_bootstrap_Img.js.html +++ b/docs/symbols/src/Roo_bootstrap_Img.js.html @@ -168,7 +168,18 @@ { Roo.log('img onclick'); this.fireEvent('click', this, e); + }, + /** + * Sets the url of the image - used to update it + * @param {String} url the url of the image + */ + + setSrc : function(url) + { + this.el.dom.src = url; } + + }); diff --git a/docs/symbols/src/Roo_bootstrap_Input.js.html b/docs/symbols/src/Roo_bootstrap_Input.js.html index 37bb2abd4b..3b5733fa32 100644 --- a/docs/symbols/src/Roo_bootstrap_Input.js.html +++ b/docs/symbols/src/Roo_bootstrap_Input.js.html @@ -543,6 +543,8 @@ } if(this.maskRe || (this.vtype && this.disableKeyFilter !== true && (this.maskRe = Roo.form.VTypes[this.vtype+'Mask']))){ this.inputEl().on("keypress", this.filterKeys, this); + } else { + this.inputEl().relayEvent('keypress', this); } /* if(this.grow){ this.el.on("keyup", this.onKeyUp, this, {buffer:50}); diff --git a/docs/symbols/src/Roo_bootstrap_Modal.js.html b/docs/symbols/src/Roo_bootstrap_Modal.js.html index 10ab99b160..c58cd1bc97 100644 --- a/docs/symbols/src/Roo_bootstrap_Modal.js.html +++ b/docs/symbols/src/Roo_bootstrap_Modal.js.html @@ -15,7 +15,7 @@ * @cfg {String} buttonPosition (left|right|center) default right * @cfg {Boolean} animate default true * @cfg {Boolean} allow_close default true - * @cfg {Boolean} fitwindow default true + * @cfg {Boolean} fitwindow default false * @cfg {String} size (sm|lg) default empty * * @@ -257,8 +257,8 @@ this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true), Roo.lib.Dom.getViewHeight(true)); if (this.fitwindow) { var w = this.width || Roo.lib.Dom.getViewportWidth(true) - 30; - var h = this.height || Roo.lib.Dom.getViewportHeight(true) - 30; - this.setSize(w,h) + var h = this.height || Roo.lib.Dom.getViewportHeight(true) - 60; + this.setSize(w,h); } }, @@ -299,13 +299,15 @@ this.el.setStyle('zIndex', '10001'); this.fireEvent('show', this); - this.items.forEach(function(e) { - e.layout ? e.layout() : false; - - }); - this.resize(); + this.resize(); + (function () { + this.items.forEach( function(e) { + e.layout ? e.layout() : false; + + }); + }).defer(100,this); }, hide : function() diff --git a/docs/symbols/src/Roo_bootstrap_Table.js.html b/docs/symbols/src/Roo_bootstrap_Table.js.html index 03e3214f5f..89a2f2836b 100644 --- a/docs/symbols/src/Roo_bootstrap_Table.js.html +++ b/docs/symbols/src/Roo_bootstrap_Table.js.html @@ -47,17 +47,19 @@ // BC... - this.rowSelection = (typeof(config.RowSelection) != 'undefined') ? config.RowSelection : this.rowSelection; - this.cellSelection = (typeof(config.CellSelection) != 'undefined') ? config.CellSelection : this.cellSelection; + this.rowSelection = (typeof(config.rowSelection) != 'undefined') ? config.rowSelection : this.rowSelection; + this.cellSelection = (typeof(config.cellSelection) != 'undefined') ? config.cellSelection : this.cellSelection; this.headerShow = (typeof(config.thead) != 'undefined') ? config.thead : this.headerShow; this.footerShow = (typeof(config.tfoot) != 'undefined') ? config.tfoot : this.footerShow; - + this.sm = this.sm || {xtype: 'RowSelectionModel'}; if (this.sm) { + this.sm.grid = this; this.selModel = Roo.factory(this.sm, Roo.bootstrap.Table); this.sm = this.selModel; this.sm.xmodule = this.xmodule || false; } + if (this.cm && typeof(this.cm.config) == 'undefined') { this.colModel = new Roo.grid.ColumnModel(this.cm); this.cm = this.colModel; @@ -309,6 +311,10 @@ if(!this.store || !this.cm){ return; } + if (this.selModel) { + this.selModel.initEvents(); + } + //Roo.log('initEvents with ds!!!!'); @@ -317,6 +323,7 @@ + var _this = this; Roo.each(this.el.select('thead th.sortable', true).elements, function(e){ @@ -493,12 +500,12 @@ }, - + onDblClick : function(e,el) { var cell = Roo.get(el); - if(!cell || (!this.CellSelection && !this.RowSelection)){ + if(!cell || (!this.cellSelection && !this.rowSelection)){ return; } @@ -519,11 +526,11 @@ var cellIndex = cell.dom.cellIndex; var rowIndex = this.getRowIndex(row); - if(this.CellSelection){ + if(this.cellSelection){ this.fireEvent('celldblclick', this, cell, rowIndex, cellIndex, e); } - if(this.RowSelection){ + if(this.rowSelection){ this.fireEvent('rowdblclick', this, row, rowIndex, e); } }, @@ -758,6 +765,7 @@ onUpdate : function(ds,record) { this.refreshRow(record); + this.autoSize(); }, onRemove : function(ds, record, index, isUpdate){ @@ -809,7 +817,9 @@ index = ds.indexOf(record); } this.insertRow(ds, index, true); + this.autoSize(); this.onRemove(ds, record, index+1, true); + this.autoSize(); //this.syncRowHeights(index, index); //this.layout(); this.fireEvent("rowupdated", this, index, record); @@ -994,7 +1004,7 @@ getSelectionModel : function(){ if(!this.selModel){ - this.selModel = new Roo.bootstrap.Table.RowSelectionModel(); + this.selModel = new Roo.bootstrap.Table.RowSelectionModel({grid: this}); } return this.selModel; }, diff --git a/docs/symbols/src/Roo_bootstrap_Table_RowSelectionModel.js.html b/docs/symbols/src/Roo_bootstrap_Table_RowSelectionModel.js.html index c3c297b9f3..29b1168405 100644 --- a/docs/symbols/src/Roo_bootstrap_Table_RowSelectionModel.js.html +++ b/docs/symbols/src/Roo_bootstrap_Table_RowSelectionModel.js.html @@ -56,7 +56,7 @@ }); Roo.bootstrap.Table.RowSelectionModel.superclass.constructor.call(this); this.locked = false; -}; + }; Roo.extend(Roo.bootstrap.Table.RowSelectionModel, Roo.bootstrap.Table.AbstractSelectionModel, { /** @@ -66,14 +66,17 @@ singleSelect : false, // private - initEvents : function(){ - - if(!this.grid.enableDragDrop && !this.grid.enableDrag){ - this.grid.on("mousedown", this.handleMouseDown, this); - }else{ // allow click to work like normal - this.grid.on("rowclick", this.handleDragableRowClick, this); - } + initEvents : function() + { + //if(!this.grid.enableDragDrop && !this.grid.enableDrag){ + // this.growclickrid.on("mousedown", this.handleMouseDown, this); + //}else{ // allow click to work like normal + // this.grid.on("rowclick", this.handleDragableRowClick, this); + //} + //this.grid.on("rowdblclick", this.handleMouseDBClick, this); + this.grid.on("rowclick", this.handleMouseDown, this); + this.rowNav = new Roo.KeyNav(this.grid.getGridEl(), { "up" : function(e){ if(!e.shiftKey){ @@ -107,16 +110,21 @@ }, scope: this }); - - var view = this.grid.view; - view.on("refresh", this.onRefresh, this); - view.on("rowupdated", this.onRowUpdated, this); - view.on("rowremoved", this.onRemove, this); - }, + this.grid.store.on('load', function(){ + this.selections.clear(); + },this); + /* + var view = this.grid.view; + view.on("refresh", this.onRefresh, this); + view.on("rowupdated", this.onRowUpdated, this); + view.on("rowremoved", this.onRemove, this); + */ + }, // private - onRefresh : function(){ - var ds = this.grid.dataSource, i, v = this.grid.view; + onRefresh : function() + { + var ds = this.grid.store, i, v = this.grid.view; var s = this.selections; s.each(function(r){ if((i = ds.indexOfId(r.id)) != -1){ @@ -144,11 +152,12 @@ * @param {Array} records The records to select * @param {Boolean} keepExisting (optional) True to keep existing selections */ - selectRecords : function(records, keepExisting){ + selectRecords : function(records, keepExisting) + { if(!keepExisting){ this.clearSelections(); } - var ds = this.grid.dataSource; + var ds = this.grid.store; for(var i = 0, len = records.length; i < len; i++){ this.selectRow(ds.indexOf(records[i]), true); } @@ -174,15 +183,17 @@ * @param {Boolean} keepExisting (optional) True to keep existing selections */ selectLastRow : function(keepExisting){ - this.selectRow(this.grid.dataSource.getCount() - 1, keepExisting); + //this.selectRow(this.grid.dataSource.getCount() - 1, keepExisting); + this.selectRow(this.grid.store.getCount() - 1, keepExisting); }, /** * Selects the row immediately following the last selected row. * @param {Boolean} keepExisting (optional) True to keep existing selections */ - selectNext : function(keepExisting){ - if(this.last !== false && (this.last+1) < this.grid.dataSource.getCount()){ + selectNext : function(keepExisting) + { + if(this.last !== false && (this.last+1) < this.grid.store.getCount()){ this.selectRow(this.last+1, keepExisting); this.grid.getView().focusRow(this.last); } @@ -219,12 +230,13 @@ /** * Clears all selections. */ - clearSelections : function(fast){ + clearSelections : function(fast) + { if(this.locked) { return; } if(fast !== true){ - var ds = this.grid.dataSource; + var ds = this.grid.store; var s = this.selections; s.each(function(r){ this.deselectRow(ds.indexOfId(r.id)); @@ -245,7 +257,7 @@ return; } this.selections.clear(); - for(var i = 0, len = this.grid.dataSource.getCount(); i < len; i++){ + for(var i = 0, len = this.grid.store.getCount(); i < len; i++){ this.selectRow(i, true); } }, @@ -264,7 +276,7 @@ * @return {Boolean} */ isSelected : function(index){ - var r = typeof index == "number" ? this.grid.dataSource.getAt(index) : index; + var r = typeof index == "number" ? this.grid.store.getAt(index) : index; return (r && this.selections.key(r.id) ? true : false); }, @@ -277,28 +289,45 @@ return (this.selections.key(id) ? true : false); }, + // private - handleMouseDown : function(e, t){ - var view = this.grid.getView(), rowIndex; - if(this.isLocked() || (rowIndex = view.findRowIndex(t)) === false){ + handleMouseDBClick : function(e, t){ + + }, + // private + handleMouseDown : function(e, t) + { + var rowIndex = this.grid.headerShow ? t.dom.rowIndex - 1 : t.dom.rowIndex ; // first row is header??? + if(this.isLocked() || rowIndex < 0 ){ return; }; if(e.shiftKey && this.last !== false){ var last = this.last; this.selectRange(last, rowIndex, e.ctrlKey); this.last = last; // reset the last - view.focusRow(rowIndex); + t.focus(); + }else{ var isSelected = this.isSelected(rowIndex); - if(e.button !== 0 && isSelected){ - view.focusRow(rowIndex); - }else if(e.ctrlKey && isSelected){ + //Roo.log("select row:" + rowIndex); + if(isSelected){ this.deselectRow(rowIndex); - }else if(!isSelected){ - this.selectRow(rowIndex, e.button === 0 && (e.ctrlKey || e.shiftKey)); - view.focusRow(rowIndex); + } else { + this.selectRow(rowIndex, true); } - } + + /* + if(e.button !== 0 && isSelected){ + alert('rowIndex 2: ' + rowIndex); + view.focusRow(rowIndex); + }else if(e.ctrlKey && isSelected){ + this.deselectRow(rowIndex); + }else if(!isSelected){ + this.selectRow(rowIndex, e.button === 0 && (e.ctrlKey || e.shiftKey)); + view.focusRow(rowIndex); + } + */ + } this.fireEvent("afterselectionchange", this); }, // private @@ -368,19 +397,26 @@ * @param {Number} row The index of the row to select * @param {Boolean} keepExisting (optional) True to keep existing selections */ - selectRow : function(index, keepExisting, preventViewNotify){ - if(this.locked || (index < 0 || index >= this.grid.dataSource.getCount())) { + selectRow : function(index, keepExisting, preventViewNotify) + { + if(this.locked || (index < 0 || index > this.grid.store.getCount())) { return; } if(this.fireEvent("beforerowselect", this, index, keepExisting) !== false){ if(!keepExisting || this.singleSelect){ this.clearSelections(); } - var r = this.grid.dataSource.getAt(index); + + var r = this.grid.store.getAt(index); + //console.log('selectRow - record id :' + r.id); + this.selections.add(r); this.last = this.lastActive = index; if(!preventViewNotify){ - this.grid.getView().onRowSelect(index); + var proxy = new Roo.Element( + this.grid.getRowDom(index) + ); + proxy.addClass('bg-info info'); } this.fireEvent("rowselect", this, index, r); this.fireEvent("selectionchange", this); @@ -391,7 +427,8 @@ * Deselects a row. * @param {Number} row The index of the row to deselect */ - deselectRow : function(index, preventViewNotify){ + deselectRow : function(index, preventViewNotify) + { if(this.locked) { return; } @@ -401,10 +438,20 @@ if(this.lastActive == index){ this.lastActive = false; } - var r = this.grid.dataSource.getAt(index); + + var r = this.grid.store.getAt(index); + if (!r) { + return; + } + this.selections.remove(r); + //.console.log('deselectRow - record id :' + r.id); if(!preventViewNotify){ - this.grid.getView().onRowDeselect(index); + + var proxy = new Roo.Element( + this.grid.getRowDom(index) + ); + proxy.removeClass('bg-info info'); } this.fireEvent("rowdeselect", this, index); this.fireEvent("selectionchange", this); @@ -448,4 +495,5 @@ g.startEditing(newCell[0], newCell[1]); } } -}); \ No newline at end of file +}); + \ No newline at end of file diff --git a/docs/symbols/src/Roo_bootstrap_layout_Border.js.html b/docs/symbols/src/Roo_bootstrap_layout_Border.js.html index bdb86c9e11..8798d121a4 100644 --- a/docs/symbols/src/Roo_bootstrap_layout_Border.js.html +++ b/docs/symbols/src/Roo_bootstrap_layout_Border.js.html @@ -77,6 +77,14 @@ the container size if it is not the body element.</b> if(this.updating) { return; } + + // render all the rebions if they have not been done alreayd? + Roo.each(Roo.bootstrap.layout.Border.regions, function(region) { + if(this.regions[region] && !this.regions[region].bodyEl){ + this.regions[region].onRender(this.el) + } + },this); + var size = this.getViewSize(); var w = size.width; var h = size.height; diff --git a/docs/symbols/src/Roo_bootstrap_layout_Region.js.html b/docs/symbols/src/Roo_bootstrap_layout_Region.js.html index 8eb6c59633..b19f41b0a8 100644 --- a/docs/symbols/src/Roo_bootstrap_layout_Region.js.html +++ b/docs/symbols/src/Roo_bootstrap_layout_Region.js.html @@ -68,12 +68,13 @@ this.visible = true; this.collapsed = false; + this.unrendered_panels = []; }; Roo.extend(Roo.bootstrap.layout.Region, Roo.bootstrap.layout.Basic, { position: '', // set by wrapper (eg. north/south etc..) - + unrendered_panels : null, // unrendered panels. createBody : function(){ /** This region's body element * @type Roo.Element */ @@ -143,6 +144,15 @@ if(this.config.hidden){ this.hide(); } + + if (this.unrendered_panels && this.unrendered_panels.length) { + for (var i =0;i< this.unrendered_panels.length; i++) { + this.add(this.unrendered_panels[i]); + } + this.unrendered_panels = null; + + } + }, applyConfig : function(c) @@ -255,6 +265,10 @@ */ updateBox : function(box) { + if (!this.bodyEl) { + return; // not rendered yet.. + } + this.box = box; if(!this.collapsed){ this.el.dom.style.left = box.x + "px"; @@ -279,7 +293,7 @@ w += this.config.adjustments[0]; } } - if(h !== null){ + if(h !== null && h > 0){ this.el.setHeight(h); h = this.titleEl && this.titleEl.isDisplayed() ? h - (this.titleEl.getHeight()||0) : h; h -= this.el.getBorderWidth("tb"); @@ -431,7 +445,8 @@ initTabs : function() { - this.bodyEl.setStyle("overflow", "hidden"); + //this.bodyEl.setStyle("overflow", "hidden"); -- this is set in render? + var ts = new Roo.bootstrap.panel.Tabs({ el: this.bodyEl.dom, tabPosition: this.bottomTabs ? 'bottom' : 'top', @@ -448,7 +463,7 @@ ts.maxTabWidth = this.config.maxTabWidth || 250; ts.preferredTabWidth = this.config.preferredTabWidth || 150; ts.monitorResize = false; - ts.bodyEl.setStyle("overflow", this.config.autoScroll ? "auto" : "hidden"); + //ts.bodyEl.setStyle("overflow", this.config.autoScroll ? "auto" : "hidden"); // this is set in render? ts.bodyEl.addClass('roo-layout-tabs-body'); this.panels.each(this.initPanelAsTab, this); }, @@ -456,7 +471,8 @@ initPanelAsTab : function(panel){ var ti = this.tabs.addTab( panel.getEl().id, - panel.getTitle(), null, + panel.getTitle(), + null, this.config.closeOnTab && panel.isClosable() ); if(panel.tabTip !== undefined){ @@ -563,27 +579,41 @@ * @param {ContentPanel...} panel The ContentPanel(s) to add (you can pass more than one) * @return {Roo.ContentPanel} The panel added (if only one was added; null otherwise) */ - add : function(panel){ + add : function(panel) + { if(arguments.length > 1){ for(var i = 0, len = arguments.length; i < len; i++) { this.add(arguments[i]); } return null; } + + // if we have not been rendered yet, then we can not really do much of this.. + if (!this.bodyEl) { + this.unrendered_panels.push(panel); + return panel; + } + + + + if(this.hasPanel(panel)){ this.showPanel(panel); return panel; } panel.setRegion(this); this.panels.add(panel); - if(this.panels.getCount() == 1 && !this.config.alwaysShowTabs){ - this.bodyEl.dom.appendChild(panel.getEl().dom); - if(panel.background !== true){ - this.setActivePanel(panel); + /* if(this.panels.getCount() == 1 && !this.config.alwaysShowTabs){ + // sinle panel - no tab...?? would it not be better to render it with the tabs, + // and hide them... ??? + this.bodyEl.dom.appendChild(panel.getEl().dom); + if(panel.background !== true){ + this.setActivePanel(panel); } - this.fireEvent("paneladded", this, panel); - return panel; + this.fireEvent("paneladded", this, panel); + return panel; } + */ if(!this.tabs){ this.initTabs(); }else{ diff --git a/docs/symbols/src/Roo_bootstrap_panel_Nest.js.html b/docs/symbols/src/Roo_bootstrap_panel_Nest.js.html index f985ba7ad2..fc20733b9a 100644 --- a/docs/symbols/src/Roo_bootstrap_panel_Nest.js.html +++ b/docs/symbols/src/Roo_bootstrap_panel_Nest.js.html @@ -43,7 +43,11 @@ if(!this.ignoreResize(width, height)){ var size = this.adjustForComponents(width, height); var el = this.layout.getEl(); - el.setSize(size.width, size.height); + if (size.height < 1) { + el.setWidth(size.width); + } else { + el.setSize(size.width, size.height); + } var touch = el.dom.offsetWidth; this.layout.layout(); // ie requires a double layout on the first pass diff --git a/docs/symbols/src/Roo_bootstrap_panel_Tabs.js.html b/docs/symbols/src/Roo_bootstrap_panel_Tabs.js.html index 0e931f5071..2ca04afe0e 100644 --- a/docs/symbols/src/Roo_bootstrap_panel_Tabs.js.html +++ b/docs/symbols/src/Roo_bootstrap_panel_Tabs.js.html @@ -479,9 +479,13 @@ jtabs.activate("jtabs-1"); createStripElements : function(stripEl, text, closable) { var td = document.createElement("li"); // was td.. - stripEl.insertBefore(td, stripEl.childNodes[stripEl.childNodes.length-1]); - //stripEl.appendChild(td); - /*if(closable){ + + + //stripEl.insertBefore(td, stripEl.childNodes[stripEl.childNodes.length-1]); + + + stripEl.appendChild(td); + /*if(closable){ td.className = "x-tabs-closable"; if(!this.closeTpl){ this.closeTpl = new Roo.Template( diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index fa89ad21a4..95fa5a0da9 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -19298,12 +19298,20 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { tag: 'input', id : id, type : this.inputType, - value : this.inputType == 'radio' ? this.inputValue : ((!this.checked) ? this.valueOff : this.inputValue), + value : this.inputValue, cls : 'roo-' + this.inputType, //'form-box', placeholder : this.placeholder || '' }; + + var hidden = { + tag: 'input', + type : 'hidden', + cls : 'roo-hidden-value', + value : this.checked ? this.valueOff : this.inputValue + }; + if (this.weight) { // Validity check? cfg.cls += " " + this.inputType + "-" + this.weight; } @@ -19314,10 +19322,13 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { if(this.checked){ input.checked = this.checked; + } + if (this.name) { - input.name = this.name; + hidden.name = this.name; + input.name = '_hidden_' + this.name; } if (this.size) { @@ -19332,7 +19343,13 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { } }); - var inputblock = input; + var inputblock = { + tag: 'span', + cn : [ + input, + hidden + ] + }; if (this.before || this.after) { @@ -19350,6 +19367,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { } inputblock.cn.push(input); + inputblock.cn.push(hidden); if (this.after) { inputblock.cn.push({ @@ -19433,6 +19451,10 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { { return this.el.select('input.roo-' + this.inputType,true).first(); }, + hiddenEl: function () + { + return this.el.select('input.hidden-value',true).first(); + }, labelEl: function() { @@ -19499,7 +19521,8 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { this.inputEl().dom.checked = state; - this.inputEl().dom.value = state ? this.inputValue : this.valueOff; + + this.hiddenEl().dom.value = state ? this.inputValue : this.valueOff; if(suppressEvent !== true){ this.fireEvent('check', this, state); @@ -19514,7 +19537,7 @@ Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, { return this.getGroupValue(); } - return this.inputEl().getValue(); + return this.hiddenEl() ? this.hiddenEl().dom.value : this.value; }, diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index df41fc1d04..745cb97e18 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -790,21 +790,21 @@ break;case 13:if(typeof(this.vIndex)!='undefined'&&!isNaN(this.vIndex)){this.set }});Roo.apply(Roo.bootstrap.MonthField,{template:{tag:'div',cls:'datepicker dropdown-menu roo-dynamic',cn:[{tag:'div',cls:'datepicker-months',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.DateField.content]}]}]}}); // Roo/bootstrap/CheckBox.js Roo.bootstrap.CheckBox=function(A){Roo.bootstrap.CheckBox.superclass.constructor.call(this,A);this.addEvents({check:true});};Roo.extend(Roo.bootstrap.CheckBox,Roo.bootstrap.Input,{inputType:'checkbox',inputValue:1,valueOff:0,boxLabel:false,checked:false,weight:false,inline:false,getAutoCreate:function(){var A=(!this.labelAlign)?this.parentLabelAlign():this.labelAlign; -var id=Roo.id();var B={};B.cls='form-group '+this.inputType;if(this.inline){B.cls+=' '+this.inputType+'-inline';}var C={tag:'input',id:id,type:this.inputType,value:this.inputType=='radio'?this.inputValue:((!this.checked)?this.valueOff:this.inputValue),cls:'roo-'+this.inputType,placeholder:this.placeholder||''} -;if(this.weight){B.cls+=" "+this.inputType+"-"+this.weight;}if(this.disabled){C.disabled=true;}if(this.checked){C.checked=this.checked;}if(this.name){C.name=this.name;}if(this.size){C.cls+=' input-'+this.size;}var D=this;['xs','sm','md','lg'].map(function(G){if(D[G]){B.cls+=' col-'+G+'-'+D[G]; -}});var E=C;if(this.before||this.after){E={cls:'input-group',cn:[]};if(this.before){E.cn.push({tag:'span',cls:'input-group-addon',html:this.before});}E.cn.push(C);if(this.after){E.cn.push({tag:'span',cls:'input-group-addon',html:this.after});}}if(A==='left'&&this.fieldLabel.length){B.cn=[{tag:'label','for':id,cls:'control-label col-md-'+this.labelWidth,html:this.fieldLabel} -,{cls:"col-md-"+(12-this.labelWidth),cn:[E]}];}else if(this.fieldLabel.length){B.cn=[{tag:this.boxLabel?'span':'label','for':id,cls:'control-label box-input-label',html:this.fieldLabel},E];}else{B.cn=[E];}if(this.boxLabel){var F={tag:'label',cls:'box-label',html:this.boxLabel} -;if(this.tooltip){F.tooltip=this.tooltip;}B.cn.push(F);}return B;},inputEl:function(){return this.el.select('input.roo-'+this.inputType,true).first();},labelEl:function(){return this.el.select('label.control-label',true).first();},label:function(){return this.labelEl(); -},boxLabelEl:function(){return this.el.select('label.box-label',true).first();},initEvents:function(){this.inputEl().on('click',this.onClick,this);if(this.boxLabel){this.el.select('label.box-label',true).first().on('click',this.onClick,this);}this.startValue=this.getValue(); -if(this.groupId){Roo.bootstrap.CheckBox.register(this);}},onClick:function(){this.setChecked(!this.checked);},setChecked:function(A,B){this.startValue=this.getValue();if(this.inputType=='radio'){Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){e.dom.checked=false; -});this.inputEl().dom.checked=true;this.inputEl().dom.value=this.inputValue;if(B!==true){this.fireEvent('check',this,true);}this.validate();return;}this.checked=A;this.inputEl().dom.checked=A;this.inputEl().dom.value=A?this.inputValue:this.valueOff;if(B!==true){this.fireEvent('check',this,A); -}this.validate();},getValue:function(){if(this.inputType=='radio'){return this.getGroupValue();}return this.inputEl().getValue();},getGroupValue:function(){if(typeof(this.el.up('form').child('input[name='+this.name+']:checked',true))=='undefined'){return ''; -}return this.el.up('form').child('input[name='+this.name+']:checked',true).value;},setValue:function(v,A){if(this.inputType=='radio'){this.setGroupValue(v,A);return;}this.setChecked(((typeof(v)=='undefined')?this.checked:(String(v)===String(this.inputValue))),A); -this.validate();},setGroupValue:function(v,A){this.startValue=this.getValue();Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){e.dom.checked=false;if(e.dom.value==v){e.dom.checked=true;}});if(A!==true){this.fireEvent('check',this,true); -}this.validate();return;},validate:function(){if(this.disabled||(this.inputType=='radio'&&this.validateRadio())||(this.inputType=='checkbox'&&this.validateCheckbox())){this.markValid();return true;}this.markInvalid();return false;},validateRadio:function(){if(this.allowBlank){return true; -}var A=false;Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){if(!e.dom.checked){return;}A=true;return false;});return A;},validateCheckbox:function(){if(!this.groupId){return (this.getValue()==this.inputValue||this.allowBlank)?true:false; -}var A=Roo.bootstrap.CheckBox.get(this.groupId);if(!A){return false;}var r=false;for(var i in A){if(r){break;}r=(A[i].getValue()==A[i].inputValue)?true:false;}return r;},markValid:function(){if(this.allowBlank){return;}var A=this;this.fireEvent('valid',this); -var B=Roo.bootstrap.FieldLabel.get(this.name+'-group');if(this.groupId){B=Roo.bootstrap.FieldLabel.get(this.groupId+'-group');}if(B){B.markValid();}if(this.inputType=='radio'){Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){e.findParent('.form-group',false,true).removeClass([A.invalidClass,A.validClass]); +var id=Roo.id();var B={};B.cls='form-group '+this.inputType;if(this.inline){B.cls+=' '+this.inputType+'-inline';}var C={tag:'input',id:id,type:this.inputType,value:this.inputValue,cls:'roo-'+this.inputType,placeholder:this.placeholder||''};var D={tag:'input',type:'hidden',cls:'roo-hidden-value',value:this.checked?this.valueOff:this.inputValue} +;if(this.weight){B.cls+=" "+this.inputType+"-"+this.weight;}if(this.disabled){C.disabled=true;}if(this.checked){C.checked=this.checked;}if(this.name){D.name=this.name;C.name='_hidden_'+this.name;}if(this.size){C.cls+=' input-'+this.size;}var E=this;['xs','sm','md','lg'].map(function(H){if(E[H]){B.cls+=' col-'+H+'-'+E[H]; +}});var F={tag:'span',cn:[C,D]};if(this.before||this.after){F={cls:'input-group',cn:[]};if(this.before){F.cn.push({tag:'span',cls:'input-group-addon',html:this.before});}F.cn.push(C);F.cn.push(D);if(this.after){F.cn.push({tag:'span',cls:'input-group-addon',html:this.after} +);}}if(A==='left'&&this.fieldLabel.length){B.cn=[{tag:'label','for':id,cls:'control-label col-md-'+this.labelWidth,html:this.fieldLabel},{cls:"col-md-"+(12-this.labelWidth),cn:[F]}];}else if(this.fieldLabel.length){B.cn=[{tag:this.boxLabel?'span':'label','for':id,cls:'control-label box-input-label',html:this.fieldLabel} +,F];}else{B.cn=[F];}if(this.boxLabel){var G={tag:'label',cls:'box-label',html:this.boxLabel};if(this.tooltip){G.tooltip=this.tooltip;}B.cn.push(G);}return B;},inputEl:function(){return this.el.select('input.roo-'+this.inputType,true).first();},hiddenEl:function(){return this.el.select('input.hidden-value',true).first(); +},labelEl:function(){return this.el.select('label.control-label',true).first();},label:function(){return this.labelEl();},boxLabelEl:function(){return this.el.select('label.box-label',true).first();},initEvents:function(){this.inputEl().on('click',this.onClick,this); +if(this.boxLabel){this.el.select('label.box-label',true).first().on('click',this.onClick,this);}this.startValue=this.getValue();if(this.groupId){Roo.bootstrap.CheckBox.register(this);}},onClick:function(){this.setChecked(!this.checked);},setChecked:function(A,B){this.startValue=this.getValue(); +if(this.inputType=='radio'){Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){e.dom.checked=false;});this.inputEl().dom.checked=true;this.inputEl().dom.value=this.inputValue;if(B!==true){this.fireEvent('check',this,true); +}this.validate();return;}this.checked=A;this.inputEl().dom.checked=A;this.hiddenEl().dom.value=A?this.inputValue:this.valueOff;if(B!==true){this.fireEvent('check',this,A);}this.validate();},getValue:function(){if(this.inputType=='radio'){return this.getGroupValue(); +}return this.hiddenEl()?this.hiddenEl().dom.value:this.value;},getGroupValue:function(){if(typeof(this.el.up('form').child('input[name='+this.name+']:checked',true))=='undefined'){return '';}return this.el.up('form').child('input[name='+this.name+']:checked',true).value; +},setValue:function(v,A){if(this.inputType=='radio'){this.setGroupValue(v,A);return;}this.setChecked(((typeof(v)=='undefined')?this.checked:(String(v)===String(this.inputValue))),A);this.validate();},setGroupValue:function(v,A){this.startValue=this.getValue(); +Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){e.dom.checked=false;if(e.dom.value==v){e.dom.checked=true;}});if(A!==true){this.fireEvent('check',this,true);}this.validate();return;},validate:function(){if(this.disabled||(this.inputType=='radio'&&this.validateRadio())||(this.inputType=='checkbox'&&this.validateCheckbox())){this.markValid(); +return true;}this.markInvalid();return false;},validateRadio:function(){if(this.allowBlank){return true;}var A=false;Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){if(!e.dom.checked){return;}A=true;return false;} +);return A;},validateCheckbox:function(){if(!this.groupId){return (this.getValue()==this.inputValue||this.allowBlank)?true:false;}var A=Roo.bootstrap.CheckBox.get(this.groupId);if(!A){return false;}var r=false;for(var i in A){if(r){break;}r=(A[i].getValue()==A[i].inputValue)?true:false; +}return r;},markValid:function(){if(this.allowBlank){return;}var A=this;this.fireEvent('valid',this);var B=Roo.bootstrap.FieldLabel.get(this.name+'-group');if(this.groupId){B=Roo.bootstrap.FieldLabel.get(this.groupId+'-group');}if(B){B.markValid();}if(this.inputType=='radio'){Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){e.findParent('.form-group',false,true).removeClass([A.invalidClass,A.validClass]); e.findParent('.form-group',false,true).addClass(A.validClass);});return;}if(!this.groupId){this.el.findParent('.form-group',false,true).removeClass([this.invalidClass,this.validClass]);this.el.findParent('.form-group',false,true).addClass(this.validClass); return;}var C=Roo.bootstrap.CheckBox.get(this.groupId);if(!C){return;}for(var i in C){C[i].el.findParent('.form-group',false,true).removeClass([this.invalidClass,this.validClass]);C[i].el.findParent('.form-group',false,true).addClass(this.validClass);}},markInvalid:function(A){if(this.allowBlank){return; }var B=this;this.fireEvent('invalid',this,A);var C=Roo.bootstrap.FieldLabel.get(this.name+'-group');if(this.groupId){C=Roo.bootstrap.FieldLabel.get(this.groupId+'-group');}if(C){C.markInvalid();}if(this.inputType=='radio'){Roo.each(this.el.up('form').select('input[name='+this.name+']',true).elements,function(e){e.findParent('.form-group',false,true).removeClass([B.invalidClass,B.validClass]);