Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

For next version is it possible to split main page into three access pages #59

Open
antonyf opened this issue Apr 4, 2013 · 19 comments

Comments

@antonyf
Copy link

antonyf commented Apr 4, 2013

I integrated this script into my own sight. I changed most of the coding and gave it a bootstrap template. I removed most of the functions and reduced the Ajax calls to the database. I found there was too much unnecessary code in the script and for me too.. While i was busy with this i Realized that the Single index.php page carries all the code for all user types.. IE: admin, read/write, readonly..

Could the future version not have three pages instead: administrator.php readwrite.php and readonly.php (as example only). useful for sight integration makes it easy to apply ones own internal user system.. (Just an observation..)

regards Antony

@alex-LE
Copy link
Owner

alex-LE commented Apr 4, 2013

Hey Antony. Thats a good idea and i've already started something similar
(have a look at the pages folder).

It will be nice if you can share your changes with me, so maybe i can
integrate them directly. Bootstrap is really nice and you are right, some
code is senseless.

@antonyf
Copy link
Author

antonyf commented Apr 5, 2013

hi Alex.
I did take a look at the pages folder.. The script uses a setpage: function.. I just converted that into a bootstrap modal function.. i also removed all the inline editing and just made everything point to the advanced popup form, Which saves instantly before data hits the db.. Then in the bground the item id is put into place..
Layouts: i used bootstrap tabs(pills). Also i made it so: if you click a list, it opens in its own tab.. IE: (as example).. Todo tab has id list_4. On active(pressed) it opens a container with id cont_4 and loads all the items in the db with list_id = 4 to that container.. if the container is length then it does not call to the db again..

also i used one menu fits all, placed it down the left side column.. and a few other tweaks.. I really simplified it, i also removed the publish function and feed.php and the alltasks tab is my first tab and the add lists is my last tab, they are both unsortable..

I am busy on two other projects at the moment, but i am almost done with the todo .. I am just bussy splitting the users privlege pages...

I also removed the Read only or public tasks.. for my use it made no sense . I only have admin and read/write access..
if you want the code ill send it to you when im done .. but if you just want the functions javascript and php i can put those on a file and send them to you Alex..

I should be done by monday late afternoon.. i got the weekend to play with it some more.. Let me know..

Best regards
Antony

@antonyf antonyf closed this as completed Apr 5, 2013
@antonyf
Copy link
Author

antonyf commented Apr 5, 2013

Still a bit rough but taking shape..

Capture2




Capture3

@antonyf antonyf reopened this Apr 5, 2013
@alex-LE
Copy link
Owner

alex-LE commented Apr 15, 2013

Hey Antony, how is your work going? Do you want to share your changes?
Alex

@electricmessiah
Copy link

Hi guys.. I'd like to check out antonyf's changes as well. Looks like there's some good suggestions in there and I'd like to see how he simplified things.

@antonyf
Copy link
Author

antonyf commented Apr 18, 2013

Hi.. Sorry for the delay response.. I don't know why but i suddenly got loads of extra clients.. (not complaining though)..

OK! my updates are almost completed. Basically the way i have edited the todo is as follows: It loads the -1 list(everything), there after everything is dom manipulated.. I added some extra "rel's" and "Classes" to achieve this.. The result is a super fast to do list..

i have all the feature that the existing todo has, like independent lists will show notify, show/hide complete, delete complete for specific lists etc etc etc ..
Other features are: i used the "multiuser names added" to create a dropdown to asign the task to a specific user (optional ofcourse).. I removed some features, like sort by hand in the task list.. and tags.. (these you can always keep the existing code.. For my needs i removed them. (i can always just add a task to a specific tab.)). Other enhancements are i marked the first 5 tabs as having slightly different colors according to importance, i kept the tabs "sortable". . The timetable i maid so that once loaded, every tab that is clicked will load its own timetable, when all tasks are clicked it reverts to normal view, also if the original button is clicked.. I shifted the config to the database and deleted the file.. There is more control over the config there and is user specific.. so anyone who logs in can set their own views and etc etc .... and there is loads more..

I will say i did learn lots new things from the code, I have enjoyed this project and the original script is great and very correctly written both in php and html and JavaScript. The code is done by the book.. I just shortened it a bit..
I removed about 8 pages from the code, and when im done will also include the now only 13 lines long "yourtinytodo_ajax_storage.js" too..

the last few things to do are:
the php save function for the todo (ajax and php for new tasks only)... the editing tasks is complete and instant...
the moving tasks (5 minutes there.. ), and getting the default settings onto the main-page which i just figured out..

