CN110795916A - Side bar display method and system of document system - Google Patents

Side bar display method and system of document system Download PDF

Info

Publication number
CN110795916A
CN110795916A CN201910927259.3A CN201910927259A CN110795916A CN 110795916 A CN110795916 A CN 110795916A CN 201910927259 A CN201910927259 A CN 201910927259A CN 110795916 A CN110795916 A CN 110795916A
Authority
CN
China
Prior art keywords
title
level
target
parent
sublevel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910927259.3A
Other languages
Chinese (zh)
Inventor
冯海杰
吴栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201910927259.3A priority Critical patent/CN110795916A/en
Publication of CN110795916A publication Critical patent/CN110795916A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a method and a system for displaying a sidebar of a document system, comprising the following steps: acquiring the level and the arrangement sequence information of all the titles in the sidebar, judging the level of each title and the level of the adjacent title, and determining the parent-level title and the child-level title; judging whether the target title is a parent-level title or not, and if so, acquiring the display state of the child-level title under the target title; and determining the current display state of the target title by judging the display state of the sublevel title under the target title, and reversely unfolding or folding the target title. Therefore, the method and the device have the advantages that the parent-level title and the child-level title in the sidebar are determined, the title type of the target title and the expansion state of the target title are judged, so that the expansion or folding operation of the user is realized when the parent-level title is triggered on the docswift online document system, and the use experience of the user is improved.

Description

