Changing kendo-dateinput placeholder for Kendo Angular2 - placeholder

Is there a way to change or simply remove the placeholder of the Kendo UI - Angular 2 dateinput control?
Right now, when empty, it reads "day/month/year" and I need to, at least, remove the localized literals.
Thank you very much,
Dimitris

UPDATE: With the latest changes in the DateInput (as of v1.4.0) two additional properties were added:
placeholder - display text hint (related Github issue)
formatPlaceholder - control description of the format sections (Github issue)
With those available, we can easily hide or modify the displayed format description:
<kendo-datepicker [placeholder]="Enter date..." [formatPlaceholder]="short" />
Here is a plunker demo that demonstrates those new properties:
http://plnkr.co/edit/XYmwDjkpp7Mb4txlmc2L?p=preview
Indeed, the DateInput component displays the localized format value once empty. That being said, its value is controlled by the component date format. Its behavior is similar to the Chrome's <input type="date" />.
I'm afraid that the placeholder cannot be set to a custom text.
I think that it will be best to share your request in the Kendo UserVoice portal:
http://kendoui-feedback.telerik.com/forums/555517-kendo-ui-for-angular-feedback

Related

Use <input> from child Svelte component to search store in App component?

I have a Svelte app set up so that there's an App component, a Chart component and a Header component.
The App component pulls in data. The Chart component displays the data.
The Header component has an <input>. I want to be able to enter a search string in that input, in the Header component, and have it filter the data that's in the App component.
I'm not there yet. Here is my work in progress.
Right now, I have an <input> in the App component, too. And that one is correctly filtering my data that shows up in the Chart component.
I just want to be able to use the <input> in Header.
I've found how I can bind the header input text to App, as shown in my REPL, but how do I use that text as a variable?
All help very welcome.
Again, here's the REPL.
Currently you are binding the value from the header to a store, while your local search input binds to search, which you then use for filtering
<Header bind:value={$store} />
<input bind:value={search}>
But you are actually not doing anything with this store, not even sure why it is a store since you don't need that part here. Nothing stops you from using bind in a component to connect to a regular value
<Header bind:value={search}>

Orbeon changed behavior for xforms:alert / xforms:h3lp

[Stackoverflow disallows the word help in the title. Hence the h3lp]
We are in the proces of moving our code from Orbeon 3.9 to Orbeon 4.x. One of the many things that changed is the behavior for display of xforms:alert and xforms:help. Example code:
<xforms:input ref="#code">
<xforms:alert ref="$resources/required-field"/>
<xforms:help ref="$helptext"/>
</xforms:input>
In Orbeon 3.9 the alert is displayed as a red img with a white exclamation mark that has the text as tooltip, only if the binding fails. The help is displayed as a blue-ish image with a question that activated a tiny pseudo window containing the (potentially large) help text.
In Orbeon 4.7 the alert text is displayed as-is, no image and no condition based on binding. This interferes with a carefully designed interface as it takes up a lot more space. The help text is not displayed at all because .xforms-help has display: none;. Overriding that doesn't work because the text would then just be displayed inline.
I could not find documentation for these changes. Does anyone know the rationale and how to make "alert" and "help" useful yet again?
There are two changes with Orbeon Forms 4.x which might be relevant to this:
The HTML layout of elements has changed a bit. This means existing CSS might have to be adapted. You can check this by comparing the HTML produced by 3.9 vs. 4.x for a given page. With 4.x, all form elements, for example, are wrapped within a <span> or <div> element.
Form Runner uses Twitter Bootstrap as a CSS library. But the Bootstrap CSS files are also included for non-Form Runner pages.
This said, "red icon" alerts should still work, see for example the good old Espresso Order or Bookcast demos.
If you see alerts inline and unconditionally, it means that somehow the proper CSS doesn't apply, either because of the HTML layout change mentioned above, or because some CSS files are missing.
Look at this post : http://blog.orbeon.com/2014/01/improving-how-we-show-help-messages.html
and this : http://discuss.orbeon.com/how-to-use-the-quot-new-quot-xforms-help-in-4-5-td4658348.html
julien

render html in a rich text box in active reports software

