I'm trying to create some in-line hyperlinks in my tables to allow people to edit/delete the selected item (and to provide bread-crumb style navigation links at the top of the screen). To achieve this, I've created a customscripts.js file as follows which contains the following function definition:
FormatElement = function (element, contentItem, className) {
element.className = className;
element.textContent = contentItem.value;
}
This function basically allows me to apply a custom class to a given element by calling a piece of code on the render or post-render event as follows (where BackLink is a variable data item whose value is set in the create() method of the screen):
myapp.MyScreen.created = function (screen) {
// Write code here.
screen.DeleteLink = "delete"; /* Initializes delete link variable text */
screen.EditLink = "edit"; /* Initializes edit link variable text */
screen.BackLink = "Back to Manage Accounts";
};
myapp.MyScreen.BackLink_postRender = function (element, contentItem) {
// Write code here.
element = FormatElement(element, contentItem, "ui-breadcrumb")
};myapp.MyScreen.EditLink_render = function (element, contentItem) {
// Write code here.
element = FormatElement(element, contentItem, "ui-action-link");
};
In user-customization.css I've added a couple of new styles corresponding to the classes referenced by the FormatElement calls.
.ui-action-link {
font-weight: normal;
text-decoration: dashed;
color: #0c2b90;
}
.ui-breadcrumb {
font-weight: normal;
text-decoration: dashed;
font-size: x-large;
color: #0c2b90;
}
However, when I run my application, the dashed text-decoration property seems to have been over-ridden with a default value of none.
Can anyone provide any suggestions on why this might be happening?