My XML is as shown below. Everything except the toogle editor button becomes hidden from the editor. Is there any other code to fix the problem.
<field name="description"
type="editor"
cols="20"
label="COM_TEST_DESCRIPTION_LBL"
description="COM_TEST_DESCRIPTION_DESC"
class="inputbox"
filter="JComponentHelper::filterText"
buttons="true"
hide="readmore,pagebreak,image,article,toogle editor"
/>
The simplest way would be to use CSS styling to disable the visibility of this button:
.toggle-editor {
display: none;
}
Related
Is there any way how to force uppercasing value in textbox when typing? Not after value changed, but when typing.
You can use CSS for that:
<input id="textbox" style="text-transform: uppercase" />
<script>
$("#textbox").kendoTextBox();
</script>
Example
I have a editor template for my kendo grid defined as
<script id="my-editor-template" type="text/x-kendo-template">
<div class="k-edit-label">
<label for="ContactName">Contact</label>
</div>
<div data-container-for="ContactName" class="k-edit-field">
<input type="text" class="k-input k-textbox" name="ContactName" data-bind="value:ContactName">
</div>
<!-- more fields, etc -->
</script>
In my grid definition, I definte editable like this:
editable =
{
mode: 'popup',
template: kendo.template($('#my-editor-template').html()),
confirmation: 'Are you sure you want to delete rec'
};
But I would like to make the popup window wider. I tried wrapping the contents of my template in a
<div style="width: 800px;"></div>
but the popup window stayed the same with, and made the contents scrollable (i.e., 800px content inside a 400px window).
I know I can do a
$(".k-edit-form-container").parent().width(800).data("kendoWindow").center();
after the window is opened, but all the content of the window is formatted for like 400px, and it feels a little hackish. Is there not a way I can dictate teh size in the template markup?
Kendo grid popup window is using kendo window, so you can set the height and width like this
editable: {
mode: "popup",
window: {
title: "My Custom Title",
animation: false,
width: "600px",
height: "300px",
}
}
Here is dojo for you, but since i did not define a custom template it still use default one so as the result the window size already 600 x 300 but the content is not.
After an hour+ long research following code fixed my issue. I had to put this code in the edit event.
$(".k-edit-form-container").attr('style', "width:auto");
I applied jquery switch checkbox plugginhttps://github.com/olance/jQuery-switchButton) on my checkbox , but i am unable to get the change or click event on it. Here is the html page.
<script>
$(document).ready(function ()
{
$("#check").CheckboxSwitch();
$("#second").hide();
$("#first").hide(3000);
$("#second").show(5000);
$('#check').click(function () { $("#second").hide(); $("#first").show(3000); });
$('#check').change(function () { $("#second").show(); $("#first").hide(3000); });
});
</script>
<input id="check" type="checkbox" value="" />
<div id="first">
Some textSome text
Some text
Some textSome text
Some textSome textSome text
Some text
Some textSome text
Some textSome textSome text
Some text
Some textSome text
Some textSome textSome text
Some text
Some textSome text
Some textSome textSome text
Some text
</div>
<div id="second">
Second div tagaSecond div tagaSecond div
</div>
How to get the click or change event on checkbox which is enabled with checkbox-switch pluggin.
With that plugin you are not clicking the inpunt and also the value is not changing.
look the documentation of the pluging and check if your are able to handle the event onChenge.
Other option is do it manually.
Handler the onClick event of $('.switch-button-background').click(.... and $('.switch-button-button').click(.... Thats the real items your clicking.
You can check the state of the control checking the att style of .switch-button-button if left = -1 the OFF el ON, or you can create a new varible and set the value in the functions onclick describes above.
Hope this helps you.
Is there any way to make the text of a label editable in Firefox other than placing it in a span?
<h1>Content Editable Test</h1>
<p contenteditable="true">Can edit this</p>
<p><label><span contenteditable="true">and this</span></label></p>
<p><label contenteditable="true">but not this in Firefox</label></p>
This is what I did on the view. I put #Html.CheckBox("checkBox", false, "Name") in a jQuery UI tab.
But on the rendered html, this checkbox control was evaluated as a html string
<input id="checkBox" name="checkBox" type="checkbox" value="true" /><input name="checkBox" type="hidden" value="false" /><label for="checkBox">Name</label>
rather than a control. Any idea?
The default for Html.CheckBox also creates a hidden input tag.
This will return the value you get when the checkbox is not checked. Due to the nature of html, if a checkbox is not checked, nothing will be posted. So this is the easiest workaround.