i will give my version to Alex to do as he pleases with it.. However if you want to stick to the original script would suggest taking my code over as needed.. I also removed the language files :( and made everything english.. Why i did this?? all the heading and etc etc etc are all standard english, and the google translator is very apt in any language.. As I'm including this into my own sight project, i already have Google translator incorporated.. You can either put the several files back! or include a version of google translator script..

One more thing i included tinysort.js the sorting is all done in the dom now instantly.. I reduced all the calls to the DB.. and where possible all the callbacks too.. Mostly only errors (if any)
would be returned, everything else is one-way only..

I have some time now for the next day or so.. I am getting on the script now.. Maybe today still or tomorrow ill have it done..

regards..
AntonyF PS: the demo is no longer working:(

@antonyf
Copy link
Author

antonyf commented Apr 21, 2013

Update: Its nearly complete. I have just several functions to rewrite, i also just finished the user mark-up.. I converted the user system into a:

multi signup and admin app.. So everybody can run their own todo, as-well as their own user groups.. I did see it was a request somewhere too? (i still have to add the "ORNOT" option somewhere.)

just finalizing a few things now and then i can pass it on to Alex for ???

@alex-LE
Copy link
Owner

alex-LE commented Apr 21, 2013

Hey, sounds very nice! Maybe i can use your changes for a whole new version of yourTinTodo. I thought about starting from scratch as the structure and most of the code is old and not like i would write it. So i'm very excited of seeing your version.

@antonyf
Copy link
Author

antonyf commented Apr 22, 2013

Hi Alex.. its not long now.. Its my days mission to complete it today.. I've allocated the entire day to finishing it..

Yes! I thought the code was old school too, But very well written.. Although there were too many unnecessary functions for functions.. and database callbacks.. and ajax..

ill post you later..

@electricmessiah
Copy link

Looking forward to seeing this build.

@jeangld
Copy link

jeangld commented Apr 23, 2013

Hi Antony, the screenshots look really nice. We can also test it if the new versio is somewhat "responsive", so it can be viewed nicely on clients with less screen space.

@electricmessiah
Copy link

Did anyone ever get the code to preview?

@alex-LE
Copy link
Owner

alex-LE commented May 1, 2013

As i know he his still working on it.

@antonyf
Copy link
Author

antonyf commented May 5, 2013

Sorry for the long delay.. (can i just say! i was organising international papers all week! (home-affairs)).

I'm completing the last functions now.. I am making php handle all of the following:

(Using php there is no need to show the below information or have it exposed, it is all done server side)

yourtinytodo.init({
    needAuth: <?php echo $needAuth ? "1" : "0"; ?>,
    multiUser: <?php echo $multiUser ? "1" : "0"; ?>,
    admin: <?php echo is_admin() ? "1" : "0"; ?>,
    readOnly: <?php echo is_readonly() ? "true" : "false"; ?>,

    <? if(isset($_SESSION['userid'])) {?>
    globalNotifications: <?php echo (NotificationListener::hasGlobalNotifications($_SESSION['userid'])) ? "true" : "false"; ?>,
    userId: <?php echo (!empty($_SESSION['userid']))?$_SESSION['userid']:'null'; ?>,
    userRole: <?php echo (!empty($_SESSION['role']))?$_SESSION['role']:'null'; ?>,
    userName: '<?php echo (isset($_SESSION['userid']))?getUserName($_SESSION['userid']):''; ?>',
    <? } ?>

    isLogged: <?php echo ($needAuth && is_logged()) ? "true" : "false"; ?>,
    authbypass: false,     // false or true 
    notification_count: <?php echo ($notifications_count === false)?"false" : $notifications_count ?>,
    show_edit_options: <?php echo (!isset($_SESSION['role']) || $_SESSION['role'] < 3)?'true':'false'; ?>
<?php if(isset($_GET['list'])) echo ",openList: ". (int)$_GET['list']; ?>
}).loadLists(1);

before the info is loaded..
By default the all tasks tab is the main tab.. Meaning that everything loads at one time and only once.. there after everything is DOM handled.. from edits to new entries are all handled in by DOM manipulation..

I managed to remove massive chunks of Javascript and also reduced the php by many lines.. as well as removed many functions from both javascript and php..

im on the last steps now..

just a bit more patience

@antonyf
Copy link
Author

antonyf commented May 11, 2013

I think im done.. here are some more screens of the current version i worked on...

i can add more params for (appointments, email reminders, phone calls etc etc etc.. ), I can also attach reminders to users emails, everything is just a quick tweak now..

I just still have to add a registration function for a standalone version ..

alltasks
editnewtask
lists
login
search
settings1
settings2
settings3
tasklist
timetable

@alex-LE
Copy link
Owner

alex-LE commented Jun 6, 2013

Hey Antony, what the current status of your work?

@antonyf
Copy link
Author

antonyf commented Jul 9, 2013

Hi Alex. You wont believe it. My now ex-girlfriend spilled a glass of water on my open laptop. It fried my hard drive, i lost everything.. I only got a new laptop last week i spent all this time customizing it. i used xamp to create the version above. I do have my version that i implemented into my website, but its way more simple then shown above..

What i will do when im up to it is pass you the code to save the settings in the DB instead, And also the fix to make it a multi-user system.. I don't think ill tackle it again, for awhile at least..

@electricmessiah
Copy link

You should have committed the code as a fork here on git. 👎

@alex-LE
Copy link
Owner

alex-LE commented Jul 18, 2013

Hey Antony,

i'm sorry to hear that. But the live will go on, its just a peace of
electronic and some lines of code, doesn't matter. I'm happy that you would
still work on it.
Let me know if i can do anything.

Alex

2013/7/9 antonyf [email protected]

Hi Alex. You wont believe it. My now ex-girlfriend spilled a glass of
water on my open laptop. It fried my hard drive, i lost everything.. I only
got a new laptop last week i spent all this time customizing it. i used
xamp to create the version above. I do have my version that i implemented
into my website, but its way more simple then shown above..

What i will do when im up to it is pass you the code to save the settings
in the DB instead, And also the fix to make it a multi-user system.. I
don't think ill tackle it again, for awhile at least..


Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-20666576
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants