I've created a jira custom field plugin to appear at issue view screen only (as there will be predeined calcualtion on field description-javascript).
But this does not appear at issue view screen what i need even though, assgined hard coded values in vm file.
when create "edit.vm" then it appears on edit issue screen and after assigning the value to field , it could appear in issue view screen but, without edit template , its not working and unable to see in issue view screen.
Below is atlassina-plugin xml stuff:
<customfield-type name="Summary field" i18n-name-key="cascading-summary-field.name" key="cascading-summary-field" class="com.company.plugins.jira.customfields.CascadingSummaryCustomField">
<description key="cascading-summary-field.description">The cascading summary field to allow multiple summary fields using five text box and description javascript to write related text to appear in summary field.</description>
View template as below: (with hard coded value specified though unable to appear this on issue view screen).
<span>$<input type="text" name="${customField.id}:input1" id="${customField.id}:input1" value="#if($input1)$input1#end" style="border: 0px;width:59px;margin-left:1px;"/></span>
<span>$</text><input type="text" name="${customField.id}:input2" id="${customField.id}:input2" value="3" style="border: 0px;width:59px;margin-left:1px;"/></span>
<span>$</text><input type="text" name="3" id="${customField.id}:input3" value="0" style="border: 0px;width:59px;margin-left:1px;"/></span>
//also, tried by just keeping <span>some value</span>
how it could resolve ?
As found, field to appear at view screen, there must have require "Edit" template.
so, it resolved by creating an edit template.
Other wise, have to follow achieve by preparing dynamic object through jquery under CUSTOM FIELD'S description field. (first found, related position to append through firebug and append that created object inside "Custom field >> description".
Thanks
Related
I am using the mat-tab-group from https://material.angular.io/components/tabs/overview.(used complex labels approach with ng-template)
The tab contains a name of the tab and a button to close the tab.
Whenever i focus the tab, it reads both aria-labels of name and a button. When tab is focused, it should read only the name but not the close button aria label. When tab is focused currently and then clicking on tab will focus the close button, at this time it should read the close button aria label.
How to do this ?
Code:
<mat-tab-group dynamicHeight [(selectedIndex)]="activeTabIndex" (selectedTabChange)="changetab($event)">
<mat-tab *ngFor="let tab of Tabs; let i = index" [label]="tab.name" [attr.sortColumn]="tab.sortBy" [attr.sortOrder]="tab.sortOrder"
[attr.viewId]="tab.id" [attr.viewObjectID]="tab.viewObjectId" attr.aria-label="{{tab.name}}">
<ng-template mat-tab-label>
<div class="tab-container">
<div class="somestyle">
<span class="tab-name" [matTooltip]="tab.name">{{tab.name}}</span>
</div>
<button mat-icon-button tabindex="0" id="{{tab.id}}" class="close-btn" (keyup)="closeTab($event,view)" (click)="closeTab($event,view)" attr.aria-label="{{closetab}}">
<mat-icon class="material-icons">cancel</mat-icon>
</button>
</div>
</ng-template>
</mat-tab>
The output of this : I am using "jaws" for screen reading tool. When we focus on tab, it reads tab name and close button label ( attr.aria-label="{{tab.name}}" and attr.aria-label="{{closetab}}").
Do you need to use aria-label at all?
The WAI-ARIA Practices document has this at the top of its "Read Me First" section:
No ARIA is better than Bad ARIA
The mat-tab-group examples simply use a text node inside the tab (which is a button with role="tab") for the accessible name. That should be adequate. Let the visual label be the accessible name, if possible.
The only reason you should use aria-label on a button is if the accessible name should be different from the button label. e.g. in cases where only an icon or unicode glyph is used as the visual label, in place of human-readable text.
In all other cases, just put the accessible name in a text node inside the button. (You may of course wrap it in span or other inline elements - as the mat-tab-group example does, if you need more refined styling).
This is true of other GUI controls too, although the visual label mechanism differs between element types. (e.g. The <input> element needs a corresponding <label>, which is both visible and understood by screenreaders because of the for attribute.)
If you must use aria-label, make sure it is on the element that gets focus, otherwise the screen readers will each try to guess what you want the accessible name to be, with unpredictable results. I suspect this is what you are experiencing.
Also, if I am not mistaken, you are adding the 'body' of the tab (including the close box) to the focusable tab itself. This is not the correct structure. Again, let the mat-tab-group example be your guide.
You should be able to overwrite what is read on focusing the entire tab, if you add an aria-label="Your preferred text here" to the tab element.
In my project we are using a uib-typeahead to help our users populate document fields. It is working for us just fine except when the uib-typeahead is embedded inside an angular modal component created by angular-aside. When the content for the drop-down is greater than its viewport, a vertical scrollbar appears. Used outside of a modal a user may select the scrollbar and move it up and down (our desired behaviour), but used within a modal selecting the scrollbar causes the drop-down to be dismissed and the entry at the position of the mouse becomes the chosen element (not our desired behaviour).
<input type="text"
ng-model="selectedName"
uib-typeahead="name for name in names"
typeahead-select-on-blur="true" />
Using the plunkr from the dbtek/angular-aside, I've reproduced this issue in the following plunkr:
https://plnkr.co/edit/Dbth9bfshC5iEFSzqz68?p=preview
I've attempted to modify the z-index of the ul element to be greater than the z-index value of the modal, but that did not resolve the issue.
Thoughts?
Thanks in advance.
I am using MVC 4 and in my view I want to be able to use the model's error property to display a tooltip over the Error label.
<label type="label" class="label label-danger" data-toggle="tooltip" title=#Model.Error>Error</label>
If the error is, "Unable to locate file.", all that is displayed on the tooltip is the first word, "Unable". It seems as though once a space is encountered it does not display anymore of the string.
What can I do to get the tooltip to display the whole string?
I have two panel group and only one panel is displayed at any time using JQuery. There are multiple fields under each panel group which have required="true" attribute. My question is how to avoid validation on not displayed fields. Currently all the not displayed fields are get validated and the navigation get stopped.
Any suggestions are welcome.
If you are using the flag for hidden panelGroup then use the same flag variables in the place of hidden panel fileds.
For Example :
Use this
required="#{managedBean.hiddenPanelGroupFlag}"
instead of
required="true"
in you hidden panel.
I have a form that (amongst other things) contains 2 multi-select listboxes. Basically you can add items to the one on the right from the full list of items on the left using some add/remove buttons.
The problem is that I cannot see a way of picking up the contents of the listbox when posting back to the controller.
I have followed this example:
http://ittecture.wordpress.com/2009/04/30/tip-of-the-day-198-asp-net-mvc-listbox-controls/
This works fine if you have actually selected the items in the listbox before posting. That's not really the way I think this UI should behave though.
Hope that makes sense,
Nick
Thanks for the help guys. I forgot to mention that I am populating the selected items listbox with jQuery. Not sure if that was important or not though.
In the end, I fixed it by selecting all items onclick with jQuery before posting. Seemed like the easiest solution.
I don't think a listbox is the control you want for the control on the right. The way a listbox works (by posting the selected item) is not what you're trying to achieve.
You could consider having a grid or even just a div with a number of strings. There is more Javascript/JQuery to be written, but it will provide a nice user experience because no postbacks will be needed until all the work is complete.
You'll need to use JavaScript/JQuery to add and remove items from the div based on the buttons to add and remove.
In addition, for each item that is added on the right, you'll need to add a hidden input field:
<input type="hidden" id="SelectedItems" value="..." />
Set the value to the key or id of the newly added item. If you remove a field from the right control, make sure you remove the associated hidden field.
To handle items on the right that the user has removed, you'll need hidden fields to indicate which have been removed:
<input type="hidden" id="RemovedItems" value="..." />
Then in your controller you can add two parameters to the Action (or add two field to the viewmodel) which will be arrays of strings. This will be set to all of the values in the hidden fields that were added, and all the ones that were removed.
In addition to listbox, have several hidden input fields to hold "currently added" items. The listbox selection will indicate "items to remove" when selected.
OK, clarification. You have left and right listboxes. Left one holds available items, and selected ones are POSTed and then added. Right one holds currently added items, and selected ones are POSTed and then removed from added items.
Now, you also need to hold currently added items. You can do this via bunch of
<input type="hidden" name="currently_added" value="itemid" />
hidden fields.
Yes you can go jQuery but this is an easy way; not every site should be designed to require JavaScript turned on. The above solution works without JavaScript enabled.
Your post from page will give you 3 arrays:
Left side box selected items to add
Right side box selected items to remove
Hidden fields - already added items
You take (3), remove (2) from it, add (1) to it, and display the same page or do whatever you want.