ExtJS - editing calendar events - json

I'm working on the admin panel of a project using ExtJS, and there I have a Panel, CalendarEvents where data for any upcoming events should be added, deleted and of course, edited if need so.
The problem is that the people who are going to administer this admin panel won't be people with computer education, and when they insert data for a new event or change the data for an existing one, there must be an easy to understand interface to do that.
They must be able to add the time of the event, as well as the date, and it makes it even more difficult, at least for me, to think of a way to provide these functions. Until now, we've been using double click and editing the info manually by writing in the cell, but this is going to bring a lot of problems with the right date/time formatting.
So, I'm looking for a good way to implement this option in my admin panel.

Related

"Configure Data Source with Wizard" doesn't want to open

I am building an application that connects to a mysql database. I set up the data connections and data source (data set) and have begun working on development, going back and forth between adding tables and views to the database and adding forms and components to the application.
I have up to now used the "Configure Data Source with Wizard" wizard to refresh the dataset in the application. Sometimes it takes a couple click throughs to get it to fully load the changes, but that's not the end of the world.
Today, without me knowingly changing anything, when I click on the wizard button, the frame of the wizard opens and closes instantly.
My data is accessible, and the parts of the application already developed work just fine, but I don't know how to add new tables and views to my project. My worry is that something went screwy in one of the auto generated dbDataSet.* files.
I'm happy to provide more information if that will help.
To answer my own question for whomever comes here next:
I came across this solution:
https://stackoverflow.com/a/4749044/7640114
It links to a microsoft.com page that is no longer available, but copies the relevant information. Finding the corresponding files is not hard, but knowing what the wrong Provider is may not be so simple.
Mostly because of a lack of patience, I just went with the second option and deleted the entire folder, which may have been overkill. It worked, and I have access to the wizard again and can continue development, but it also wiped out my workspace layout which I now have to rebuild from my memory.
Win some/loose some. In the end, I suggest being more delicate and removing lines of code from DefaultView.SEView first, and then moving on to trying to delete the file and the folder if nessasary.

How to insert entries from a user perspective

I want to build a small Access database to better keep track of the companies we are looking at. I read Access 2010 Inside Out by Conrad/Viescas, did a lot of their examples and had the feeling I understood the basics, so I started with my own data base. Now the struggle begins, I think I have a basic misunderstanding here.
The relation I started with is quite simple: Each company we look at can have listed peers that we want to use to compare this company to. Of course, each company can have many peers and each peer can be the peer of many of our companies. So I modelled this relation as a many-to-many relationship:
Next, I created the form for a company, which looked something like this:
I related the subform I used to show the peers with a query that is based on tblPeersCompanies_1 and gives some additional information. What I now want from a user perspective is straightforward: A user should simply add peers to this subform for the company he is currently viewing. Access should then automatically update tblPeersCompanies_1 and tblPeers_1. The peers really serve no other purpose than to relate them to a company.
However, I struggle implementing this. Adding a new peer to the subform does not work, simply because it is not based on tblPeers_1 and if I enter the information there, Access notices that the peer is not in that table yet. (That is at least what I think the problem is). How can this be achieved though? I don't want the user to open another form, enter the peer first, go back to this form, type the peer again and the other related information. I hope that there must a simple way to do that automatically. Or is this indeed not so simple.
In summary, the question probably can be phrased as: "How to add records to a matching table and a related one-table on the fly in a form?"
Thanks to the great comment by #Remou, I found a solution to this problem. It contais three steps:
Use a combo box as outlined in another SO post
Use this function to automatically enter new records in case the peer is missing. Call this function in the "On Not in List" event
Show other values from tblPeers by linking it to the selected value in the combo box, as explained here
I have to say, this is much harder than I hoped it to be. Let's hope that the learning curve is steep and that it will at least be easy to use for the user and quite robust.

Limit access to a database to a few users. (MS Access 2007)