Side bar display method and system of document system
Technical Field
The present application relates to the field of document processing, and in particular, to a method and a system for displaying a sidebar of a document system.
Background
The Docsify online document system is a document generation system for generating document websites from document source files written in markdown language. The docswift online document system can generate a side column directory according to the title level defined in the markdown source file, can be directly displayed beside a document page, is convenient for a user to know the layout structure of the whole document through the side column directory, can fold the title of the markdown source file, simplifies the display of the side column directory, and is convenient for the user to browse and access.
However, existing docswift online document systems only support title exposure and folding of a single or a few markdown source files. When a user uses a large number of markdown source files to compile documents, Docsify cannot perform hierarchical folding display on titles in the large number of markdown source files, all levels of titles can appear in the generated sidebar directory, the folding and unfolding display effect of the titles cannot be formed, the display result of the sidebar is complex, and the user cannot browse and access the documents conveniently.
Disclosure of Invention
Based on the above problems, the present application provides a method and a system for displaying a sidebar of a document system, so that a docsify online document system can display titles of a large number of markdown source files in a hierarchical manner on the sidebar, and display results can be simplified, so that a user can browse and access the documents conveniently.
The embodiment of the application discloses the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for displaying a sidebar of a document system, including:
the method comprises the steps of obtaining information of the levels and the arrangement sequence of all titles in a sidebar in advance, and judging the level of each title and the level of an adjacent title; wherein when the title is followed by a lower-level title, the title is determined as a parent-level title; when the title is preceded by a higher-level title, determining the title as a sub-level title belonging to the higher-level title; wherein the level of the title is a system-defined title level; the method comprises the following steps:
when a certain title in the sidebar is triggered, setting the triggered title as a target title; judging whether the target title is a parent-level title or not; if so, acquiring the display state of the sub-level title under the target title;
if the sub-level title under the target title is in a hidden state, expanding the target title, and displaying the sub-level title under the target title; and if the sublevel title under the target title is in the display state, folding the target title, and hiding the sublevel title under the target title.
Optionally, the method further includes: setting directory parameters of a parent-level title; wherein the directory parameter represents an expansion state of the parent header; and when the parent-level title is expanded or folded, correspondingly modifying the directory parameters corresponding to the parent-level parameters.
Optionally, the method further includes: when the user accesses the document, the directory parameter of the parent title belonging to the main title is set to be a folded state; wherein the main title is the title at the highest level in the sidebar titles; and folding the parent-level title according to the directory parameters.
Optionally, the method further includes: when the document page is redirected to access, judging whether a target title exists under each parent-level title; if yes, keeping the expansion state of the parent-level title; and generating a new sidebar on the access page according to the display state of the child-level title and the directory parameters of other parent-level titles.
Optionally, if the sub-level title under the target title is in a hidden state, expanding the target title, and displaying the sub-level title under the target title; if the sublevel title under the target title is in the display state, folding the target title, and hiding the sublevel title under the target title, wherein the method comprises the following steps:
judging the display state of the sublevel title according to the state parameter of the sublevel title under the target title; wherein, the state parameter is a parameter representing the display state of the sublevel title; if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the hidden state, expanding the target title, displaying the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the display state; and if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the display state, folding the target title, hiding the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the hidden state.
Optionally, the expanding or collapsing operation on the target title further includes: and correspondingly changing the display style of the target title in the sidebar.
In a second aspect, an embodiment of the present application provides a sidebar display system of a document system, including:
the setting unit is used for acquiring the information of the levels and the arrangement sequence of all the titles in the sidebar, judging the level of each title and the level of the adjacent title, determining the title as a parent title when the title has a lower-level title behind the title, and determining the title as a child title belonging to a higher-level title when the title has a higher-level title in front of the title;
the judging unit is used for setting a triggered title as a target title when a certain title in a sidebar is triggered, judging whether the target title is a parent title or not, and acquiring the display state of a child title under the target title if the target title is the parent title;
and the execution unit is used for expanding the target title and displaying the sub-level title under the target title if the sub-level title under the target title is in a hidden state, and folding the target title and hiding the sub-level title under the target title if the sub-level title under the target title is in a displayed state.
Optionally, the setting unit further includes: for setting directory parameters of parent titles.
Optionally, the execution unit further includes: and the method is used for correspondingly setting the directory parameters of the parent-level title when the parent-level title is expanded or folded.
Optionally, the system further includes:
the initialization unit is used for setting the directory parameters of the parent-level title belonging to the main title to be in a folded state when a user accesses the document for the first time, and carrying out folding operation on the parent-level title according to the directory parameters; wherein the main title is a title at the highest level in the sidebar titles.
Optionally, the system further includes:
the reset unit is used for judging whether each parent-level title has a target title or not when the document page is redirected to access, and if so, keeping the expansion state of the parent-level title; and generating a new sidebar on the access page according to the display state of the child-level title and the directory parameters of other parent-level titles.
Optionally, the execution unit includes:
judging the display state of the sublevel title according to the state parameter of the sublevel title under the target title; wherein, the state parameter is a parameter representing the display state of the sublevel title; if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the hidden state, expanding the target title, displaying the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the display state; and if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the display state, folding the target title, hiding the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the hidden state.
Optionally, the execution unit further includes: and the style subunit is used for changing the display style of the target title in the sidebar when the target title is reversely expanded or folded.
Compared with the prior art, the method has the following beneficial effects: obtaining the information of the levels and the arrangement sequence of all the titles in the sidebar, and judging the level of each title and the level of the adjacent title; determining a parent-level title and a child-level title; judging whether the target title is a parent-level title or not, and if so, acquiring the display state of the child-level title under the target title; and determining the current expansion state of the target title by judging the display state of the sublevel title under the target title, and performing corresponding expansion or folding operation on the target title. According to the method and the device, the parent-level title and the child-level title in the sidebar are determined, and the title category to which the target title belongs and the expansion state of the target title are judged, so that the expansion or folding operation of a user is realized when the parent-level title is triggered on a docsify online document system. By folding and unfolding the parent-level title, the display effect of the side column title is simplified, a user can browse and know the whole architecture of the document conveniently, and the use experience of the user on the docsify online document system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a flowchart illustrating a sidebar display method of a document system according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a sidebar display method of another document system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a sidebar display system of a document system according to an embodiment of the present application.
Detailed Description
At present, a Docsify online document system is widely used by document editors as a markdown source file document website generating system which does not need to be compiled. The Docsify online document system can display all levels of titles in the markdown source file in the side column of the document page, so that a user can know the structure and the content of the whole document through the titles of the side column, and the user can jump to the display page of the document by clicking the titles through setting the routing information of the titles. The Docsify online document system obtains the grade of the title through the Markdown compiling rule, folding display can be carried out according to the grade of the title, and document editors can adjust the grade size and the folding effect of the title display and optimize the display effect of the side columns by modifying commands in the Docsify online document system. The user may view the related subtitles by clicking on the collapsed titles in the sidebar and may collapse the viewed subtitles, simplifying the display of the sidebar.
The inventor of the application finds that in practical application, only one Markdown source file cannot meet the requirement of complex document display due to the requirement of document editing. The Docsify online document system provides a method for forming a plurality of Markdown source files into one document for presentation, but because the level relation of each title in a large number of Markdown source files in the whole document is difficult to determine, the Docsify online document system can only support the hierarchical presentation of the titles of a single or a small number of Markdown source files. When a large number of documents generated by the Markdown source files appear, all titles in the source files can be displayed by the sidebars automatically generated by the system, and the display result of the sidebars is very complicated, so that a user cannot browse and know the documents through the sidebars conveniently.
The inventor finds that the level and the membership of each title in a plurality of Markdown source files can be determined by optimizing an analytic analysis method of a sidebar of a Docsify online document system, corresponding parent titles and child titles can be determined, and the display state of the title can be judged by setting relevant parameters of the parent titles and the child titles when a user triggers the title, so that the next expansion or folding operation can be conveniently carried out, and the hierarchical folding display of the title in the sidebar can be realized.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First embodiment
Referring to fig. 1, the figure is a schematic flowchart of a sidebar display method of a document system according to an embodiment of the present application.
It should be noted that the sidebar display method of the document system provided in the embodiment of the present application is applicable to a document generation system, and for example, may be applied to a docswift online document system or other document systems with the same or similar problems.
In this embodiment, the method may be implemented, for example, by steps S101-S103 as follows.
S101, the method acquires the information of the levels and the arrangement sequence of all the titles in the sidebar in advance, and judges the level of each title and the level of the adjacent title; wherein when the title is followed by a lower-level title, the title is determined as a parent-level title; when the title is preceded by a higher-level title, determining the title as a sub-level title belonging to the higher-level title;
it should be noted that, the level to which the title mentioned in the embodiment of the present application belongs may be a title level defined by the system. In one possible embodiment, the online document system has associated rules defining the level of title, such as defining the highest level of title as a level one, a lower level as a level two title, and so on.
It should be noted that the title information mentioned in the embodiments of the present application may be obtained based on the original unmodified sidebar display method.
It should be noted that, in this embodiment, the range of the adjacent title is not limited, and in a possible implementation, the range may be a range in which the title level of the title changes, for example, the title is a second-level title, and the range of the adjacent title may be a range from a first-level title before the title to a third-level title after the title.
It should be noted that, in the embodiment of the present application, the type of the same title in the sidebar is not limited, and the same title may be a parent title and a child title at the same time.
S102, when a certain title in the sidebar is triggered, setting the triggered title as a target title; judging whether the target title is a parent-level title or not; if so, acquiring the display state of the sub-level title under the target title;
it should be noted that the title triggering form is not specifically limited in the embodiment of the present application, and in a possible implementation manner, a user may trigger the title by clicking a mouse.
It should be noted that, in the embodiment of the present application, a specific method for determining the display states of the parent-level title and the child-level title is not limited, and may be implemented by setting related parameters.
It should be noted that the sub-title under the target title mentioned in the embodiments of the present application may be any one or more sub-titles under the target title.
S103, if the sub-level title under the target title is in a hidden state, expanding the target title and displaying the sub-level title under the target title; and if the sublevel title under the target title is in the display state, folding the target title, and hiding the sublevel title under the target title.
It should be noted that the presentation form of the presentation state of the sub-level title is not specifically limited in the embodiments of the present application, and in a possible implementation manner, the presentation state of the sub-level title may be represented by setting a relevant state parameter of the sub-level title.
It should be noted that the presentation state of the sub-level title in the embodiment of the present application may include, but is not limited to, presentation and hidden states.
It should be noted that the unfolding and folding of the target title mentioned in the embodiments of the present application may be implemented by setting up an associated algorithm. In one possible implementation, the original instruction of the online document system can be called to perform corresponding expansion or folding operation on the target title.
In the embodiment of the application, by acquiring the title levels and the arrangement sequence in the sidebar and by judging the levels of each title and the levels of adjacent titles, the parent-level title and the child-level title are determined. And determining that the triggered title is the target title, judging whether the target title belongs to the parent title, if so, judging whether the parent title is expanded according to the display state of the child title under the target title, and performing corresponding operation. Therefore, by the method of the embodiment, the parent-level title and the child-level title in the sidebar title can be determined, and when the parent-level title is triggered, the parent-level title is correspondingly operated according to the display state of the child-level title, so that the hierarchical folding display of the sidebar title is realized, and the title can be unfolded and folded according to needs.
Second embodiment
In the first embodiment, the title can be folded and unfolded through triggering the title. However, in some scenarios, the title displayed in the sidebar also needs to be optimally displayed when the user does not trigger the title. When a user accesses a document for the first time, the presentation of the main title belonging to the document in the sidebar may be more beneficial to the user in browsing and understanding the document. In addition, because the title of the online document system and the document page corresponding to the title have links, when the title is triggered by the user, the page jumps and the sidebar display needs to be performed again. Therefore, the application provides another side column display method of the document system. Referring to fig. 2, the figure is a schematic flowchart of a sidebar display method of another document system according to an embodiment of the present application.
In this embodiment, the method may be implemented by, for example, steps S201-S205 as follows.
S201, the method acquires information of the levels and the arrangement sequence of all titles in a sidebar in advance, and judges the level of each title and the level of an adjacent title; wherein when the title is followed by a lower-level title, the title is determined as a parent-level title; when the title is preceded by a higher-level title, determining the title as a sub-level title belonging to the higher-level title;
s202: setting directory parameters of a parent-level title; wherein the directory parameter represents an expansion state of the parent header; when the expansion or folding operation is performed on the parent-level title, the directory parameter corresponding to the parent-level parameter is modified correspondingly.
It should be noted that, in the embodiment of the present application, the directory parameter of the parent header may indicate, but is not limited to, the expanded state and the collapsed state of the parent header.
It can be understood that the embodiment of the present application does not limit the specific setting manner of the parent-level title directory parameter, and the setting may be performed according to the specific situation of the system, and the directory parameter may have the function described in the present application.
S203: when the user accesses the document, the directory parameter of the parent title belonging to the main title is set to be a folded state; wherein the main title is the title at the highest level in the sidebar titles; and folding the parent-level title according to the directory parameters.
It should be noted that, in the embodiment of the present application, accessing the document may be that the user accesses the document for the first time, or that the first page of the document is accessed again in the browsing process. In one possible implementation, the document may be revisited by triggering the document name, with the sidebar in the revisited document page showing only the main header.
It should be noted that, in the embodiment of the present application, accessing the document is accessing the whole document, and may be accessing the document through other web pages, or accessing the document by clicking the title of the document on the document display page.
It should be noted that, in this embodiment of the present application, a specific level of a title corresponding to a main title is not limited, and in a possible implementation, when a primary title is the most level, the main title may be the primary title.
It is understood that the setting of the parent title belonging to the main title in the embodiment of the present application does not affect the presentation of the main titles of other non-parent titles.
It should be noted that, in the embodiment of the present application, the directory parameter may be folded for each parent header of the folder by traversing the sidebar headers.
S204: when a certain title in the sidebar is triggered, setting the triggered title as a target title; judging whether the target title is a parent-level title or not; if so, acquiring the display state of the sub-level title under the target title; if the sub-level title under the target title is in a hidden state, expanding the target title, and displaying the sub-level title under the target title; and if the sublevel title under the target title is in the display state, folding the target title, and hiding the sublevel title under the target title.
S205: when the document page is redirected to access, judging whether a target title exists under each parent-level title; if yes, keeping the expansion state of the parent-level title; and generating a new sidebar on the access page according to the display state of the child-level title and the directory parameters of other parent-level titles.
It should be noted that the document page redirection access mentioned in the embodiment of the present application may be a jump of a document presentation page by triggering a title in a sidebar.
In a possible implementation manner, the determination as to whether each parent title has the target title is performed in the embodiments of the present application, where the title range under the parent title is from the parent title to the next title at the same level. For example, when the parent title is a first-level title, it is determined whether the title range having the target title is a range from the parent title to the next first-level title.
It should be noted that steps S203, S204, and S205 in this embodiment may be performed according to a trigger condition, and a specific operation sequence of steps S203, S204, and S205 is not limited in this embodiment.
It is to be understood that the parameters mentioned in the embodiments of the present application may be set according to an applicable system, and names, expressions, and the like of the set parameters are not specifically limited in the embodiments. In a possible implementation manner, the functions of multiple parameters in this embodiment may be implemented by using the same parameter. In another possible implementation manner, a plurality of parameters may be used to implement the function of one parameter in the embodiment.
In the embodiment of the application, the optimization of the banner display is performed by judging the operation of the user aiming at the condition that the user accesses the whole document and page jump is performed by triggering the banner in the sidebar. When a user accesses the whole document, the directory parameters of the parent title serving as the main title are set to be in a folded state, and the parent title is folded, so that the side bar only displays the main title when the user accesses the whole document, and the user can browse and access the document conveniently. When a user triggers a title, the document display page can carry out corresponding page jump and access a routing address corresponding to the document page where the title is located. And at the moment, maintaining the expansion state of the parent title to which the target title clicked by the user belongs, updating the display states of other titles according to the set parameters, and displaying a new sidebar on the newly generated page.
Third embodiment
The method for displaying the sidebar of the document system provided by the embodiment of the present application is introduced above, and the method provided by the embodiment of the present application is introduced below with reference to a specific scenario.
In this scenario, the document system is a Docsify online document system. Since the sidebar of the docswift online document system generates all titles when a large number of Markdown source files are used to generate a document, a doneEach function in the docswift online document system is called to read the title contents in the sidebar, information of the level and the arrangement sequence of the titles in the sidebar is obtained, and the parent title and the child title are determined by judging the level to which each title belongs and the level of the adjacent title of the title. The title level is a rule of title level set when a document is written in Markdown language, wherein the title level is respectively 'first-level title', 'second-level title', 'third-level title', and the like, and the smaller the number is, the higher the corresponding title level is. For example, three first-level headings of "quick start", "user manual", and "need to know for use" are provided in the title of the document. With a second level title under both "quick start" and "user manual"; the "use to know" does not include other levels of titles. The product introduction is provided with two grade titles of product introduction, design idea and the like, and the product introduction is provided with two grade titles of product A and product B. When judging the level of a title and the level of an adjacent title, for example, "quick start" is a primary title, and an adjacent title is a following "product brief description" belonging to a secondary title, so "quick start" is a parent title; for the secondary heading "product profile", the first heading "quick start" is preceded by the third heading "product A", so the "product profile" is a sub-level heading for "quick start" and the "product A" is a sub-level heading for "product profile". For each parent title, a corresponding directory parameter is set. When the user accesses the document, the directory parameters of the respective parent titles belonging to the main title are set to the collapsed state. The main title is the title with the highest level in the sidebar, for example, the current title with the highest level in the sidebar is the first-level title, and the first-level title is the main title, so the parameters of the parent title "quick start" and "user manual" in the first-level title are set, and the sidebar is traversed to fold the parent title in the folded state. The titles of the sidebars displayed when the user accesses only show "quick start", "user manual", "use need to know", and the titles of other levels are all folded. When the user clicks on the "quick start" title, the "quick start" title is the target title, and it is determined whether the "quick start" is the parent title, and the "quick start" is a child title below the "quick start", and is therefore the parent title. And acquiring the display states of the secondary titles such as the product introduction of 'quick start' and 'design idea', wherein the display states of the secondary titles can be judged by the state parameters of all the titles. For example, when the display state of the product introduction is display, the product introduction is folded to rapidly start, so that the sublevel title is in a hidden state; when the display state of the product introduction is hidden, the quick start is expanded, so that the sublevel title is the display state. And changes the associated parameters of each title to indicate a change in the status of the title. As the user clicks the title, the document display page skips, and the doneach function is called again to read the title content in the sidebar. And updating the display state of the title according to the related parameters of the title. The method comprises the steps of judging whether each parent title is provided with a target title or not, wherein the parent title is required to be guaranteed to be in a display state, and the user is guaranteed to click the target title again. For example, when the user clicks on "product A", the "product profile" title in the updated sidebar should remain expanded, with the remaining titles being presented according to the status of the parameter representation. In order to facilitate the display of the state of the parent title, a special style display may be performed on the parent title in the sidebar display, for example, an arrow is added in front of the title, and the direction of the arrow is changed according to the display condition of the title.
Fourth embodiment
Referring to fig. 3, the figure is a schematic structural diagram of a sidebar display system of a document system according to an embodiment of the present application. The embodiment of the present application further provides a sidebar display system 300 of a document system, including:
a setting unit 301, configured to obtain information about the levels and the arrangement order of all titles in the sidebar, and determine the level to which each title belongs and the level of an adjacent title; when the title is followed by a lower-level title, determining the title as a parent-level title; when the title is preceded by a higher-level title, determining the title as a sub-level title belonging to the higher-level title;
a judging unit 302, configured to set, when a certain title in a sidebar is triggered, the triggered title as a target title; judging whether the target title is a parent-level title or not; if so, acquiring the display state of the sub-level title under the target title;
the executing unit 303 is configured to, if the sub-level title under the target title is in a hidden state, expand the target title, and display the sub-level title under the target title; and if the sublevel title under the target title is in the display state, folding the target title, and hiding the sublevel title under the target title.
Optionally, the setting unit further includes: for setting directory parameters of parent titles.
Optionally, the execution unit further includes: and the method is used for correspondingly setting the directory parameters of the parent-level title when the parent-level title is expanded or folded.
Optionally, the system further includes:
an initialization unit for setting a directory parameter of a parent title belonging to a main title to a collapsed state when a user accesses the document for the first time; wherein the main title is the title at the highest level in the sidebar titles; and folding the parent-level title according to the directory parameters.
Optionally, the system further includes:
the reset unit is used for judging whether each parent-level title has a target title or not when the document page is redirected to access, and if so, keeping the expansion state of the parent-level title; and generating a new sidebar on the access page according to the display state of the child-level title and the directory parameters of other parent-level titles.
Optionally, the execution unit includes:
judging the display state of the sublevel title according to the state parameter of the sublevel title under the target title; wherein, the state parameter is a parameter representing the display state of the sublevel title; if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the hidden state, expanding the target title, displaying the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the display state; and if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the display state, folding the target title, hiding the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the hidden state.
Optionally, the execution unit further includes: and the style subunit is used for changing the display style of the target title in the sidebar when the target title is reversely expanded or folded.
Since the system 300 is a system corresponding to the method provided in the above method embodiment, reference may be made to the description part of the above method embodiment for the description of each unit of the system 300, and details are not repeated here.
It should be noted that, in the present specification, all the embodiments are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts suggested as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. A sidebar display method of a document system is characterized in that the method is applied to an online document generation system; the method comprises the steps of obtaining information of the levels and the arrangement sequence of all titles in a sidebar in advance, and judging the level of each title and the level of adjacent titles of the titles; wherein when the title is followed by a lower-level title, the title is determined as a parent-level title; when the title is preceded by a higher-level title, determining the title as a sub-level title belonging to the higher-level title; wherein the level of the title is a system-defined title level; the method comprises the following steps:
when a certain title in the sidebar is triggered, setting the triggered title as a target title; judging whether the target title is a parent-level title or not; if so, acquiring the display state of the sub-level title under the target title;
if the sub-level title under the target title is in a hidden state, expanding the target title, and displaying the sub-level title under the target title; and if the sublevel title under the target title is in the display state, folding the target title, and hiding the sublevel title under the target title.
2. The method of claim 1, further comprising: setting directory parameters of a parent-level title; wherein the directory parameter represents an expansion state of the parent header; when the expansion or folding operation is performed on the parent-level title, the directory parameter corresponding to the parent-level parameter is modified correspondingly.
3. The method of claim 2, further comprising: when the user accesses the document, the directory parameter of the parent title belonging to the main title is set to be a folded state; wherein the main title is the title at the highest level in the sidebar titles; and folding the parent-level title according to the directory parameters.
4. The method of claim 2, further comprising: when the document page is redirected to access, judging whether a target title exists under each parent-level title; if yes, keeping the expansion state of the parent-level title; and generating a new sidebar on the access page according to the display state of the child-level title and the directory parameters of other parent-level titles.
5. The method according to claim 1, wherein if the sub-level title under the target title is in a hidden state, the target title is expanded to show the sub-level title under the target title; if the sublevel title under the target title is in the display state, folding the target title, and hiding the sublevel title under the target title, wherein the method comprises the following steps:
judging the display state of the sublevel title according to the state parameter of the sublevel title under the target title; wherein, the state parameter is a parameter representing the display state of the sublevel title; if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the hidden state, expanding the target title, displaying the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the display state; and if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the display state, folding the target title, hiding the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the hidden state.
6. The method of claim 1, wherein performing an expand or collapse operation on a target title further comprises: and correspondingly changing the display style of the target title in the sidebar.
7. A sidebar display system of a document system, wherein the display system is applied to an online document generating system, the system comprising:
the setting unit is used for acquiring the information of the levels and the arrangement sequence of all the titles in the sidebar and judging the level of each title and the level of the adjacent title; when the title is followed by a lower-level title, determining the title as a parent-level title; when the title is preceded by a higher-level title, determining the title as a sub-level title belonging to the higher-level title;
the judging unit is used for setting a triggered title as a target title when a certain title in a sidebar is triggered, judging whether the target title is a parent title or not, and acquiring the display state of a child title under the target title if the target title is the parent title;
and the execution unit is used for expanding the target title and displaying the sub-level title under the target title if the sub-level title under the target title is in a hidden state, and folding the target title and hiding the sub-level title under the target title if the sub-level title under the target title is in a displayed state.
8. The system of claim 7, wherein the setup unit further comprises: for setting directory parameters of parent titles.
9. The system of claim 8, wherein the execution unit further comprises: and the method is used for correspondingly setting the directory parameters of the parent-level title when the parent-level title is expanded or folded.
10. The system of claim 9, further comprising:
the initialization unit is used for setting the directory parameters of the parent-level title belonging to the main title to be in a folded state when a user accesses the document for the first time, and carrying out folding operation on the parent-level title according to the directory parameters; wherein the main title is a title at the highest level in the sidebar titles.
11. The system of claim 9, further comprising:
and the resetting unit is used for judging whether each parent-level title has a target title or not when the document page is redirected to access, if so, keeping the expansion state of the parent-level title, and generating a new sidebar on the access page according to the display state of the child-level title and the directory parameters of other parent-level titles.
12. The system of claim 7, wherein the execution unit comprises:
judging the display state of the sublevel title according to the state parameter of the sublevel title under the target title; wherein, the state parameter is a parameter representing the display state of the sublevel title; if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the hidden state, expanding the target title, displaying the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the display state; and if the state parameter of the sublevel title under the target title indicates that the sublevel title is in the display state, folding the target title, hiding the sublevel title under the target title, and changing the state parameter of the sublevel title under the target title into the hidden state.
13. The system of claim 7, wherein the execution unit further comprises: and the style subunit is used for changing the display style of the target title in the sidebar when the target title is expanded or folded.
CN201910927259.3A 2019-09-27 2019-09-27 Side bar display method and system of document system Pending CN110795916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910927259.3A CN110795916A (en) 2019-09-27 2019-09-27 Side bar display method and system of document system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910927259.3A CN110795916A (en) 2019-09-27 2019-09-27 Side bar display method and system of document system

