X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-ui-debug.js;h=8334d5b873ea0ea6256ca42f04ff461e10117c92;hb=ff355e12aa44d689f8536251642f2963c7abbf1e;hp=9297a89be82f62e30dc6cb25d75ca5770d748db5;hpb=b7c1993119ddada83dd97e7adf014f1d2df138a4;p=roojs1 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 9297a89be8..8334d5b873 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -20526,7 +20526,9 @@ Roo.extend(Roo.form.Checkbox, Roo.form.Field, { this.fireEvent('check', this, state); } this.inSetChecked = true; - this.el.dom.value = state ? this.inputValue : this.valueOff; + + this.el.dom.value = state ? this.inputValue : this.valueOff; + this.inSetChecked = false; }, @@ -20617,9 +20619,49 @@ Roo.extend(Roo.form.Radio, Roo.form.Checkbox, { this.el.dom.checked = 'checked' ; } + }, + /** + * Sets the checked state of the checkbox. + * On is always based on a string comparison between inputValue and the param. + * @param {Boolean/String} value - the value to set + * @param {Boolean/String} suppressEvent - whether to suppress the checkchange event. + */ + setValue : function(v,suppressEvent){ + + + //this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on'); + //if(this.el && this.el.dom){ + // this.el.dom.checked = this.checked; + // this.el.dom.defaultChecked = this.checked; + //} + this.setChecked(String(v) === String(this.inputValue), suppressEvent); + + this.el.dom.form[this.name].value = v; + + //this.fireEvent("check", this, this.checked); + }, + // private.. + setChecked : function(state,suppressEvent) + { + + if(this.wrap){ + this.wrap[state ? 'addClass' : 'removeClass']('x-menu-item-checked'); + } + this.checked = state; + if(suppressEvent !== true){ + this.fireEvent('check', this, state); + } + + + + + }, + reset : function(){ + // this.setValue(this.resetValue); + //this.originalValue = this.getValue(); + this.clearInvalid(); } - });Roo.rtf = {}; // namespace Roo.rtf.Hex = function(hex) { @@ -25701,11 +25743,42 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component, { if (this.enableBlocks) { new Roo.htmleditor.FilterBlock({ node : div }); } + + var html = div.innerHTML; + //?? tidy? - var tidy = new Roo.htmleditor.TidySerializer({ - inner: true - }); - var html = tidy.serialize(div); + if (this.autoClean) { + + new Roo.htmleditor.FilterAttributes({ + node : div, + attrib_white : [ + 'href', + 'src', + 'name', + 'align', + 'colspan', + 'rowspan', + 'data-display', + 'data-width', + 'start' , + 'style', + // youtube embed. + 'class', + 'allowfullscreen', + 'frameborder', + 'width', + 'height', + 'alt' + ], + attrib_clean : ['href', 'src' ] + }); + + var tidy = new Roo.htmleditor.TidySerializer({ + inner: true + }); + html = tidy.serialize(div); + + } if(Roo.isSafari){ @@ -29760,6 +29833,9 @@ clientValidation Boolean Applies to submit only. Pass true to call fo for(id in values){ if(typeof values[id] != 'function' && (field = this.findField(id))){ + + + if (field.setFromData && field.valueField && field.displayField && @@ -29774,6 +29850,9 @@ clientValidation Boolean Applies to submit only. Pass true to call fo sd[field.displayField] = typeof(values[field.name]) == 'undefined' ? '' : values[field.name]; field.setFromData(sd); + } else if (field.inputType && field.inputType == 'radio') { + + field.setValue(values[id]); } else { field.setValue(values[id]); } @@ -29799,7 +29878,7 @@ clientValidation Boolean Applies to submit only. Pass true to call fo /** * Returns the fields in this form as an object with key/value pairs. If multiple fields exist with the same name * they are returned as an array. - * @param {Boolean} asString + * @param {Boolean} asString (def) * @return {Object} */ getValues : function(asString) @@ -30879,7 +30958,13 @@ Roo.extend(Roo.form.Action.Submit, Roo.form.Action, { } var ret = false; try { - ret = Roo.decode(response.responseText); + var rt = response.responseText; + if (rt.match(/^\