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?
Related
Setup:
[gridstack]
I'm using "0.4.0" merged to "1.0.0-dev" from the develop branch.
I have a column for the plugin/widget that I will drag onto the grid, so basically I use the jQueryUI for droppable and draggable.
Just discovered an issue while resizing and dragging of items around and after awhile trying to drag another into the grid generates and error "Uncaught TypeError: Cannot set property '_grid of undefined" line 933 "node._grid = self;". Screenshot is attached.
Also the "ui-draggable-handle" sticks on the grid with additional class named "ui-draggable-dragging". It totally breaks the plugin and you need to refresh the page to have all functionality back to normal but every other dragstop event.
<div id="sidebar">
<div class="item ui-draggables"><span>{json-config}</span></div>
</div>
<div id="grid1" class="grid-stack">
<div class="grid-stack-item">//loaded from draggables with json config</div>
</div>
http://www.screencast.com/t/snK9VR1C442
Using ng-tags-input works well, but I have a <label for="my-field"> which doesn't work. The actual input element inside the ng-tags-input element has no name or id attribute, so I can't target it with the for attribute. Is there something I'm missing or do I have to use custom JavaScript to get it to behave like a regular label in a browser where clicking on the label focuses the field?
Here's a plunkr showing the problem: http://plnkr.co/edit/D3OLro?p=preview
The first input can be focused by clicking the label, but not the ng-tags-input
I've been trying to create an horizontal radiobutton horizontal list, but somehow I don't get the same visual result as when done with the data-* attributes.
If I do it with code I get squared buttons, while using the attributes I get a nice rounded corner toolbar.
Here is the code I use for creating the button list:
$(element).controlgroup({ mini: true, type: "horizontal" });
which should be the same as the one I use with the data-* attributes:
<fieldset data-role="controlgroup" data-type="horizontal" data-mini="true">
I've posted a jsfiddle to show the result
http://jsfiddle.net/simonech/zeDt4/3/
Can someone shad some light on this strange behavior?
Thx
Simone
To make them look the same, try this:
$("#mycontrolbox").controlgroup({ mini: true, type: "horizontal"});
$("#mycontrolbox").attr("data-role", "controlgroup");
updated jsFiddle - http://jsfiddle.net/zeDt4/4/
Now, why is this.
I think that jQuery mobile is actually not build upon jQuery UI even though it is currently very close. jQuery mobile is using those data-** attributes to select what is going to be a role of each tag. When the element is added to the html, jqm reads the content and based on what is in these data-role attributes, it decorates / replaces / the current content with its own. This is more about what is done to the element in order how it looks.
On the other hand, when you call
$("#mycontrolbox").controlgroup();
This does create a jQuery component allowing you to use the methods of that component. etc.
This is close to how the component behaves from the script point of view. This does not, however, add data-role attribute to the element itself.
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
I am using colors drop down in list view.In this dropdown,From the datasource,I am able to display colors from my database.
what I want is that,In the drop down,For each value i want to display name of color and squarish box filled with this color.
I have implemented the below for displaying drop down,
<select STYLE="width:90px;height:auto" id="Flag" data-bind="value:prj_flag" data-text-field="usr_color" data-value-field="usr_id" data-source="FlagdatSource" data-role="dropdownlist"></select>
Do you know how to define it NOT using KendoUI? I mean, if you know how to do it using HTML select then you should be able implementing the same in KendoUI using template in DropDownList (check KendoUI DropDownList). Doing this, you reduce your problem to a CSS question instead of a KendoUI.
You should create your server to return not only the text of the for these colors but also the color codes. Then all you need to to is to create a template.
Here it is in action, the only difference is that it is using local data (not coming from a server).