ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
68971
|
Tue May 14 09:40:58 2019 |
| Xuan Wu | wux@ihep.ac.cn | Comment | Linux | 3.1.3 | add a little function--go to the specified page number | Hi all,
I added an input widget for pagination. I'd like to share it here, maybe someone needs. If there are many pages, specifying the page number will be useful.
The picture and patch code are in the attachment
Regards,
Xuan |
Attachment 1: pagination.png
|
|
Attachment 2: goto.patch
|
--- elogd.c.org 2019-05-14 10:12:01.891558950 +0800
+++ elogd.c 2019-05-14 10:44:38.165898395 +0800
@@ -19407,6 +19407,26 @@ void show_page_navigation(LOGBOOK * lbs,
rsprintf("<a href=\"%s\">%s</a>\n", ref, loc("All"));
}
+ sprintf(ref, "");
+ build_ref(ref, sizeof(ref), "", "", "", "");
+
+ rsprintf("<input id=\"setPage\" title=\"Goto\" type=number size=\"6\" onChange=\'getPage(\"%d\");\'>", num_pages);
+ rsprintf("<script language=\"JavaScript\" type=\"text/javascript\">\n");
+ rsprintf("<!--\n");
+ rsprintf("function getPage(max)\n");
+ rsprintf(" {\n");
+ rsprintf(" var value = document.getElementById('setPage').value;\n");
+ rsprintf(" value = parseInt(value);\n");
+ rsprintf(" if(value > max)\n");
+ rsprintf(" value = max;\n");
+ rsprintf(" if(value < 1)\n");
+ rsprintf(" value = 1;\n");
+ rsprintf(" var url = 'page' + value + \"%s\";\n", ref);
+ rsprintf(" window.location.href = url;\n");
+ rsprintf(" }\n");
+ rsprintf("//-->\n");
+ rsprintf("</script>\n");
+
rsprintf("</span></td></tr>\n");
}
|
68984
|
Tue May 21 15:42:46 2019 |
| Finn Junker | fj@tvis.net | Question | Linux | Windows | 3.1.3 | Re: Pinned entry | Hello Stefan
Works great and very usefull - but not when you use reverse sort = 1?.
Is there a way to get both. Pinned first and then the rest i reversed order (highest ID on page 1)
Kind Regards Finn
Stefan Ritt wrote: |
This is not directly possible, but you can configure it with a trick. Create an attribute "pinned", make it of type "boolean", and set the start page such that it sorts using the "pinned" attribute:
Atributes = ..., Pinned
Options Pinned = boolean
Start page = ?rsort=Pinned
This move all entries where "Pinned" is true to the top of the list.
Stefan
Giuseppe Cucinotta wrote: |
Hi everybody,
sorry if this question has already been posed (I did a quick search but I didn't found anything): elog sorts entry by ID, I wonder if it is possible to pin an entry in order to be always on top of the page independently on its ID.
Thanks
Giuseppe
|
|
|
68995
|
Wed Aug 7 02:57:55 2019 |
| Lech | subs@lwp.email | Question | Linux | 3.1.3 | tags | Hello,
Is it possible to create tags for new entries in elog? I understand it would have to be some kind of mix between Extendable options and moptions. Currently, whatever is entered in extendable options forms one option, while usually for tags, words separated by # form different tags. As usual with tags, I would like to add multiple tags to my new entry and then be able to filter all entries by specific tag or group of tags. |
68996
|
Wed Aug 7 17:16:30 2019 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.1.3 | Re: tags #testtag | While tags are not explicitly foreseen, you can use moptions and filter with them. Look at this logbook for example: Click on "Find", then select one or more boxes of the "OS" attribute, and you will see the filtering. Another option is to use freetext in the subject for example. I added "#testtag" in this subject, so you can search for the text "#testtag" and will find this entry.
Stefan
Lech wrote: |
Hello,
Is it possible to create tags for new entries in elog? I understand it would have to be some kind of mix between Extendable options and moptions. Currently, whatever is entered in extendable options forms one option, while usually for tags, words separated by # form different tags. As usual with tags, I would like to add multiple tags to my new entry and then be able to filter all entries by specific tag or group of tags.
|
|
69006
|
Tue Aug 20 09:47:06 2019 |
| Lech | subs@lwp.email | Question | Linux | 3.1.3 | Drag and drop does not work in 3.1.3? | Hello,
I can paste images into text (which resulted in the text_size too long error message), however, I can't drop them on my elog. However, I can do it on the demo version. Was the drag and drop into text already supported in version 3.1.3 and I am just missing some configuration option, or do I need to find a repository with a more recent version of elog?
Thanks! |
69007
|
Tue Aug 20 10:34:37 2019 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.1.3 | Re: Drag and drop does not work in 3.1.3? | The Drag & Drop was implemented already in 3.0.0 (see https://elog.psi.ch/elog/download/ChangeLog). So no idea why it's not working for you.
Stefan
Lech wrote: |
Hello,
I can paste images into text (which resulted in the text_size too long error message), however, I can't drop them on my elog. However, I can do it on the demo version. Was the drag and drop into text already supported in version 3.1.3 and I am just missing some configuration option, or do I need to find a repository with a more recent version of elog?
Thanks!
|
|
69009
|
Tue Aug 20 11:37:03 2019 |
| Lech | subs@lwp.email | Question | Linux | 3.1.3 | Re: Drag and drop does not work in 3.1.3? | Can I find the config of the demo elog somewhere, so I could try it locally?
Stefan Ritt wrote: |
The Drag & Drop was implemented already in 3.0.0 (see https://elog.psi.ch/elog/download/ChangeLog). So no idea why it's not working for you.
Stefan
Lech wrote: |
Hello,
I can paste images into text (which resulted in the text_size too long error message), however, I can't drop them on my elog. However, I can do it on the demo version. Was the drag and drop into text already supported in version 3.1.3 and I am just missing some configuration option, or do I need to find a repository with a more recent version of elog?
Thanks!
|
|
|
69010
|
Tue Aug 20 11:45:14 2019 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.1.3 | Re: Drag and drop does not work in 3.1.3? | It's the config from the distribution. A copy is below.
Stefan
[global]
port = 8080
[demo]
Theme = default
Comment = General Linux Tips & Tricks
Attributes = Author, Type, Category, Subject, Pinned
Options Pinned = boolean
Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other
Options Category = General, Hardware, Software, Network, Other
Extendable Options = Category
Required Attributes = Author, Type
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date, Type
Last default = 31
Lech wrote: |
Can I find the config of the demo elog somewhere, so I could try it locally?
Stefan Ritt wrote: |
The Drag & Drop was implemented already in 3.0.0 (see https://elog.psi.ch/elog/download/ChangeLog). So no idea why it's not working for you.
Stefan
Lech wrote: |
Hello,
I can paste images into text (which resulted in the text_size too long error message), however, I can't drop them on my elog. However, I can do it on the demo version. Was the drag and drop into text already supported in version 3.1.3 and I am just missing some configuration option, or do I need to find a repository with a more recent version of elog?
Thanks!
|
|
|
|
|