Different URL paths in different tabs depending on id - meteor

Let's say a user has a list of projects, and each project has it's own set of various collection items of charts, reports, tags, etc associated by project._id
When a user selects a project, all the associated collection items are viewable by route, for example /project/<projectId>/chart/<chartId>
Currently, a user can only view one project at a time. If he opens up a new tab or a new browser, he can still only view the one project. If he switches the project, all the other tabs/windows reactively change to the new project. This is because currently the project is tied to Meteor.user.profile.projectId (but I am looking for a better way).
I would like to change this behaviour so that tabs and windows are independent of each other. If a user pastes project\project1 into a new window it should load that and it's associated collections even if his current tab is in project\project2. I hope that makes sense.
I'm not sure how to accomplish this. I am looking for suggestions and solutions. Thanks.

I believe that this can easily be accomplished using session variables:
set a default somewhere in your client code, Session.setDefault('project', 1) (or make sure that project being undefined is handled gracefully)
when a user selects a project, set the variable:
Session.set('project', [selectedProjectId])
Wherever you need to decide which project to show: Session.get('project')

Related

Best way to present alternate view to user

In my Apple Watch app, I need to have a way to be able to notify the user that they must first set something from within the iPhone version of my app before they can use the Watch App. Obviously, I need to do to this through a few labels and images, however the layout of these is different to the layout of the main views in my app.
How can I present the user with a different view based on the status of the iPhone app, that they cannot see unless required? The way I would do something similar in a normal app would be to just push to a different view controller, but obviously this is not possible in a watch app.
Any ideas?
You could always present a modal interface controller. Alternatively, you could create a separate group in your root controller's view and show/hide that as necessary.
To check the status of the iPhone app, the easiest solution would likely be to use a shared NSUserDefaults suite between the iPhone app and the Watch app. Set a value to true/YES when your criteria has been met and check that value in the Watch app.

How to show web page/web resource in CRM Dynamics?

I am new to Microsoft Dynamics. I managed to create new solution and know how to add web resource to particular page like Contacts. Also, I have added few buttons to Ribbon control with their actions.
Now my problem is, I want to add a button either to ribbon control or anywhere in page, which I can access in complete CRM (like I can do in Master Page of asp.net), and which will help me open my web resource.
For example, if I click on Charts bar, web resource should be visible, otherwise it should be hidden.
My question may be lame, because I am very new to CRM Dynamics, kindly suggest my way is correct or I need to take some different approach?
If I understand it correctly you're looking for a way to add a button to multiple screens without need to modify each of them separately. (To avoid the pain when modifying all the ribbons or all the forms.)
In that case I'd suggest creating a separate JS web resource with code that adds a button with desired functionality, styling etc. And use Form Libraries Manager from XrmToolbox to bulk add the resource to all the forms.

Tridion Structure Group Localization Permission Issue

I am using SDL Tridion 2011 and need to take the permissions off from the user to localize a structure group so that he does not make any changes in the name of the structure group by localizing it. However, even after removing the rights and permissions and making the structure group ‘read only’, the user is still able to localize the structure group by right clicking on it and going to properties. Please help if there's any resolution for it.
Also, is there any way we can restrict the user from unpublising or updating a page?
Permissions on a structure group control what you can do to the things it contains. Remove the localize permission in the parent structure group instead.
To prevent unpublishing you can do any of the following:
Remove the Read permission.
Go to the Security tab in the properties of the relevant publication, and remove the right to Publish to Content Distributor
Go to the Security tab of the relevant Target Type, and remove the Use Target Type permission
To prevent them updating a page, remove the Write permission, although be aware that editing the page allows them to modify the page composition, and that controlling this doesn't prevent changes to the content if the person has permission to modify the relevant components.
If none of these is sufficient, then you will need to implement a custom solution with either the events system, or workflow.
Inspect the properties for your Structure Group and go to the Security tab. Check which users/groups have the localize right and then see if your user is a member of any of those groups. Groups can be members of other groups, so you may need to check recursively to find where this ability is being allowed from.
Also make sure that the user is not an Administrator.
To prevent a user from unpublishing a page then you need to make sure they do not have "Publish to Content Distributor" rights at the Publication level. If they need to be able to publish pages, but not unpublish, you will need to take care of that by writing an Event System.
To prevent them from updating a page, you need to consider the Write permissions on the containing Structure Group.

Where I can find Button Override in Change Sets

I want to move standard button override (Clone) on custom object through Outbound change Sets, but I'm unable to find this position in possible changes.
In which category Button Overrides are stored?
Custom buttons and links are listed in change sets under 'Button or Link'. To deploy the Page Layouts to which they are assigned, be sure to add it to the change set under 'Page Layouts'.
If you want to deploy a button overridden with a Visualforce page, you will need to deploy the whole object, the Visualforce page, its Apex Classes, and any components that are in the Visualforce page. In addition, once you have deployed the pages and classes, you will need to go into the new environment and give the appropriate profiles access to them, otherwise navigating to the page will give them an 'Insufficient Privileges' error.
If you want more finely-grained control over what specific metadata components you are deploying (and you don't simply want to do it manually in the target org) then you should consider using the ANT-based metadata migration tool that Salesforce provides. It has some more power and flexibility in terms of migrating sub-components of metadata. Here is a link with a little getting started video for that, and here is the documentation.

Multiple configurations for asp.net user control

I'm working on a site that can be displayed to the user in several different ways, kind of like themes, but more functionality related. So basically, the page you are viewing is in a certain state (based on the user, country etc).
The rendering of the controls on a page will vary a bit depending on the current state, and I want this to be easily configurable. (For state A, hide this field in this control, for state B show this icon etc).
In a standard web site, a control would just access a section in web.config to get the its current configuration, but now I want the control to get different configurations depending on the state the page is in.
Any suggestions on how to implement this?
Why not just save the relevant UserControl Properties values in a database for each state. This way states can be added or modified on the fly later.
I choose to create an interface for getting configuration settings that directly mapped to ConfigurationManager.GetSection(string sectionPath).
I then injected (using Spring.Net) a class that used the built in configuration manager, but tried to resolve the section path at different levels depending on the current state.
So it started by trying to get the configuration from "[CurrentState]/Application/MyControlConfiguration", if not found tried the default "Application/MyControlConfiguration". Worked pretty well...
The controls didn't have to be aware that the application can override configuration settings depending on state.

Resources