LibreHealthIO / lh-ehr

LibreHealth EHR - Free Open Source Electronic Health Records
Other
238 stars 261 forks source link

JQUERY UPGRADE #416

Open aethelwulffe opened 7 years ago

aethelwulffe commented 7 years ago

My understanding of JQUERY:

https://github.com/jquery/jquery-migrate/ is a tool we can use to identify and migrate jquery versions. In my opinion, we should be able to test everything with this, upgrade code where needed and all that.

Tasks:

Check off deprecated functions as they are searched for and upgraded.

1.3

teryhill commented 7 years ago

I sent up 3.1.1 and the migrate tool. Do you want to send the ones that are currently used in portal and upgrade them later?

teryhill commented 7 years ago

Any particular global name you want ?

aethelwulffe commented 7 years ago

No opinion. Make it unambiguous. (means "talk plain").

teryhill commented 7 years ago

so calling it $globals['the stuff that does the cool stuff] is probably out huh?

$GLOBALS['js_path'] $GLOBALS['images_path'] $GLOBALS['css_path'] $GLOBALS['fonts_path']

aethelwulffe commented 7 years ago

No usage of calls like this->Thingie and stuff. I think a "jquery_currentver or the like might be useful. Anyone else on that?

teryhill commented 7 years ago

$GLOBALS['js_path'] = "$web_root/assets/js"; then we could put the current version in a directory called current_version and keep the ones that are needed as jquery-2.2.0.min etc

aethelwulffe commented 7 years ago

.selector appears to used in the zend module care coordination. It has it's own copy of jq though. The TAGS code has TWO copies of the jquery migration package in it. .andSelf() is in the "custom" 1.8.21 versions. Obviously "Custom" means "retain deprecated functions". require.js in /tags_filters has a lot of .load() calls, I think so if you are using a Playstation 3 everything still works... this is a resource though, and I don't see it used in the code.

Care Coordination uses .toggle() summary_pat_portal.php uses .toggle() The default ajax templates for day, week month like: month/ajax_template.html uses .toggle() patient_report.php uses toggle()

aethelwulffe commented 7 years ago

I think we can keep the package/file name whatever it actually is, then just adjust the global to reflect that...or we can do any number of things. Do something, and then we will let the smart people yell at us.

teryhill commented 7 years ago

summary_pat_portal.php uses .toggle() is going away with the new portal so mark it off the list. since the tag's has it's own assets directory I vote we leave it and let @kchapple make the changes if he feels they are needed. lets just concentrate on the core items.

kchapple commented 7 years ago

Thanks terry. Great work.

Ken kenchapple.com facebook.com/kenchapplemusic @ken_chapple

Check out my latest CD, Crossing the Black at https://itun.es/us/SGGI9

On Feb 11, 2017, at 2:42 PM, Terry Hill notifications@github.com wrote:

summary_pat_portal.php uses .toggle() is going away with the new portal so mark it off the list. since the tag's has it's own assets directory I vote we leave it and let @kchapple make the changes if he feels they are needed. lets just concentrate on the core items.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

teryhill commented 7 years ago

ready for the Yelling?

teryhill commented 7 years ago

I am going to start pushing up the portal assets and then we can sort out what we need.

aethelwulffe commented 7 years ago

Terry, the calendar still uses .toggle(), so unless that is in ajax and is a different function/library completely, we still have an issue.

teryhill commented 7 years ago

Lets just put that version of jquery in the assets and wait till google fixes it 8^)

aethelwulffe commented 7 years ago

patient_report.php uses .toggle() with phimail to send CCR and CCD. It looks like the biggest concern is in the versions of ajax_template.html under PostCalendar.

aethelwulffe commented 7 years ago

Yeah, by all means, we get the new version of JQuery in, and a global pushed for assets. I'm just sweating the actual migration at this point.

aethelwulffe commented 7 years ago

415 merged up.

It's Machete Time again! ..now where is that bar oil and the fine tooth chainsaw?

teryhill commented 7 years ago

just hack the jquery's for right now. I will do another commit to get the rest of the portal assets up there and then I will make the changes to point it to the assets and then we repeat the process on the portal I know a couple version of jquery are used.

aethelwulffe commented 7 years ago

They might just be 1. and 2.x, which is just for compatibility sake. If that is so, and they don't have the deprecated functions, and there are no custom version and function calls, then we would be OK with 3.x

On 2/11/2017 3:12 PM, Terry Hill wrote:

just hack the jquery's for right now. I will do another commit to get the rest of the portal assets up there and then I will make the changes to point it to the assets and then we repeat the process on the portal I know a couple version of jquery are used.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/LibreEHR/issues/416#issuecomment-279172470, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF59O8ZvbNQX04I78CpCrEvKvbEwTks5rbhY4gaJpZM4L-Qk7.

teryhill commented 7 years ago

From what I read about that migrate tool it should fix the problems as long as they aren't fatal.

aethelwulffe commented 7 years ago

Yeah, sure, but I haven't figured anything else about it...like how the heck to use it. Is it just adding: `

` ...and then go to town?
teryhill commented 7 years ago

That's what I got

teryhill commented 7 years ago

I see that they have a 1.4.1 version to get to 1.9 +

aethelwulffe commented 7 years ago

I think you only have to be on version 1.3 or higher for the 3.0 to work. That is what the docs say anyway...I think.

aethelwulffe commented 7 years ago

Hope we can get back to this pretty soon!

aethelwulffe commented 7 years ago

561 is a move intended to promote migrating the js includes.

teryhill commented 7 years ago

I am working on 1.3.2 clean out. Moving to 1.7.2 or greater where possible.

aethelwulffe commented 7 years ago

569 Moving most of the datatables package stuff over. There is some...delicate...stuff in /tags that I am leery to touch at the moment that seems like assets that could be merged with this package, and there are css bits as well, but I am just leaving most of the structure be right now.

aethelwulffe commented 7 years ago

This is all checked off now. Took four months, but I am pretty sure we can just call the latest JQUERY anywhere we need. We now have a scheme and an institutional awareness of using the assets directory and header loading include. Still have lots of stray js packages all over the place, but this specific issue is done.

nileshprasad137 commented 7 years ago

@aethelwulffe Yep. There are many places where jquery 1.x are used which were using.load() which got removed in 3.0. We will need to replace that with .on("load",function(){})

aethelwulffe commented 7 years ago

Crap. Sorry I closed this. I thought I searched for "load(" and came up blank. I must have not formed my search parameters correctly. Sublimetext has a good search history though, so I can see where I screwed up.