diff --git a/Ooui.Forms/Renderers/SwitchRenderer.cs b/Ooui.Forms/Renderers/SwitchRenderer.cs index 737eb50..8dd639b 100644 --- a/Ooui.Forms/Renderers/SwitchRenderer.cs +++ b/Ooui.Forms/Renderers/SwitchRenderer.cs @@ -27,9 +27,7 @@ namespace Ooui.Forms.Renderers if (e.NewElement != null) { if (Control == null) { var input = new Input (InputType.Checkbox); - input.SetAttribute ("data-toggle", "toggle"); SetNativeControl (input); - input.Call ("$.bootstrapToggle"); Control.Change += OnControlValueChanged; } diff --git a/Ooui/Client.js b/Ooui/Client.js index 9d9e458..d30cb0c 100644 --- a/Ooui/Client.js +++ b/Ooui/Client.js @@ -84,19 +84,11 @@ function ooui (rootElementPath) { const messages = JSON.parse (event.data); if (debug) console.log("Messages", messages); if (Array.isArray (messages)) { - const jqs = [] messages.forEach (function (m) { // console.log('Raw value from server', m.v); m.v = fixupValue (m.v); - if (m.k.startsWith ("$.")) { - jqs.push (m); - } - else { - processMessage (m); - } + processMessage (m); }); - // Run jQuery functions last since they usually require a fully built DOM - jqs.forEach (processMessage); } }); @@ -212,15 +204,14 @@ function msgCall (m) { console.error ("Unknown node id", m); return; } - const isJQuery = m.k.startsWith ("$."); - const target = isJQuery ? $(node) : node; + const target = node; if (m.k === "insertBefore" && m.v[0].nodeType == Node.TEXT_NODE && m.v[1] == null && hasText[id]) { // Text is already set so it clear it first if (target.firstChild) target.removeChild (target.firstChild); delete hasText[id]; } - const f = isJQuery ? target[m.k.slice(2)] : target[m.k]; + const f = target[m.k]; if (debug) console.log ("Call", node, f, m.v); const r = f.apply (target, m.v); if (typeof m.rid === 'string' || m.rid instanceof String) { diff --git a/Ooui/Element.cs b/Ooui/Element.cs index e3193e1..ea203b1 100644 --- a/Ooui/Element.cs +++ b/Ooui/Element.cs @@ -230,20 +230,6 @@ namespace Ooui SendSet ("style." + Style.GetJsName (e.PropertyName), Style[e.PropertyName]); } - protected override bool SaveStateMessageIfNeeded (Message message) - { - if (message.TargetId != Id) - return false; - - switch (message.MessageType) { - case MessageType.Call when message.Key.StartsWith ("$.", StringComparison.Ordinal): - AddStateMessage (message); - return true; - default: - return base.SaveStateMessageIfNeeded (message); - } - } - protected virtual bool HtmlNeedsFullEndElement => false; public override void WriteOuterHtml (System.Xml.XmlWriter w) diff --git a/Ooui/UI.cs b/Ooui/UI.cs index c865a3c..540f74c 100644 --- a/Ooui/UI.cs +++ b/Ooui/UI.cs @@ -40,7 +40,6 @@ namespace Ooui