Rally edit cardboard displayed field - field

Created a Task board using SDK 2.0 rallycardboard. Trying to allow edit of ToDo field directly from card, but can't find example or method to use. Fields like Name and Owner are editable. My next task will be to group by Story and Feature....

Currently the fields that can be edited on cards cards are limited. Per this post
var myCardConfig = {
xtype: 'rallycard',
fields: ['ToDo', 'Estimate', 'WorkProduct'],
editable: true
}
editable: true makes only Name editable.

You can also check out the actual editing implementation for the cards:
https://help.rallydev.com/apps/2.0rc2/doc/#!/api/Rally.ui.cardboard.plugin.CardEditing
It's marked as a private class in the docs, but that's ok. If you take a look at the source:
https://help.rallydev.com/apps/2.0rc2/doc/source/CardEditing.html#Rally-ui-cardboard-plugin-CardEditing
You can see that the _getEditorFieldConfigs method returns all the editors, and currently only Name and PlanEstimate are included by default. Rally.ui.Card instantiates this editing plugin inside its setupPlugins method.
You can probably extend Rally.ui.Card with your own class and then inside setupPlugins pass your own editor fields for the various additional fields you'd like to edit. The plugin was designed to be generic but we just never went back and enabled editing for the other fields...

Related

Can I use one line initialization of a blank address and have validation

I recently started working with Angular 2 and reactive forms. What I'm trying to accomplish is simple: create an array inside a form and let user push new objects into it (say list of user addresses to which user can add new addresses - standard FormArray). That's quite simple (and it's all described well in the documentation) but I'd like to be able to automatically validate user's input as well. I know I can do this by simply pushing a group like this:
this.formBuilder.group({
country: ['', Validators.required],
city: ['', Validators.required],
...
})
but I've got a model that represents an address instance and I would like to use it like that:
this.formBuilder.group(new Address())
that's actually how I do it right now (without validation).
My question is: can I use this one line initialization of a blank address and somehow have the validation without explicitly defining my validators every time I push new blank address?
If my question isn't clear enough, I'll answer all of your questions.
This could be an option for you:
this.formBuilder.group(new Address(),
{validator: (fg: FormGroup) => this.attachValidators(fg)})
Basically setting a custom validator, which goes through the individual controls of the address collection and sets their individual validators property as desired. See below:
//helper method
private attachValidators(address: FormGroup)/*: ValidationErrors */ {
for (let ctrlName of Object.keys(address.controls)) {
address.get(ctrlName).setValidators(Validators.required);
}
}
May be too much, if you consider the repetitive assignment of validators

Umbraco 7.5.1 umbracoNaviHide

To be able to filter out items that should not be rendered with .Where("Visible") I need a property called umbracoNaviHide that returns true or false.
In earlier versions this was added to the Generic tab. However now you cant append to that tab anymore.
How would I accomplish hiding pages now?
Here's my foreach:
#foreach (var Area in Model.Content.Children.Where("Visible"))
{
Here's a statement about it. But I cant find any workaround.
Related Changes Summary - 7.4 beta - Option toCannot add properties to the "Generic properties" tab
Description - In the 7.4 beta it's not possible anymore to add
properties to the "Generic properties" tab. I know this has been done
because properties can be a bit hidden on that tab and usually are
better on a separate tab. But there are situations where the
properties are better on that tab.
You can add that property as a true/false datatype to any tab. However, it's important to note that umbracoNaviHide does not do anything special it is just a magic string, that, when implemented as a true/false datatype, it works with
.Where("Visible").
Personally I don't use it anymore. If I need to cause items to be visible or not then I would name the property more specifically. For example, it is often useful when implementing menus where you want some nodes to be visible but not others. I generally have a Menu tab where one of the properties is a true/false type called Show in menu with an alias of showInMenu.
In code it could be something like below (I have used TypedContentAtXPath to get the parent node of a specific doc type. Of course there are various ways of doing this)
var homeNode = Umbraco.TypedContentAtXPath("//MyHomePageDocType").First();
var menuItems = homeNode.Children.Where(item=>item.GetPropertyValue<bool>("showInMenu"));
foreach(var item in menuItems)
{
// Do your menu stuff here
}
Hope that helps
J
You can create a composition for node visibility with a checkbox to show or hide the menu item. And you can inherit this to the doc types that you do not want to show.
And then you can do
_homeNode.Children.Where(x => !x.GetPropertyValue<bool>("hideInNavigation"));
Hope this helps!

Big Commerce Custom Fields

I'm planning on allowing a client to provide a couple codes for each product that I'll need to reference with Javascript on the product pages.
Basically my plan was to use the Big Commerce's 'custom fields' to do so, but I'm having trouble spitting out the custom fields onto the product pages. I've been looking all over for some type of GLOBAL variable that allows me to reference custom fields, but I'm coming up dry. I would think there would be some type of GLOBAL array with all the custom fields in it, or a way to reference them by name directly.
Am I blind, or is there just no way to do this directly in the BC template file?
Thanks.
In Bigcommerce the custom fields can generally be found within the ProductOtherDetails.html Panel which contains a Snippet named ProductCustomFieldItem.html. This snippet has the markup for each custom field that the system outputs.
Inside of the ProductCustomFieldItem.html Snippet are the two codes you are looking for: %%GLOBAL_CustomFieldName%% and %%GLOBAL_CustomFieldValue%%.
I ran into this as well - given that it's quite a long time later, I'm supposing there's no better answer - a decent amount of searching turned up nothing useful as it seems all you can do is output the full set of custom fields as a set of divs.
So, I output them into a div which was hidden:
<div id="fpd-custom-fields" style="display:none;">
%%SNIPPET_ProductCustomFields%%
</div>
and then set up a javascript function to get the value based on the name:
function getCustomFieldValue(label)
{
var value = '';
$('#fpd-custom-fields div.Label').each(function()
{
if($(this).text().toLowerCase() == (label.toLowerCase() + ':'))
{
value = $('div.Value', $(this).parent()).text().trim();
}
});
return value;
}
Doesn't feel quite right as it's not a very clean solution, but was the best I could come up with unfortunately!

Lib.Web.Mvc.JQuery.JqGrid - Enable editing of column ONLY while being added, but not while being "edited"

I have a column that happens to be both a business key and a primary key for a particular entity in an existing, poorly-designed schema. It is impractical to allow edits to this key as they will not cascade as-is.
So I need to make a column editable only when creating but not when editing. I could not find anything in the documentation for jqGrid or Lib.Web.Mvc.JQuery.JqGrid that suggests this is a built-in feature, but if it is, I would love to know about it.
If not, what would be the best way for me to proceed in achieving this functionality? Should I make the column editable but add a custom (client-side) formatter? Is there another way?
Note: This is not a duplicate of jqGrid need a field editable on Add dialog but not Edit dialog because it pertains specifically to Lib.Web.Mvc.JQuery.JqGrid and not the JavaScript library in general.
All help appreciated.
Here is how I am doing it for now. This feels "wrong" and ugly to me, but it does work.
function fnSetAccessGroupCodeReadOnly() {
$("#AccessGroupCode").attr("readonly", "readonly");
}
function fnUnSetAccessGroupCodeReadOnly() {
$("#AccessGroupCode").removeAttr("readonly");
}
and in the helper, in the action navigator for edit:
new JqGridNavigatorEditActionOptions()
{
// Edit Options
Url = Url.Action("EditPartnerAccessGroup"),
MethodType = JqGridMethodTypes.Post,
AfterShowForm = "fnSetAccessGroupCodeReadOnly",
CloseAfterEdit = true
},

how to set Personalizable attribute to generic list in webpart?

I develop web part with custom editor part and faced with this question.
Is it possible in web part set Personalizable attribute to generic List?
For example I want something like this:
[WebBrowsable(false)]
[Personalizable(PersonalizationScope.Shared)]
public List<AnnouncementItem> Announcements
{
get { return _announcements; }
set { _announcements = value; }
}
Is it possible, and what kind of types at all can be used as "Personalizable"?
Thanks.
Solution:
I use a custom EditorPart to select multiple lists using AssetUrlSelector, but I need a way to personalize this collection for end user.List<of custom objects> doesn't work, but I found that List<string> (and only string) work perfectly. So, I get required lists in EditorPart and pass their to the web part using List<string>.
Try using a custom EditorPart to add/remove items from the collection. I've never built a web part that personalized a collection so I don't know if it works but I'd definitely try the collection with an EditorPart. If it doesn't work, serialize XML into a string property.
Your question does not seem to match your code. Your code shows a collection of custom objects. I doubt an end user will be able to set such a property. To have a property that points to a generic list, you would probably be better off defining the property as a string that contains the URL to a list.

Resources