New to Backbone and wondering if any Backbone experts can lend their advice as to how to structure the following application:
Users log in to view the Dashboard. The Dashboard has 6 Panes and the Content of each Pane is determined by each User's Preference List (a Backbone Model with attributes panelone: contentA, paneltwo: contentD, etc...)
Above the Panes is a horizontal list of Content types. The User should be able to drag and drop the Content type over a Pane to save it and render the Content in that Pane immediately.
For example, if ContentF dropped on Pane3 then Pane3 saves ContentF ( Model.set('Pane3: ContentF' ) and updates itself with ContentF's template.
Specifically, How do I divide up this functionality between Router, Views and Templates?
Thanks,
AC
I can't consider myself a Backbone expert, anyway that's my two cents.
I suggest you to use Marionette, a framework built on top of Backbone that ease the things a lot.
You could setup your dashboard view as a layout, and each panel as a region of that.
This way you could update each panel's content without affecting the others and have all the events and stuff attached to your old view be cleaned up by Marionette's build-in memory management.
Also I don't think your router should be too affected by a change in panels content, it should just render the view assigned to that specific content, so it just has to be able to access the list model. Each of this views will have their specific template and that's all!
Related
Does the lack of decorator support prevent this? I'm hoping to customize certain fields with the prebuilt pages (e.g. instead of an IRI for a subresource field, I want to provide a composite : <resource_description> inside of a chip).
It appears by building my own App.js and components, it is fully customizable, but we also lose all of the prebuilt resources.
I can't seem to find any documentation on simply enhancing the existing prebuilt codebase rather than recreating each show screen, edit screen, list screen, etc. by hand.
Our team is working on an effort to improve the accessibility of our mobile application developed with Xamarin. One area we're having trouble tackling is Focus Path (i.e. tab order). Research examples suggest that the focus path should naturally be top down if the layout is created correctly. However, the examples are often simple and not real-world with respect to complex layouts and navigation (or whatever Marketing dreams up). We have several re-usable 'controls' and templates the get injected as part of the layout like main navigation, search, etc. The focus path, or tab order, is all over the place.
Tools that offer live preview/xaml edit only work against the opened xaml file which in many of our cases is just part of the overall xaml that makes up the screen.
Looking for a way to view 'rendered xaml' that makes a up a given screen in a xamarin mobile app. We need to see the final xaml that includes all of the dynamic controls, templates, etc. that get mashed together. This may help us understand what's happening to our focus path.
EDIT: we've found that forcing/setting tabindex does not help.
Is there such a tool or process?
I was using https://www.livexaml.com/ for such a purpose.
It is possible to define pagination on document library?
I have a document library with more that 10000 documents... when I open the library occurs an timeout.
Actually SenseNet already does this! They just don't deliver it in the standard list control. If you open up the PRC and navigate to /Root/IMS/BuiltIn/Portal you'll see a list control with paging. The code can be found at /Root/Global/renderers/UserExploreGrid.ascx as User Control portlet. You can copy the code and change it to meet your needs.
Our company prefers to create User Control portlets and use Datatables with calls to the SenseNet OData API using skip and top to deliver pages.
Finally, given that SenseNet Content is stored as a tree structure (in SQL!), you can move the Content after creation so that data is organized hierarchically. A common solution is to take the first letter of the DisplayName and create a sub-folder from that letter, thereby reducing the number of items at a single node.
Here's what the paging looks like:
The short answer is no. Right now there isn't a built in functionality for that.
The long answer is that you can make a pagination yourself. One of the core member of sensenet made a grid where you can use pagination. It won't work with the current free to use releases because they lack the js files she used. But the idea behind it, is using a custom view. Which you can achieve by adding a system folder named Views under a the Document library and adding your custom view there.
You can use this grid for Explore, just follow these steps:
Go to the Explore action page, and switch editor mode on the PRC.
Place a ClientContext portlet (this can find under the Portlets->Application section in the portlet picker dialog) to the Wide column. Set portlet (client context porlet) properties, Apparance to None. It is a technical portlet, which allow get the CurrentContext in javascript. This is a very important element to work with this grid. The Grid use the client context.
Place a UserControlPortlet (In the portlet picker, Portlets->Application section) to the Wide Column.
Set portlet properties:
4.1. Portlet title: <%$ Resources: PortletTitles, Items%>
4.2. User Control path: /Root/Global/renderers/UserExploreGrid.ascx
Checkin Page modification on the PRC.
Enjoy your pageable explore portlet.
Keep in mind that this grid is specifically designed for users, so they will miss actions in the top menu. These must be handwritten. Then I suggest you copy the UserControl ( /Root/Global/renderers/UserExploreGrid.ascx)
and then put the action list on it . You can read more info about action list here: http://wiki.sensenet.com/ActionList
Br,
maros
A few questions on customisation with Piranha CMS.
Is there a way to create additional custom site-wide items similar to those from the site helper? http://piranhacms.org/docs/api-reference/site-helper
e.g. to be able to set a phone number used throughout the site but still editable in the settings section of the manager.
Is is possible to create additional custom items for a page, e.g. page subtitle, and for those to appear in the Information section of page editing? Creating a region for say a page subtitle seems overkill.
Is it possible to create a custom page type with a region that is a collection of HtmlRegions or similar? e.g. for the purpose of managing a set of FAQs or similar enumerated content?
Is is possible to define custom settings properties for a page type?
Yes, you can add regions to your site in the same way as with page types under Settings > Sites. You then add content for them under Content > Pages > Edit Site.
You can add simple text properties on the page type. They will be shown as single line text inputs under Properties when editing the page.
No native support, however the region body can be anything that can be serialized to JSON so you have to handle this in the edit view for your region.
There is no support for injecting fields into the page settings, however if it's important you can override the whole edit view for pages and do anything you like by placing a copy of the view in the manager area in your local project. You can find the views in the github repo in the 2.2.5 branch.
Regards
HÃ¥kan
I tried the simple approach: editing the Contact page in the admin interface and selecting my new template within the Advanced Options section. But the form does not get displayed.
I also generated the override views:
rake refinery:override view=refinery/inquiries/inquiries/*
But looking at the app\views\refinery\inquiries\inquiries\new.html.erb file, I did not see an obvious solution to this issue.
I found this issue on github but it does not offer much detail: https://github.com/refinery/refinerycms-inquiries/issues/45
I suspect a big part of the issue is that when I change the template setting under Advanced Options, it's changing the view from the default inquiries new.html.erb to one of the standard view options. The problem is inquires extension new view is not listed as an option.
The short answer here is: you can't.
In the course of struggling with this, I came to realize that in most cases you probably don't want to be switching layouts. Not in the casual manner that I was, anyway.
What I really wanted were alternate page views. The basic web page layout and styling can be fully modified through views.
Realizing this changed my objective. I didn't need to change the layout for the inquiry pages. I needed to match the inquiry page views to my default page view. I was able to do this by overriding the inquiries extension's new and thank-you views and editing those files so that the markup and styling matched that of my default page view.
Simple enough. The only downside is it's a bit un-DRY. If I were to alter my page view, I now would likely have to repeat the changes in those two views as well.