Commit Graph

421 Commits (f8bf9e99c4c52b8648e652f8717f33393fb1a939)

Author SHA1 Message Date
Julian Lam f8bf9e99c4 fix: pass module name to `static:script.init`, +comments
I feel it is difficult to know exactly what the original use-cases were for these hooks, so some comments may be helpful.
Barış Soner Uşaklı 05be1c6603 feat: restore action:script.load, allow modifying loaded module via static:script.init
Julian Lam 8b09292e77 chore: add deprecation notice in comments for ajaxify.loadExtraScripts
Julian Lam 7da1b43f2b fix: script failure if client-side page script does not exist
Julian Lam faf5960373 fix: bug where `action:ajaxify.end` was never called if there were no init scripts
Julian Lam 8e5687a4af refactor(hooks): deprecate `action:script.load` client-side hook
Use `static:script.init` instead.
Julian Lam 1d77572117 feat(hooks): update action:ajaxify.end to use new hooks module
Julian Lam e5edbc6faf feat: automatically attempt socket.io reconnection on ajaxify
Also, updated messaging and toaster to accurately reflect offline-mode state
Barış Soner Uşaklı c1ecfd1ebf feat: , don't try to reconnect forever
Barış Soner Uşaklı 5d00b0895b fix: sso redirect on /login & /api/login
Barış Soner Uşaklı 698718f87c feat: allow modifiying browser title on ajaxify
Barış Soner Uşaklı 73746bb489 refactor: remove old hack
Barış Soner Uşaklı 6f68f4d20a fix: , fix login redirect for sso plugins
Barış Soner Uşaklı 5ceda14874 Revert "fix: , popstate to purged topic should go to homepage"
This reverts commit 39dae0aaff.
Julian Lam 39dae0aaff fix: , popstate to purged topic should go to homepage
Barış Soner Uşaklı 5fa098326f fix: https://github.com/NodeBB/NodeBB/pull/8685
fix category link redirect on cold load
fix helpers.redirect if passed in url is external
fix ajaxify so it doesn't slice first character of external url
Peter Jaszkowiak e128264b66
refactor: change Benchpress.parse to .render ()
It has been deprecated with no warning message for a while
Changing these over before enabling the warning message to reduce spam
Barış Soner Uşaklı c107649b40 fix:
Barış Soner Uşaklı 6669b23d9a feat: single href
Barış Soner Uşaklı 5002e0f62c feat: refactor app.js
Barış Soner Uşaklı 3cd3b7a172 feat: remove app.template
Barış Soner Uşaklı 630bac2aa5 feat: remove global window.templates
Barış Soner Uşaklı 94da9fe55e feat: add partials/footer/js.tpl
add ajaxify.coldLoad which gets called from partials/footer/js.tpl
Julian Lam 9adaccd036 feat: +assetBaseUrl, -l10BaseUrl, -requireBaseUrl
Additional base URLs were necessary for benchpress and translator,
and in order to not clutter the API response with needless one-
time use base URLs, I decided to use a single base that is used
by all of the services, assetBaseUrl.
Baris Usakli 9f78bd7a12 fix: sitemap ajaxify
Julian Lam 289dada5f7 fix(deps): update to eslint@6
Julian Lam a97e97b9c3 fix: incorrect pathname format for app.previousUrl
Julian Lam 7e5cb72a59 fix: save pathname into app.previousUrl ins. of entire url
Julian Lam a41769e61c
feat: update meta tags on ajaxify (), fixes
* feat: wip -- refresh meta tags on ajaxify

* feat: wrapped up meta tags update on ajaxify feature

* fix: removed commented-out line

* fix: removed another commented-out line
Julian Lam 8aebe88417 fix:
Baris Usakli c343b93a37 optimize ajaxify
- do not call $.timeago twice on topic load and for widgets
- do not use toLocaleString for each timeago string, use a single
Intl.DateTimeFormat instance instead
- do not call format for empty timeago strings, ie a post that isnt
edited doesnt have a timeago string
- do not call isTouchDevice for every element
- remove app.replaceSelfLinks, this is superceded with /me route
- store references to jquery objects in navigator instead of creating
them on every scroll
Barış Soner Uşaklı 4293403451 , use templateToRender clientside if its avaiable
Julian Lam a3e724e134 resolve window opener being set if ajaxify overrides on external link
Barış Soner Uşaklı d60d03d00f closes
Barış Soner Uşaklı d5e85c2eb3 closes , closes
Barış Soner Uşaklı 6940612688 closes
Barış Soner Uşaklı 8ed86aaf13 closes
Julian Lam 877b45ab00 adding old path to uploads as well, to ajaxify shirt-circuit
Julian Lam bdbdf510e0 closes
Barış Soner Uşaklı 802ec0e384 remove reduntant code
Barış Soner Uşaklı 76e8bcd80b closes
Julian Lam 94e8b2b38d Added ajaxify.isCold()
And used it in app.js, so window.scrollTo(0, 0); is not called
on cold load (since you're already at the top). Useful in low-
bandwidth modes since you might accidentally get kicked to the
top of the page due to a slow connection and delayed .init().

Slightly related to testing in 
Barış Soner Uşaklı cb4930dac8 remove version and environment from config
Barış Soner Uşaklı b74fe98dc4 closes
Peter Jaszkowiak dc87d7fc0f Use .js instead of .jst
Fix 
Peter Jaszkowiak dc3f89a505 ajaxify t.js usage to Benchpress
Peter Jaszkowiak abffc29128 Use Benchpress ()
* Use Benchpress

* Use Benchpress.compileParse

* Error for template load failure

* Use benchpressjs package

* Compile templates on demand

* Fix user settings page

* Fix admin search to exclude `.jst` files

* Fix 500-embed

So ajaxify can still show an error if the server goes down
Barış Soner Uşaklı 923bd86662 Widgets refactor ()
* widgets refactor

render widgets server side
widgets can use all the data the template can use

* fix tests
Baris Usakli e0de922ede Revert "widgets refactor"
This reverts commit 9e94edb5aa.
Baris Usakli 9e94edb5aa widgets refactor
render widgets server side
widgets can use all the data the template can use