I have a string with basic html markup which I want to put into a rich textbox
string ab = #"<b> a b </b>"
I want it to render as it would appear in a browser ie:
a b
how can I do this in active reports 7? According to http://www.datadynamics.com/forums/77664/ShowPost.aspx, a richtextbox supports these tags. Do I have to specify a property to allow it to render html? How should I approach this?
Thanks,
Sam
More information (Update 8/11):
I'm binding the data from a database field - an oracle nclob. The field repeats within the detail section (with different information each time).
If I bind the field directly to a textbox or label it renders the string, but doesnt encode the html
<b> a b </b>
but it encode the string.
Solution Summary
Solution (as suggested by #activescott)
Bind rtx directly to the datafield
'Reformat' the text into html in
the script
public void detail_Format()
{
rtxBox.Html = rtxBox.Text;
}
result: renders the html field with some degree of html formatting
notes:
binding directly in the script doesnt work,
ie. rtxBox.Html = pt.Fields["CONT_ID"].ToString(); yields some wierd meta data string
the Datafield only binding approach doesn't work
(it will yield it as text)
there are some extra spacing that occurs with p tags. It may be worth regexing them out or somehow providing some formatting control.
The actual property you are looking for is the Html Property. You can also load a file into that control using the step-by-step walkthrough here.
I am assuming you are using Section Reports and not Page Reports.
To use HTML from the database in a bound report, you should be able to use the DataField property of the RichTextBox control (set it to the name of the corresponding Data field at design time). However, I noticed this "Render HTML tags in DB in ActiveReport pdf or HTML" article which kind of implies that doesn't work since it loads the HTML from a database programatically. One of the two should work.

How to make a JIRA Number Field read-only?

As described in the title, I am looking for a smart, safe and efficient way to set a Number Field in JIRA to Read-Only. Below is a short list of approaches, guides and plugins used in an attempt to achieve this.
Installed and deployed the Behaviours Plugin
This resulted in form permission errors all over JIRA setting some of the most basic and editable fields to non-writeable. Further investigation revealed that this is a known issue that will not be fixed anytime soon.
I have gone up and down the options for JIRA's existing Field Behaviour and it simply does not offer the option to set a field to read-only.
Hiding is not an option, as the field needs to be visible (more about that below).
A potential option would be to create a new Screen Scheme that simply excludes this field from the edit screen.
Associating new Screen Schemes with our current project would be a small disaster as many other projects are dependent and shared. Hence making the field read-only or admin-writeable-only would be a much better solution in this instance.
Regarding the Custom Field:
I created a post function in the workflow of our current project that will increase a Custom Number Field by increments of 1 every time an issue/task/bug is reopened. In essence, I am tracking the numbers of reopens. Which brings me to the reason for my read-only requirement. Developers shouldn't be able to change the value of this field as it would throw off statistics.
You can use jquery to make the field read only, add to the field description :
<script type="text/javascript">
AJS.$(document).ready(function() {
AJS.$("#customfield_10000").attr("readonly", true);
});
</script>
change customfield_10000 to your custom field id. You can find this id by viewing the issue edit page source and checking which id does it have.
Check out this and this answers and this for more details.
[UPDATE]
To disable the hover-to-edit function as well, you can add the following script to jira's Announcement Banner , this way it will run on every screen:
<script type="text/javascript">
AJS.$(document).ready(function() {
AJS.$("#customfield_10000").attr("readonly", true);
AJS.$("#customfield_10000").removeClass("editable-field inactive");
AJS.$("#customfield_10000 .icon-edit-sml").remove();
});
</script>
Stopping inline editing from working is trickier it seems. What stopped the Behaviours plugin working for you, do you have a link to the known issue? The one option you haven't listed is to create a new custom field type that extends the familiar Number custom field type but in its velocity template restricts who can edit the field. This kind of customization is documented at https://developer.atlassian.com/display/JIRADEV/Creating+a+Custom+Field+in+JIRA and also in Practical JIRA Plugins (O'Reilly)
Use the "disabled" keyword in your form item. E.g.
Code:
<input type="text" name="foo" value="bar" disabled>

MVC.NET Empty Text

Is there any way in MVC to specify "Empty Text" for text fields?
Empty Text is normally a property give to a textbox to display when text is empty, and is cleared out OnClick.
For example: have the text box say "Enter here..." and then onFocus that text would clear and allow you to type in the entry, however if text is empty, "Enter here..." would display again.
I'm trying to find out if there's any ways to get this out of the box w/o any additional coding, as this feature is widely supported by 3rd Party controls (ie: Telerik's AJAX Controls) does anyone know if MS made any provisions to offer anything similar?
Thanks.
You could use HTML5 placeholder attribute:
#Html.TextBoxFor(x => x.SomeProperty, new { placeholder = "some default text" })
And if you need to support older browsers you could always achieve the same effect with javascript. For example there are existing jQuery plugins such as jQuery.placeholder.
Use placeholder attribute in HTML 5
There's no such thing as what you are referring to in HTML, at least not called that. 3rd party controls have implemented this functionality themselves.
There is, in HTML 5, a property called a placeholder, but this won't appear in non-html5 compliant browsers (IE8, IE7, older versions of FF, etc..)
The only way to do this cross browser is to use javascript to implement the functionality.

Resources