Publications (1)

Publication Number Publication Date
CN110795916A true CN110795916A (en) 2020-02-14

Family

ID=69438644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910927259.3A Pending CN110795916A (en) 2019-09-27 2019-09-27 Side bar display method and system of document system

Country Status (1)

Country Link
CN (1) CN110795916A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111753222A (en) * 2020-05-28 2020-10-09 苏州浪潮智能科技有限公司 Method and system for generating and displaying directory bar of online document system
CN113779235A (en) * 2021-09-13 2021-12-10 北京市律典通科技有限公司 Word document outline recognition processing method and device
CN113849102A (en) * 2021-09-26 2021-12-28 网易(杭州)网络有限公司 Document processing method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1773492A (en) * 2004-11-09 2006-05-17 国际商业机器公司 Method for organizing multi-file and equipment for displaying multi-file
CN103903182A (en) * 2012-12-25 2014-07-02 南车青岛四方机车车辆股份有限公司 High-speed train electronic product manual dynamic publishing system
CN104063381A (en) * 2013-03-19 2014-09-24 华为技术有限公司 Multilevel tree menu display method and terminal
CN108376127A (en) * 2018-03-15 2018-08-07 武汉斗鱼网络科技有限公司 A kind of method, apparatus and computer readable storage medium of document structure tree
CN108984685A (en) * 2018-06-29 2018-12-11 天津字节跳动科技有限公司 A kind of method and device of automatic display file catalogue
CN109189879A (en) * 2018-09-14 2019-01-11 腾讯科技(深圳)有限公司 E-book display methods and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1773492A (en) * 2004-11-09 2006-05-17 国际商业机器公司 Method for organizing multi-file and equipment for displaying multi-file
CN103903182A (en) * 2012-12-25 2014-07-02 南车青岛四方机车车辆股份有限公司 High-speed train electronic product manual dynamic publishing system
CN104063381A (en) * 2013-03-19 2014-09-24 华为技术有限公司 Multilevel tree menu display method and terminal
CN108376127A (en) * 2018-03-15 2018-08-07 武汉斗鱼网络科技有限公司 A kind of method, apparatus and computer readable storage medium of document structure tree
CN108984685A (en) * 2018-06-29 2018-12-11 天津字节跳动科技有限公司 A kind of method and device of automatic display file catalogue
CN109189879A (en) * 2018-09-14 2019-01-11 腾讯科技(深圳)有限公司 E-book display methods and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111753222A (en) * 2020-05-28 2020-10-09 苏州浪潮智能科技有限公司 Method and system for generating and displaying directory bar of online document system
CN113779235A (en) * 2021-09-13 2021-12-10 北京市律典通科技有限公司 Word document outline recognition processing method and device
CN113849102A (en) * 2021-09-26 2021-12-28 网易(杭州)网络有限公司 Document processing method and device, computer equipment and storage medium
CN113849102B (en) * 2021-09-26 2023-08-08 网易(杭州)网络有限公司 Document processing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
Bickmore et al. Web page filtering and re-authoring for mobile users
US8639680B1 (en) Hidden text detection for search result scoring
US10185782B2 (en) Mode identification for selective document content presentation
CN110795916A (en) Side bar display method and system of document system
US6857102B1 (en) Document re-authoring systems and methods for providing device-independent access to the world wide web
US20140089337A1 (en) Method, Apparatus and System of Processing Correlated Keywords
CN102436455B (en) Realize method, system and client browser that word browses
US20130173593A1 (en) Breadcrumb filtering
CN104063415A (en) Method and system for displaying webpage user-defined content
US9448985B2 (en) Browser application and a method of operating the browser application
JP2012128479A (en) Retrieval device and program
CN104063498A (en) Method and device for searching for bookmark of browser
CN105824949A (en) Method and device for adding comments
CN108509544B (en) Method and device for acquiring mind map, equipment and readable storage medium
CN110968314A (en) Page generation method and device
RU2596575C2 (en) Method of processing user request, electronic device and a permanent machine-readable medium
Sarkis et al. A multi-screen refactoring system for video-centric web applications
CN117055987A (en) Webpage display method and device, electronic equipment and computer readable storage medium
US20130132820A1 (en) Web browsing tool delivering relevant content
KR101575113B1 (en) Method Apparatus And Computer-Readable Recording Medium with Program for Extracting Content with Web Page
KR101421819B1 (en) Method for providing keyword search result using balloon in an online environment
US9311059B2 (en) Software development tool that provides context-based data schema code hinting
Pasha Responsive web design: present and future
US7617204B2 (en) Conditional navigation through hierarchical lists
CN115292589B (en) Hot spot information guiding browsing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200214

RJ01 Rejection of invention patent application after publication