summary refs log tree commit diff
path: root/src/librustdoc/html/static/main.js
AgeCommit message (Collapse)AuthorLines
2017-05-19Rollup merge of #42096 - ollie27:rustdoc_js_impls, r=GuillaumeGomezMark Simulacrum-3/+3
rustdoc: Fix implementors list javascript * Use a different loop variable, `i` was already taken. This caused missing items in the implementors list. * Use `.getAttribute('href')` rather than `.href` to get the relative URL which is what it needs to actually fix the links. More fallout from #41307. r? @GuillaumeGomez
2017-05-19rustdoc: Fix implementors list javascriptOliver Middleton-3/+3
* Use a different loop variable, `i` was already taken. This caused missing items in the implementors list. * Use `.getAttribute('href')` rather than `.href` to get the relative URL which is what it needs to actually fix the links.
2017-05-18Make documentation works again by removing two unnecessary ES6 pieces.pravic-3/+3
2017-05-12Fix anchor invalid redirection to searchGuillaume Gomez-4/+8
2017-05-02Remove jquery dependencyGuillaume Gomez-233/+456
2017-04-06rustdoc: collapse docblock before showing labelAndy Russell-4/+11
2017-02-26Improve associated constant rendering in rustdocGuillaume Gomez-1/+1
2016-12-12rustdoc: Fix short summaries in search resultsOliver Middleton-16/+5
They should be run through a Markdown renderer in rustdoc to remove links. This also fixes the mouse over text for the Crates list on the sidebar.
2016-11-30rustdoc: link to cross-crate sources directly.Eduard-Mihai Burtescu-9/+0
2016-11-12rustdoc: fold fields for enum struct variants into a docblockQuietMisdreavus-0/+16
2016-11-06Set attributes hidden by defaultGuillaume Gomez-8/+24
2016-11-06Improve attributes display and allow expansionGuillaume Gomez-0/+2
2016-09-03Support unions in rustdocVadim Petrochenkov-1/+2
2016-08-13rustdoc: Don't include the path for primitive methods in the search resultsOliver Middleton-2/+7
Displaying `std::u32::max_value` is misleading so just display `u32::max_value`.
2016-08-13rustdoc: Fix links to static items in the search resultsOliver Middleton-4/+0
2016-06-19rustdoc: Add more types to the sidebarOliver Middleton-1/+5
They're displayed in the same order as they are on modules pages.
2016-05-22Fixed shortcut handling. Reverted to [Shift]+[+=]Alex Ozdemir-2/+2
Realized browsers use [Ctrl]+[+=] for zoom, so using [Shift]+[+=] for collapse/expand was not necessarily a conflict. Also a bugfix.
2016-05-22Changed toggle all sections key to `T`Alex Ozdemir-1/+2
Allows both `T` and `t`. It had been [Shift]+[+] before.
2016-05-20Added a `rustdoc` shortcut for collapse/expand allAlex Ozdemir-2/+8
Now when the user presses the "+" key all sections will collapse/expand. Also added a note to the help screen which describes this behavior.
2016-04-25Improve accessibility of rustdoc pagesmitaa-1/+1
2016-03-25Avoid page reload upon hitting "S" when browing in local modeNovotnik, Petr-2/+0
2016-03-18Fix usability problem when browse document locallyYork Xiang-2/+6
2016-02-22Auto merge of #31715 - mitaa:rdoc-index-crate, r=alexcrichtonbors-0/+13
This allows to search for crates in documentation and simplifies the json serialization of the search-index. fixes #14077
2016-02-16Add crates to search-indexmitaa-0/+13
2016-02-16doc pages: add the ability to search unknown typesBrandon W Maister-3/+3
This enables `*` in all type positions in doc searches, which I often want in order to find functions that create or convert specific types (e.g. `* -> vec`) but I don't actually know what kinds of input they expect. I actually started working on this because of #31598, but I've wanted it several times when exploring new crates.
2015-11-05librustdoc: don't override ctrl-s and other browser shortcutsIvan Kozik-0/+4
2015-10-02Fix librustdoc search eventsSimonas Kazlauskas-11/+17
Previously only keyup event was looked at, which meant that pasting, cutting and otherwise changing the input without typing would not catch any updates to the search query.
2015-10-02Fix misnamed variable in rustdocSimonas Kazlauskas-1/+1
2015-10-02Auto merge of #28795 - marti1125:28696, r=alexcrichtonbors-0/+9
-Add a validation when input search is empty on top of 'startSearch()'
2015-10-01fixes #28696 Return to the default content when .search-input is empty -Add ↵Willy Aguirre-0/+9
a validation when input search is empty on top of 'startSearch()'
2015-09-27rustdoc: Remove crate name from primitives, make them turn up first in searchManish Goregaokar-0/+7
2015-09-14Disable browser history API on file:/ URLsJan-Erik Rediger-1/+2
history.pushState is defined, but not working whenever document.origin is "null" (literally that string, not just the null object). This is due to some security considerations and is unlikely to be ever working. For now just disable the usage of the history API when the documentation is accessed through a file:/ URL. See https://code.google.com/p/chromium/issues/detail?id=301210 for a Chrome-specific issue on the history API on file:/ URLs Closes #25953
2015-09-09rustdoc: Tweak the main template and CSS for semantic mark-up.Kang Seonghoon-6/+10
- section.sidebar -> nav.sidebar, also added an unordered list. - div#help -> aside#help, also added a hidden heading. - the current crate is now emphasized in the sidebar. Fixes #16310.
2015-08-04Improve rustdoc search type filtering.Eljay-7/+27
2015-07-20librustdoc: blur page when help dialogue is presentAndreas Tolfsen-2/+5
Blurs the document's background when the help dialogue is present, making the contents of the dialogue stand out more.
2015-07-17DRYTamir Duberstein-2/+2
2015-07-16Merge branch 'fix-26673' of https://github.com/nhowell/rust into rollup_centralSteve Klabnik-0/+6
2015-07-13Address feedbackBrian Anderson-0/+5
2015-07-08librustdoc: generalise handling of keyboard shortcutsAndreas Tolfsen-44/+48
2015-07-01rustdoc: Reset the title when pressing the back buttonNick Howell-0/+6
Fixes #26673
2015-07-01In js from the docs, change keyboard eventlistener to be compatible with ↵Mathieu David-6/+33
non-english keyboard layouts. Fixes #26016 Fixes #16572
2015-06-18rustdoc: Update document title when displaying search resultsJohannes Oertel-0/+3
Fixes #26360.
2015-05-22Rustdoc Search: Increase Relevance of PrimitivesPascal Hertleif-0/+7
2015-05-22Rustdoc: Clean Up Some JSPascal Hertleif-60/+57
There are more possible optimizations left (cached length in loops) as well as some possible bugs (shadowed variables) to fix. This is mostly syntactic.
2015-05-11Auto merge of #25225 - bluss:doc-search-assoc-items, r=alexcrichtonbors-1/+2
Rustdoc fixes for associated items This is related to isssue #22442 and solves it partly. This solves the search index links of associated types and constants, so that they link to the trait page. Also add an Associated Constants section if constants are present.
2015-05-09rustdoc: Link associated items in search index to traitUlrik Sverdrup-1/+2
This is related to isssue #22442 and solves it partly. This solves the links of associated types and constants, so that they link to the trait page.
2015-05-07Remove trailing whitespace on blank lineRory O’Kane-1/+1
This style inconsistency was noted at https://travis-ci.org/rust-lang/rust/builds/61583070#L371
2015-05-07Refactor doc toggle button label changingRory O’Kane-13/+27
To separate concerns, instead of checking the state of `#toggle-all-docs` by looking at its label text, I add or remove a class `will-expand` depending on whether the button’s next click will expand everything. (The `if` statement’s two branches were swapped as part of this change.) I moved the desired text values to a function `labelForToggleButton`, so changing the values will be easier. I also note in a comment the other file where the text is duplicated. To allow the labels of both types of toggle buttons to be uniformly set, I added a `span.inner` to the global button too. I split the template in `render.rs` into multiple lines to make room for the `span`, and that adds whitespace around the `[` and `]` text elements. That seems to be okay, though – the page still looks the same. I updated the CSS styling for `.collapse-toggle > .inner` to add a little extra space around the symbol, to make minus signs easier to identify. (`#toggle-all-docs > .inner` does not need the same style, since its text size is bigger, so it naturally puts more space around the symbol.)
2015-04-30Fix doc [−] button bug by escaping differentlyRory O’Kane-8/+8
The cause of the problem is described here: https://github.com/rust-lang/rust/pull/24797#issuecomment-97049765 . I tested this new `main.js` by changing the `main.js` content of a rendered docs page to this new content. The [−] button worked again.
2015-04-27Change literal minus ‘−’ to HTML entity ‘−’Rory O’Kane-8/+8
So that if people accidentally delete the character, they won’t re-type it as a hyphen, which would cause bugs. I changed ‘+’ too, even though it won’t be re-typed incorrectly, so that it is easier to see when plus is used as a symbol for the button, and when it is used as an operator in code. It also makes it clearer that the use of an entity for minus is on purpose, so people won’t be tempted to replace the entity incorrectly with a hyphen character.