Skip to content

FIrst import of web frontend#70

Open
patrickpr wants to merge 2 commits intoGroundApps:develfrom
patrickpr:devel
Open

FIrst import of web frontend#70
patrickpr wants to merge 2 commits intoGroundApps:develfrom
patrickpr:devel

Conversation

@patrickpr
Copy link

For testing and feedback.

  • Password check not working (and BYPASSED any password will work).
  • It only reads the DB through api.php : waiting for api.php implementing checked/category columns to make some writing.
  • Create/modify amount/delete item.
  • Category change with drag/drop

@ghost
Copy link

ghost commented Oct 17, 2015

Why you use the old version from query?
Why you use not this:

Please style the form like the form from the INSTALL.php it is important that all designed pages look like the others

@patrickpr
Copy link
Author

Why you use the old version from query?
Because I copied the wrong file and didn't notice. I will use 2.1.4 version

Why you use not this:
Bootstrap
https://fortawesome.github.io/Font-Awesome/

 Because I still like jQueryUI for small pages like this.  

Please style the form like the form from the INSTALL.php it is important that all designed pages look like the others

 OK. I didn't do any css and styling for now.

@ghost
Copy link

ghost commented Oct 18, 2015

Ok. But we have choose a design, and it didn't look really pro like, when we have for everything different designs.
You work is really amazing, but please change the design.

@ghost ghost added the enhancement label Oct 18, 2015
@patrickpr
Copy link
Author

Ok, I'll see if I adapt the design or switch to bootstrap.
note : I found the problem with password check.

@jklmnn
Copy link
Contributor

jklmnn commented Oct 18, 2015

I see a big problem there. You have created a index.php. Actually we currently rewrite api.php to index.php with a .htaccess. That will cause problems. It seems that your .htaccess was not used, otherwise you should never have seen the index.php but the api.php.
Also I don't know how the app behaves with the php session key and I also don't know how the default php settings behave with session(). Maybe there should be an addition then in the install to set te config properly.
We also cannot just change the .htaccess because some people might have the / or index.php in their app and would get errors.
Therefore I recommend:

  • since the app has its own user agent, check for that (also document the exact user agent an app has to have if it wants to access the api).
  • depending on the user agent, deliver either the json or the web page (json for app, web page for all others)
    EDIT: typos

@J-8
Copy link
Contributor

J-8 commented Oct 18, 2015

Since the update, it doesn't matter what the index file of the directory is, api.php will always be used. So that is one problem less to solve :)

@patrickpr
Copy link
Author

First, the name of the php file can be changed very easily and hasn't got to be index.php

It won't be possible to use the user agent to deliver json or web page, because the ajax calls in the web page need to access api.php and use the browser user agent (it's a w3c recommendation).

The simplest thing I can think of is :

  1. Test : method == post & post_var['auth'] exists
  2. If false -> deliver web page
  3. if true, test post_var['ajax'] == "True" (I will add this in all ajax calls)
  4. if false, continue "normal" api.php
  5. if true, start php session and check session variables for auth

@patrickpr
Copy link
Author

I changed the design (see below) to have a bootstrap look & feel and changed the login page.
I'm also checking PHP session requirements and specific config (if needed).
What are your feedbacks on query routing depending on method/variables ?

capture2

@patrickpr
Copy link
Author

Login page :
capture3

@ghost
Copy link

ghost commented Nov 26, 2015

What we could do to fix this is, that we will create a subfolder like, /web and then on request you cloud create a subdomain or somethink like that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants