How to use ionic model to view and edit data? is it good approach? - ionic2

I have saved data in sqlite. Now i want to edit data. I want to create a model and give list of saved records in it. when user click on any row display on model it will go into edit mode . Is it good approach or should i create another page ??

I think to provide them with edit button/icon and when they click on edit button you can change all labels to Text edit format.
reasons -
This will be a mobile app, hence user needs to touch on the screen to scroll/change to another page. if the user mistakenly clicks on the label then the label will get change to edit mode and I guess that's bad user experience.
Every time you need to save the changes when the user clicks on the label (more database operation for a single word change).
Instead of this just provide edit button/icon, when they click on edit button, make the same page change to edit mode and show them save button (replace edit button).
Hope this will help you.

I don't see the link with the data model. However, when it comes to design, it is better if the user clicks on a row to open a new page.
If you want to switch to an edition mode, then you need a button dedicated to this feature.
Think "WYSIWYG" --> "What You See Is What You Get".

Related

How can I view all the content of redmine, such as projects and tickets, easily on the screen?

I'm using REDMINE.
I have a list of projects on the screen.
Is it possible to add details of the ticket content to this screen?
I'd like to look over the screen at once instead of clicking with the mouse, how do I do that?
Also, if you have any plugins or useful tips and so on, please let me know.
Tamazawa, I believe you might be referring to "My Page" of Redmine where you could use widgets to decide what you see on that dashboard - keep in mind that such dashboard s project independent, so it can display issues from many projects that you are a member of on 1 screen.
For instance from My Page, you should be able to select an "Issues" widget to Add and set it up to pull a list of items to display using a saved custom query.
That should give you a snapshot of tasks at hand, without the need to click around the screen too much.
You may need to set up your saved query such that:
Description and / or
Last notes
are checked (if you want to see issues at a glance, without the need to open each one separately).
Alternatively, you can skip that "My Page" idea altogether, if you're ok with just opening a saved query with Description and / or Last notes selected.

django form add new rows upon changing to edit

Here's my use case:
I'd like to display the information about something first using django_tables2, with a button on the top right corner called "Edit", once a user hits "Edit", at the bottom of the table, display a button called "Add New Record", and once the user clicks that button, a bunch of input fields pop up to let users enter values for each field, also the user could continue to click "Add new Record" to keep adding new.
How can I achieve this in Django?
I've read a lot of examples on stackoverflow but didn't find anything tailored to this particular case.
Thanks a lot.
Let's dive right into listing out what you want to do and the requirements you'll need to do so.
You basically want to toggle hiding and showing some functionality for this web page. This is easily accomplished by including the "Edit" button, "Add New Record" button, and popup (most likely in its own <div> somewhere in the page). So the "Edit" button will have the display set to something, be it inline, block, etc., while the "Add New Record" and popup would have a display of "none" or however it is you wish to hide it.
You've got the stuff set up and ready to go but now you need to show it when you click the "Edit" button. This is generally accomplished through Javascript. Just find the "Add New Record" button and switch the visibility.
When you click on the "Add" button you want to display a popup. This can be done in a variety of ways with different libraries. One of my personal favorites is using jquery's blockUI. Why? It doesn't allow the user to click anywhere except in the popup so it's a quick way to handle users trying to reach outside the scope of the popup.
So you've got all the new rows added and you are done editing. Maybe you have a "Save" button or something like that where you can click. When you do, you'll want to push all those new rows you just added to the database. Django handles this well and you could do something like include the new rows in part of the POST request or however you care to implement this solution.
So there's a bit of work ahead of you to get this page up and running with the exact functionality you need but hopefully this starts steering you in the right direction of where you need to go.

Can I add a 'shortcut' link to a Django form which edits a field and saves everything?

I have a Django (crispy) form with many tabs which all contain many fields. Each of these tabs has an Active boolean field. The first tab of my the form contains an overview, listing all the tabs.
Now I would like to know if there is some way to have a link on that overview tab which would in theory toggle the corresponding boolean field on one of the tabs and save the result. Right now the user can go to the specific tab, check or uncheck the value and save it, but they want some sort of shortcut so they can do it in one click.
Would that be possible at all? And how could I achieve this ?
So clicking the Activate / Deactivate in this list should be the same as :
Going to the corresponding tab and checking / unchecking the available field and pressing the save button.
You can use javascript and do onchange for checkbox. In the script you can call the views to save the value to database and return to same page.

how to set the rights for placeholder ribbon

beginner question for sitecore about settings the right.
So I have an item is open in the page editor.
The renderings on the page has bunch of icons on the ribbon. One of them called 'select the parent element (element name)'.
In my case when I click on it, I am presented with the placeholder with button 'add here' and the ribbon with some component buttons that a user can use to add the controls.
So, QUESTION:
"how I add access to the button on that ribbon for certain role? Where do I set it up? "
For some certain role that placeholder's ribbon is completely empty, including there is no button 'select the parent element' even though
i know there is a parent element.
thank you very much for help,
HF
Here are the screenshots (no icons on the placeholder ribbon, and the user's rights:
enter image description here
And here is how that looks for the admin:
All the settings for the Page Editor are held in the Core database. So in the Sitecore Desktop, switch to the core database and open up the Content Editor.
Navigate to : /sitecore/content/Applications/WebEdit
This item holds the items that make up the page editor. To edit the ribbon menues, go to:
/sitecore/content/Applications/WebEdit/Ribbons
I don't remember seeing that particular button in the Core database, so this is likely a built-in feature that requires the user to have one of the built-in permissions.
The first thing I would check is that Designing is turned on. Have the user go to the 'View' tab in Page Editor and make sure they have checked the 'Designing' checkbox.
If that doesn't work, it sounds like the user you have does not have design access to the page. I would examine the inherited roles using the User Manager and check if they have the Sitecore Designer role inherited.
It is possible they just need to be provided the correct role in the system so that they can access the buttons.
Have you tried the "Sitecore Client developing role"?
Also, for the blue arrow drop list location, in order for the rendering button to show up in that location, you have to check whether the button in the webedit folder under core database(/sitecore/content/Applications/WebEdit/Default Rendering Buttons). The Type field needs to be "Common" in order to show up in the blue arrow droplist.
Example can be the "Edit related item" (/sitecore/content/Applications/WebEdit/Default Rendering Buttons/Edit related item) shows up in the blue arrow droplist.

windows forms, how to launch a separate window with datagridview?

I've some data that can be shown on grid attached on a panel. When user clicks some button i'm showing this panel. Now i wanted to launch this grid in a separate window(should be a child to existing window) and want to make the grid editable, click controls...etc, is it possible?
thanks in advance.
You should be able to achieve this effect by placing your grid on a separate form, complete with editing stuff. Disable the form and set its parent, (see control.parent), to be the main form panel. When the user wants to edit it, set the grid-form parent to nil and enable it.
Not actually tried this with WinForms, but it works fine with Delphi VCL so worth a test if no better answers are forthcoming
Rgds,
Martin