How to implement routing when I need swipeable view inside another view with Ionic Framework? - angular-ui-router

How can I implement ui-router when I make a swipeable view inside another view with Ionic Framework?
I need to make a calendar view, which will contain 3 parts:
Navigation bar (unchangeable)
Day details bar under the navigation bar it should not move while I swipe list (3) and it should display current day/date
Scrollable/Swipeable list of time slots available for selected day, this list should be swipeable back and forth to next/previous day and scrollable.
This is how I imagine myself how it should be:

Ok, I've done it much more simpler by using ion-slide-box to which I dynamically adding slides as explained here: How to insert data dynamically to ion-slide-box Angularjs Ionic.
Anyway, if somebody has another idea how can it be implemented please comment or post your answer, it's good to have few another solutions in a toolbox.

Related

Kendo UI - using history.replaceState to manage back stack / back button navigation

I have a Kendo UI application flow where I don't want the user to be able to step back into a particular set of views (ie, a couple of 'create' views that lead to the 'completed record' view - the user should not re-access those specific create views). This is for a mobile app if that makes a difference.
I know that Kendo can use window.history features to some degree, but it looks like they have only implemented pushState (http://docs.telerik.com/kendo-ui/api/javascript/router#configuration-pushState), but I believe I would need the replaceState method.
Is there a way to take some manual control temporarily without breaking off from the back stack/backbutton widget?
Turns out that Kendo has an implementation of replaceState that they have abstracted to replace. See doc here.
It's as simple as calling your next destination.
kendo.mobile.application.replace("#baz");
kendo.mobile.application.navigate("#baz");

Can I create quiz GUI with Django-Forms?

I'm new to django, and I'm working on a quiz project. The idea is to create something similar to this (http://www.stylemint.com/quiz). Basically, there will be a question on each page and the user clicks on an image with the answer. I was planning on using a django form with a radio select input type, however, I'd like the image to act as the radio button (ie, be clickable) and also a click on the image will take you to the next question (instead of having to click submit after each). Is this possible with django, or do I need java?
it's perfectly possible - if you just want a series of images, and clicking on them to take you to the next question you might achieve that by:
Having multiple input fields of type "image" which all submit the form. If you go down that route you'll have to template the forms out yourself or make your own widget.
Using javascript to replace radio buttons with images dynamically. If you do that, it'd be a good idea to make it fall back to a straight list selection for people who don't have javascript.
Ignoring forms altogether and just using a view with a parameter of what the choice is.
Yes, it's completely possible. My suggestion is if you want to save the result in the db use model and model form in django. So, my next suggestion is you can customize model field for combine radio button functionality and image together. But actually you must programming and use a little jquery and javascript to do it.
You may want to see:
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/
https://docs.djangoproject.com/en/dev/howto/custom-model-fields/

How to create a side bar like twitter for OSX ? Suggestions about development choices

I'm curious to know how to create the sidebar used in twitter and many other Apps
What i'm asking for is not about graphics, but i'd like to know which is the better way to create a structure to permit switching between different sections.
I don't like asking for help without start by an opinion, thus, this is mine:
Generic view structure would be created with a NSSplitView
I Need a generic Model class managing sections and taking a pointer to the current one.
Here i'd add informations about image used for any section etc... (something like a custom UITabBarController for iOS.
The Left view of the split View would be connected to the generic Model and would be able to present its section and get the current one. Pushing a button will ask the generic Model to change the current section and load content in the Right view (some doubts about this use a Model that way :P probably not the better one)
The Right view loads other view controller as requested by left View (i have may doubts about how do that!)
I'm on the right way ? how would you build a structure like that of Twitter ?
(Off topic: I'd really appreciate correction of my terrible English to keep this question suitable for all users)
Here's what you need https://github.com/erndev/EDSidebar
That's pretty much how I would do it although what you call a "generic model" object, I would call a controller (because it fits in the controller part of MVC).
The right view would be a Tab View with the style set to "tabless" so you don't get the selection buttons at the top and the individual views within the tab view would be selected by the controller using -selectTabViewItemWithIdentifier:
That's how I would do it anyway.

Updating data with information received from the view (Grails)

I am writing a Grails app and I have a quick question about the best way to do something. My controller has 2 lists of data, both of which are displayed on the view in separate HTML tables. What I want to do is to have a button that will allow you to move an item from one list to the other. What is the best way to do this?
I have done some research and using some form of AJAX seems to be the general consensus on the best way to do this. Is there any other way? The heart of the problem is that I can't figure out how to update the data contained in the contoller based on the button the user presses in the view.
Thanks
I solved this by just updating the model to reflect the new lists and rerendering the page

Drawing a part of a page only after another part was "submitted"

ASP.NET MVC noob here
I was writing a quiz application where a user can select her preferences (e.g. difficulty, number of question etc.), and once she hit a submit button - she got a new page with questions.
The preferences are represented as a "Preferences" object, and the questions are IEnumerable of Question.
This all worked well.
Now I decide both parts should be in the same page - and I don't know how to accomplish that:
Should I have a new model class that is a composition of these two parts?
And also - How will I make the "questions" part appear only after the user completed filling up her preferences and clicked a button?
Should I use AJAX?
I also read a little about partial views and RenderSection.. But I really couldn't understand which approach is the most appropriate for my scenario.
So how should I draw two parts of a page, where the second is only displayed after the first is submitted?
Thanks.
How familiar are you with AJAX? If I had to guess I would think a good way to do what you want to do is to have an AJAX call which is linked to an action when the user submits their preferences. The action can then return a partial view which you can have appear on the page without a reload via AJAX.

Resources