I would appreciate if someone would help me with this.
I am new to Access and my boss has given me a project to create a tool for our team (I work in insurance). I'm done with most part of the project, but my boss wants editing and updating of database restricted to a few members of our team (yes more than one person can modify) but since the tool is to be used for a wide range of purposes, she would like that the rest of the department (50+ people) can only access certain forms which have buttons etc. that do the job.
So far in this database I have, 3 linked tables (which hold all the data), queries, reports, union queries and make tables and 3 forms. What I would like is for most people to only view forms and use it in form view only, but 4 members of my team to do whatever they want since they need to constantly edit the data.
Does anyone have a hint about where I should begin? Programming is not my cup of tea so I would really appreciate some reference etc. or any help!
If you hit file, then hit options, and then select current database, you can force a specific form to pop up whenever you open the access database. In addition, you can take away the user's ability to go through the entire database's content. you can also take away the navigation bar and menus and such. I have been doing this for a while, so here's some advice. Have a main menu form that has a button for every form in the access file. When the user opens the database, he or she should see that main menu form. From there, they can click on the button that will lead them to the form that will solve the needs they have.
Stackoverflow won't let me post a comment, so here is what I was going to say. For those who you want to have access to it, you can have them hold shift while opening the database. If they do that, they will open the database like they were an "admin" to the database. They would be able to edit it however they would like if they hold down shift.
I have done this via a table, assigning users a specific "Security Level" and checking their security level via a login screen. I then hide the login screen (not close it) so that anytime a form is open it can do a DLookup of the user's security level and then determine if the user has read, write or read/write access to the form. I can also hide buttons on the form based on the same logic.
Starting in 2007, Access removed their native security, which was pretty inefficient anyway.

Microsoft Access: running "safe" mode (i.e. allow changes to be reverted)

I'm using Microsoft Access as a means of managing data (that used to be stored in spreadsheets) in a more tabular, orderly, and logical manner. Everything seems to be working good for my client, but she has one question: "Is there a mode that allows changes to be reverted? Let's say I've made some changes, and I'd like to revert to my original version, is that possible?"
I understand her concerns and as much as I'd like to say "this is how a database works; you make changes to a row and they are written to the row immediately", I can't bring myself to say it. She's been using MS Excel and Excel has the ability of undoing multiple changes, as well as reverting back to the original file if you haven't saved it. To me, I feel that she is afraid that Access will bring about disastrous consequences--one fine day she's a bit groggy and starts making random changes all over, and then she has no means of getting back the original file. Bam.
What I'm asking now is this: is there any way/setting to allow Access to not commit changes immediately, perhaps until the user has clicked some button or something? It's not the way Access works, and please don't ask me to return to good old Excel because I enjoy and appreciate the chill WYSIWYG interface of Access and its familiar database environment. Maybe just not this behaviour, which came along with the databases.
If you are looking for a simple setting to preserve history, or enable undoing or force all changes to be encapsulated in explicit transactions, then you are out of luck as Access provides none of these out of the box.
There are however ways to implement all of these features to varying degrees, from a simple confirmation whenever the records are about to be changed, to create logs of all changes (so that the user can at least see what changed), to duplicating records before they are modified, etc.
Undoing an action can be something simple, like restoring a value you just typed, but it can become very hairy quickly if you want to undo an action that created or modified a dozen other records elsewhere in the database.
It becomes especially difficult if other actions have been performed after that one (by other users connected to the database for instance).
However, a few of things that could help you:
You can track all changes in a form and keep a log of the actions (in another table or just a text file):
Track all changes made to a record in Microsoft Access
KB197592:How to create an audit trail of record changes in a form
Creating an Audit Log
Add an Audit Trail to your database
you can use Access 2010 data macros to automatically trigger some action (like duplicating a record or keeping track of changes) whenever something is updated or added to the database.
Data Macro similar to triggers
Leveraging Data Macros in Access
you can use all forms in unbound mode and manually set the data when the form opens (or change record) and only save it back to the database when the user is completed.
All of these methods require work and testing and need to be adapted to the experience you wish to provide your user.
Another thing you can do is simply make copies of the database as backups at regular intervals, that way, if something goes awry, you haven't lost everything (this is mandatory anyway, I always have at least a daily backup system).

