-
Sean Hammond authored
Replace `isSidebar`, `isEmbedded`, `annotation-embedded`, `annotationEmbedded` and `embedded` with a single `isSidebar` variable. - Rename `isEmbedded` in AppController to `isSidebar`. - Rename `embedded` in AnnotationController to `isSidebar`, it just passes the value of `AppController`'s `isSidebar` into `annotation.html`. - Rename the `annotation-embedded`/`annotationEmbedded` variable that is used to pass `isSidebar` (was `isEmbedded`) into `AnnotationController`, rename it to `is-sidebar` / `isSidebar`. - Delete the duplicate `isSidebar` variable from `WidgetController`'s scope, `WidgetController`'s templates can simply access `AppController`'s `isSidebar` from the scope. Note that there's another variable, `isStream`, that's actually true when we're either in the sidebar or on the stream page, but not when we're on individual annotation pages. This is used to show/hide the "Sorted by newest, oldest, location" menu which appears in the sidebar or stream but not on individual annotation pages (the "location" option in this menu only appears when in the sidebar not on the stream). This commit leaves the `isStream` variable alone. So the `isSidebar` variable is now used to show/hide the following elements: - The share dialog (share this page on twitter etc) is shown in the top bar, only when in the sidebar (and not on the `/stream` page or on individual annotation pages). - The group list dropdown menu, shown in the top bar only when in the sidebar. - The "location" entry in the sort menu (sorted by newest, oldest, location) shown only when in the sidebar. - The "citation" on annotations that says which page was annotated (the 'on "Example Document" (example.com)' in the annotation's title), is shown only when _not_ in the sidebar.
872cff11