Title of Invention | METHOD AND APPARATUS FOR DISPLAYING TAB ON WEB CARRIER |
---|---|
Abstract | Abstract The present invention provides a method and apparatus for displaying tabs on a web cairier, so as to adjust the displaying mode of the tabs according lo the favorite of a user, Ihc method includes: acquiring the size of the web carrier; determining arrangement of the tabs on the web carrier according to the size of the web carrier and preset minimum value and maximum value of the tab size; displaying the tabs on the web carrier according to the determined arrangement of the tabs. |
Full Text | METHOD AND APPARATUS FOR DISPLAYING TAB ON WEB CARRIER Field of the invention The present invention relates to Internet web application technologies, more particularly lo a method and apparatus for displaying tabs on a web carrier. Background of the invention Along with the development of Internet services, web has become an indispensable part of daily life. Through various web sites, a user may browse news, send and receive an e-mail, make friends etc. At present, in a web siie, a fixed typesetting and a fixed layout are employed in a web page to display unchanged contents, and thus when searching for concerned contents, a user need to drag up-down and left-right scroll bars. In other words, at present, in the web site, the same contents are displayed for all users through the same typesetting and the same layout. According to the conventional displaying mode of the web site, the user can not arrange the layout and the contents according to hi.s/her favorite, so increasing cuslomized demand of the user is obviously unsatisfied. Summary of the Invention Embodiments of the present invention provide a method and apparatus for displaying tabs on a web carrier, so as to adjust the displaying mode of the tabs according to user favorite. A method for displaying tabs on a web carrier provided by embodiments of the present invention includes: acquiring the size of the web carrier; determining arrangement of the tabs on the web carrier according to the size of the web carrier and preset minimum value and maximum value of the tab size; displaying the tabs on the web carrier according to the determined arrangement of tne labs. An apparatu.s for displaying tabs on a web carrier provided by embodiments of the present invenlion includes: a first module, adapted to acquire a size of a web carrier; a second module, adapt to determine arrangement of tabs on the web earner according to the size of the web carrier acquired by the first module and preset rninimum value and maximum value of the tab size; a third module, adapted to display the tabs on the web carrier according to the arrangement of tabs determined by the second module. According to the method and apparatus for displaying tabs on a web carrier provided by the present invention, the arrangement of the tabs on the web carrier is determined according to the size of the web carrier and the minimum value and maximum value of Ihe tab size, and then the tabs is displayed on the web carrier according to the determined arrangement of the labs. Therefore, a user can adjust the displaying mode of the tabs on the web carrier according to his/her favorite when the size of the web carrier is adjusted, the user also can add a favorite tab, delete a un-interested tab, so that more tabs may be displayed on the limited scope of the web carrier, and thus the interactive experience of the user is improved, and the customized demand of the user is satisfied. Brief tiescription of the drawings Fig. 1 is a flowchart of adjusting airangement and breadth of tabs when breadth of a web carrier is adjusted in accordance with an embodiment of the present invention. Fig,2 is a flowchart illustrating implementation of determining arrangement and breadth of tabs on a web carrier in accordance with an embodiment of the present invention. Fig.3 is a flowchart illustrating a method for displaying tabs for a user who logs on an IM client terminal through an account number in accordance with an embodiment of the present invention. Detailed description of the invention The present invention is hereinafter described in detail with reference to the accompanying drawings and embodiments to make the object, solution and merits thereof more apparent. The method for displaying tabs through adjusting the size of a web canier provided by an embodiment of the present invention specifically includes: acquiring the size of Ihe web carrier; determining an-angement of the labs on the web carrier according to the size of the web carrier and preset minimum value and maximum value of the tab size; displaying the tabs on the web carrier according to the determined arrangement of the tabs. Here, the web carrier is a panel used to display the tabs, which may be an IM client terminal panel and a browser used to display a web site etc, and the tabs are multiple displaying areas on the web carrier. The method for displaying the tabs on the web carrier when the size of the web carrier is adjusted is introduced as follows. There are various forms of adjusting the size of the web earner, such as adjusting the breadth of the web carrier or adjusting the height of the web carrier. In an embodiment, support the breadth of the web carrier is adjusted. The minimum and maximum values of the tab breadth are needed to be preset. In this way, when the breadth of the web carrier is adjusted, the tab breadth may be ensured to be between the minimum and maximum values, so as to improve use experience. Fig.l is a flowchart of adjusting arrangement and breadth of tabs when breadth of a web carrier is adjusted in accordance with an embodiment of the present invention. Suppose that the preset maximum value of the lab breadth is Vmax and the minimum value of the tab breadth is Vmin. As shown in Fig.l, the flowchart includes following steps. Step 101: adjustment of breadth of a web carrier is detected. Here, an event of adjusting the breadth of the web carrier is detected through basic event process and superior event process of Document Object Model DOM. Step 102: the adjusted breadth of the web carrier is acquired and recorded as W. Here, the breadth of the web carrier is acquired through Cascading Style Sheet CSS and browser object property. Step 103: arrangement and breadth of labs on the web carrier are determined according to the breadth of the web carrier and Ihe preset Vmin and Vmax of the tab breadth. Here, the arrangement of the tabs on the web may be indicated by the number of lines of the tabs displayed on ihe web carrier and the number of the tabs in each line. The method for determining the number of lines of the displayed labs, the number of the tabs in eiich line and the breadlh of each tab is shown in Fig.2 and is described in detail later. Step 104: ihc tabs are displayed according to the delermined arrangement and size. Specifically, the position and size of each tab on the web carrier are adjusted according to the number of lines of the displayed tabs, the number of the labs displayed in each line and the breadth of each tab. and then the labs are displayed according to the adjusted position and size. hi the step, the position and size of each tab on the web carrier are adjusted by changing a CSS element of each tab and a browser object property by Javascript sentences through a tab map table set inside programs. Here, the adjusted position and size of each tab on the web carrier obtained at the step may be stored. In this way, when next time the user accesses the web carrier, the tabs may be displayed on the web carrier according to the stored position and size of each tab, so that the use habit is recorded and the use demand is satisfied. Fig.2 shows a flowchart illustrating implementation of determining arrangement and breadth of tabs on a web carrier in Step 103. Step 201: the inhial value of the maximum number of the tabs that may be displayed in one line is set and indicated as N, In an example. N=l. In the step, the initial value of N also may be set as another value. Step 202: when supporting that breadth of the N tabs in one line displayed in the web carrier is Vmin, the minimum breadth value of the web carrier is calculated and indicated as Wmin, meanwhile, when supporting that breadth of the N tabs in one line displayed in the web carrier is Vmax, the maximum breadth value of the web carrier is calculated and indicated as Wmax. Herein, Wmin and Wmax may be calculated according to following formulas (1) and (2): Wmin=VminxN+ (N-1) xA+a CD Wmax=VmaxxN+ (N-l) xA+o C2) Herein, A is the breadth of the blank between two tabs, CT is the breadlh of the web earner margin. A and a may be zero. Step 203: whether the adjusted breadth W of the web carrier obtained at Step 102 shown in Fig.l is more than Wmin and less than Wmax is determined. If the adjusted breadth W of the web carrier obtained at Step 102 shown in Fig.l is more than Wmin and less than Wmax, Step 205 is performed; otherwise, Step 204 is performed. Step 204: the Viihie of N is adjusted, return lo Step 202. Specifically, if the adjusted breadth W of the web canier obtained at Step 102 shown in Fig.l is less than Wmin, 1 is added to the value of N. If the adjusted breadth W of the web can-ier obtained at Step 102 shown in Fig.l is more than Wmax, 1 is decreased from the value of N, At the step, other solution may be adopted to adjust ihe value of N. Step 205: the maximum number of the tabs that may be displayed in one line is determined as currently obtained N, For example, through the circular processes of the above Step 202-204, the adjusted breadth of the web carrier W satisfies the condition of Wmin Step 206: the total number of the tabs displayed on the web carrier is acquired as Ptotal, whether the maximum number of the tabs that may be displayed in one line N can divide exactly the total number of the tabs Ptotal is determined. If the maximum number of the tabs that may be displayed in one line N can divide exactly the total number of the tabs Ptotal, Step 207 is performed; otherwise. Step 208 is performed. Step 207: the minimum number of lines of the tabs on the web carrier is determined as the quotient obtained by dividing Ptotal by N, as shown in formula (3). The breadth of each tab is V and is calculated as shown in formula (4). M=Plotal/N (3) V= (W— CN-1) XA-CT) /N (4) Step 208: the minimum number of lines of the tabs on the web carrier is determined as the sum of 1 and the quotient M obtained by dividing Ptotal by N. The number of the tabs respectively displayed on the M tines may be N, the breadth of each tab may be V, which is calculated as shown in the formula (4). While the number of the tabs displayed in the other line may be the residue ODD obtained by dividing Ptotal by N, the breadth of each tab displayed in the other line may be V, which is calculated as shown in formula (5). V'= (W- (ODD-D xA-fT) /N (5) Herein, M and ODD satisfy following formula (6). M X N + ODD = Ptotal (6) At the step, preferably, the line on which ODD tabs are displayed is arranged as the last line on the web carrier, and the tabs on the line are displayed centrally. At a word, the minimum number of the lines of the tabs may be an arbitrary natural number which is equal with or less than quotient obtained by dividing the total number of the tabs displayed on the web carrier by the maximum number of the tabs that may be displayed in one line. The flowcharts shown in the above Fig.l and Fig.2 provide the solutions that the breadth of the tabs and arrangement on the web carrier on the line direction are adjusted when the breadth of the web carrier is adjusted. CoiTespondingly, the height of the tabs and arrangement on the web carrier on the row direction may be adjusted when the height of the web carrier is adjusted. However, when the height of the web carrier is adjusted, the height of the tabs and arrangement on the web carrier on the row direction may be not adjusted. For example, when the height of the web carrier is reduced, scroll on the row direction may be generated on the web carrier, and the tabs may be looked through the scroll. The method for displaying tabs on an IM client terminal which is a kind of a web carrier is taken as an example. In the example, the tabs are displayed for a user logs on the IM client terminal through an account number. As shown in Fig.3, the method includes following steps. Step 301: a user logs on an IM client terminal according to an account number and a key. At the step, the user inputs the account number and the key in the IM client terminal, and then the IM client terminal sends a request for verifying the validity of the account number and the key to an IM server. If the IM server determines the account number and the key are valid, the user successfully logs on the IM client terminal. Step 302: the user switches to a panel on which the tabs are displayed. The IM client terminal includes multiple panels used for displaying different contents. Step 303: the IM client terminal determines whether displaying information of the tabs corresponding to the account number is stored. If the displaying information of the tabs corresponding to the account number is stored, the tabs are displayed on the panel according to the displaying information corresponding to the account number; otherwise, the tabs are displayed in a default mode. Here, the displaying information may include the arrangement information and the sizes of the tabs on the panel. The displaying information may be stored in a local device of the IM client terminal. For example, when the user logs on the IM client terminal through a personal computer, the displaying information corresponding to the account number is stored in the personal computer. In this way, when the user logs on the IM client terminal, the IM client terminal acquires the stored displaying information corresponding to the account number from the personal computer and displays the tabs on the panel according to the displaying information. The displaying information may also be stored in the IM server side. In this way, whichever computer is used to log on the IM client terminal by the user, the IM client terminal can acquire the displaying information corresponding to the account number from the IM server side, and display the tabs on the panel according to the displaying information. The process of the IM client terminal determining whether the displaying information of the tabs corresponding to the account number is stored includes: determining whether the displaying information corresponding to the account number is stored in the local device of the IM client terminal, or determining whether the displaying information corresponding to the account number is stored in the IM server. Step 304: validation is performed for the tabs displayed on the panel according to the account number and the key provided by the IM client terminal, when the validation is successful, information related to the account number is displayed on the tabs. At the Step, the above validation may be performed for all of or parts of the tabs displayed on the panel. However, the information related to the account number may be displayed on the tabs without any validation. Step 305: the arrangement and size of (he tabs are adjusted when the size of the panel is adjusted. The description is omitted since Ihe step may be implemented according lo the method shown in Fig.l and Fig.2. Step 306: the IM client terminal stores the adjusted arrangement and size of the tabs as the displaying information corresponding to the account number. Herein, the IM client terminal may automatically store the displaying information on the panel when the user quits the IM client terminal, or perform real-time storage each time the user changes Ihe arrangement and size of the tabs. Through the above processes, the IM client terminal stores the displaying information. When next time the user logs on the IM client terminal, the tabs are displayed according to the displaying information stored at Step 303. In this way, the IM client terminal may display the tabs according to the use custom. Embodiments of the present invention also provide an apparatus for displaying tabs on a web carrier, as shown in Fig. 4, the apparatus includes a web carrier acquiring module 401, a tab setting module 402, an arrangement module 403 and a displaying module 404. The web carrier acquiring module 401 is adapted to acquire a size of a web carrier. The tab setting module 402 is adapted to set minimum value and maximum value of a tab size. The arrangement module 403 is adapt lo determine arrangement of tabs on the web carrier according to the size of the web carrier acquired by the web carrier acquiring module 401 and the minimum value and maximum value of the tab size set by the tab setting module 402. The displaying module 404 is adapted lo display the tabs on the web carrier according to the arrangement of tabs determined by the arrangement module 403. Herein, the minimum value and maximum value of the tab size may be set default. At this time, the apparatus may not include the tab setting module 402. According to the method and apparatus for displaying tabs on a web carrier provided by the present invention, a user may perform customized management on the concerned tabs on the web carrier, i.e., the user may perform operations, such as adding and deleting the tabs, changing the displaying mode or size of the tabs on the web carrier according to his/her favorite, the user may look more tabs and related contents on the same web carrier according lo the operations, so that the interactive experience of the user is improved, and cvislomized demand of the user is satisfied. Moreover, through storing the operations on the tabs, vi'hen next time the user logs on the web carrier, the tabs managed according to individuation are displayed; thereby the use demand of the user is satisfied. The above are only preferred embodiments of the present invention and are not for use in limiting the protection scope of the present invention. All modifications, equivalent replacements or improvements made within the principles of the present invention should be covered under the protection scope of the present invention. Claims 1. A method for displaying tabs on a web carrier, comprising: acquiring the size of the web carrier; determining arrangement of the tabs on the web carrier according to the size of the web carrier and preset minimum value and maximum vahie of the lab size; displaying the tabs on the web can-ier according to the determined arrangement of the tabs. 2. The method of Claim 1, wherein, before acquiring the size of the web carrier, the method further comprises: detecting adjustment of the size of the web carrier; wherein, acquiring the size of the web earner comprises: acquiring the adjusted size of the web carrier 3. The method of Claim 1 or 2, wherein, acquiring the size of the web carrier comprises: acquiring the breadth of the web carrier; the minimum value and maximum value of the tab size includes the minimum value and maximum value of the tab breadth respectively; determining arrangement of the tabs on the web carrier according to the size of the web carrier and the minimum value and maximum value of the tab size comprises: determining the maximum number of the tabs that may be displayed in one line on the web carrier and the minimum number of lines of the tabs on the web carrier according to the breadth of the web carrier and the minimum value and maximum value of the tab breadth; displaying the labs on the web carrier according to the determined arrangement of the tabs comprises; adjusting the position and size of each tab on the web carrier according to the maximum number of the tabs that may be displayed in one line on the web carrier, the minimum number of lines of the tabs on the web carrier, and the minimum value and maximum value of the tab breadth. 4. The method of Claim 3, wherein the maximum number of the tabs that may be displayed in one line is an arbitrary natural number between the quotient obtained through dividing the breadth of the web carrier by the maximum value of the lab breadth and the quotient obtained through dividing the breadth of the web earner by the minimum value of the tab breadth; the minimum number of the lines of the tabs is an arbitrary natural number which is equal with or less than the quotient obtained by dividing the total number of the tabs displayed on the web carrier by the maximum number of the tabs that may be displayed in one line. 5. The method of Claim 1 or 2, wherein, acquiring the size of the web carrier comprises; acquiring the breadth of the web carrier; the minimum value and maximum value of the tab size includes the minimum value and maximum value of the tab breadth respectively; determining arrangement of the labs on the web caiTier according to the size of the web carrier and the minimum value and maximum value of the tab size comprises: determining the maximum number of Ihe tabs that may be displayed in one line on the web carrier and the minimum number of lines of the tabs on the web carrier according to the breadth of the web carrier, Ihe minimum value and maximum value of the lab breadth, and the breadth of the blanks in the web carrier; displaying the tabs on the web carrier according to the determined arrangement of the tabs comprises: adjusting the position and size of each lab on the web carrier according to the maximum number of the tabs that may be displayed in one line on the web carrier, the minimum number of lines of the tabs on the web carrier, the minimum value and maximum value of the tab breadth, and the breadth of the blanks in the web carrier. 6. The method of Claim 5, wherein the maximum number of the tabs that may be displayed in one line is an arbitrary natural number between the quotient obtained through dividing the difference between the breadth of the web carrier and the breadth of blanks in the web carrier by the maximum value of the tab breadth and the quotient obtained through dividing the difference between the breadth of the web carrier and the breadth of blanks in the web carrier by the minimum value of the tab breadth; the minimum number of the lines of the tabs is an arbitrary natural number which is equal with or less than the quotient obtained by dividing the total number of the tabs displayed on the web carrier by the maximum number of the tabs that may be displayed in one line. 7. The method of Claim 5 or 6, wherein, the blanks in the web carrier includes blanks between two tabs and the web carrier margin. 8. The method of Claim 1, further comprising: storing the airangemeiit of ihe tabs on the web carrier when the web cairier is logged on through an account number; displaying the tabs on the web carrier according to the arrangement of the tabs on the web can-jer when next time the web carrier is logged on through (he same acconnt number. 9. The method of Claim 1, wherein the web carrier comprises an IM client terminal panel or a browser used for display a web site. 10. An apparatus for displaying tabs on a web carrier, comprising: a first module, adapted to acquire a size of a web caiTier; a second module, adapt to determine arrangement of tabs on the web carrier according lo the size of the web carrier acquired by the first module and preset minimum vahie and maximum value of the tab size; a third module, adapted to display the tabs on the web carrier according lo the arrangement of tabs determined by the second module. 11. The apparatus of Claim 10, further comprising: a fourth module, adapted to set the minimum value and maximum value of the tab size, and send Ihe set minimum value and maximum value of the tab size to the second module. |
---|
Patent Number | 269108 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Indian Patent Application Number | 3295/CHE/2008 | |||||||||
PG Journal Number | 41/2015 | |||||||||
Publication Date | 09-Oct-2015 | |||||||||
Grant Date | 30-Sep-2015 | |||||||||
Date of Filing | 26-Dec-2008 | |||||||||
Name of Patentee | TENCENT TECHNOLOGY (SHENZHEN) COMPANY LTD | |||||||||
Applicant Address | 4/F, EAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANDONG 518044 | |||||||||
Inventors:
|
||||||||||
PCT International Classification Number | B65H23/00 | |||||||||
PCT International Application Number | N/A | |||||||||
PCT International Filing date | ||||||||||
PCT Conventions:
|