Editable Form and save changes

I'm hoping this isn't harder than it seems.
I want to create an HTML form with a few text boxes that will allow people to enter in some data and I want these changes to be saved to the form.
For example, if my html page says:
Name: [ ]
...I want someone to be able to click on the [] and enter their name, etc. and click SAVE
and then have the form say:
Name: "Name of Person"
If someone wants to update that, they can click on the person's name and change it and click SAVE and have the HTML form update itself.
How can I do this? I've looked everywhere and people are talking about HTML5 AND PHP. Is it really that complicated to make a simple page like this?
(In case I wasn't clear in my html I'm using the contenteditable="true" option. How can I save those changes?)
I think your question indicates that you don't already know that web pages (including forms) are "stateless", meaning that they do not "automatically" hold or store anything that you do with them. Sorry to disappoint, but as a beginner you will struggle to find "an easy" solution to this.
That is not to say it can't be done - you no doubt see it everywhere - but your level of knowledge misses the fact that you need to actually program the logic to determine how your form will "appear" to store the information and reproduce it on a later visit.
Here's a (really) brief summary:
When your form is used by your user, a couple of things have already taken place before they get to see the form:
the user has requested the page (typing a URL or clicking a link)
the web server has sent the requested page (that is; your website has sent the form)
The next thing that takes place is that your user enters some data on the form. This data is not stored anywhere - if you refresh the page the data is gone, because steps 1 and 2 happen again.
So to avoid this you can use a number of tools:
Javascript: this operates on the user's computer. You can use it to find out if something has been entred on a form, and store it in, for example, a cookie.
Then you will have to build some logic into your page that says, "if my user refreshes the page or comes back to this site at a later date, then look for the cookie. If it exists, then take it's values and pre-fill the form, before the user gets to see it."
Server Side Script: This logic can be built into your web server (using a server side script like PHP) so it actually runs in step 2.
Alternatively you can build it into a javascript function which fires when the page is actually received by your user. This would be a step 3.
A second alternative combines these two ideas (processing on the user side and processing on the webserver side) called AJAX, which basically means that the "discussion" between your javascript and PHP takes place "on the fly" when the data is entered or changed.
And lastly you might want to consider PHP Sessions to store data, and/or a mySQL database. Recently with the advent of modern browsers you now have the possibility to store the information in a local database available to your user's browser...
In all of these cases you will need to learn how these pieces talk to each other, how you retreive the information, and how you update your stateless and static form.
It isn't has straightforward as you might think...
You don't need HTML5. HTML4 is good enough :)
But you need some server side script that saves the changes (on the server side in e.g. a DB or XML file). To make it a better experience (if multiple users use the form at the same time) I suggest you use AJAX to save the changes and poll the server for updates.
This is not complicated (at least I don't think it is), but it seems to be a generation ahead of what you already know. And it could take quite a long time to get the structure in place before you can do this sort of thing without needing help.
There are some basic questions
Does the information need to stay saved when the user hits reload?
Does the information need to stay saved when the user clears cookies?
If the information can be blanked out next time they come back to your page, then it is simple.
Otherwise, we need a way to keep track of which user sees what information, so the guy in Texas does not see the information the guy in Chinatown typed in. Cookies are a common way to do this. You could save the information to the cookies if there is not too much information.
Otherwise, you need sever-side language. This is usually in PHP, but deciding what language has to do with why you want to learn in the first place? Are you wanting to work for a company later on? Do you have your own website?
Please comment to let me know more what is going on, and what the answers are to the two basic questions, and I will better be able to answer.
Usually, for most cases, there is a login name and password (or OpenID), and if cookies are cleared, the user logs in again, but this requires some work to set up a working login before you re-visit this question of how to store what they type.