Closed gnadelwartz closed 7 years ago
You better use default output and the theme can replace it with the button
Here is the hint for you. Find right frame url and edit the following command and then run it using console making sure that the frame is selected (not top).
f__lnk_t_btn(['/virtual-server/', '/virtual-server/index.cgi', '/virtual-server/edit_plan.cgi'], 'form table tbody td', 'a[href*="list_users.cgi?"], a[href*="list_aliases.cgi?"]', 'btn btn-transparent btn-transparent-link-force btn-borderless btn-xxs vertical-align-top margined-top-2', 0, '(~)', ' ~ ', '(~..)');
Plain links in the table will be replaced with buttons. This function also receives icon name, replace 0
with fa-eye
for example to let the button have an icon.
thanks, I'll give it a try. what do you mean with "default output"? Only plain link without div and sourrounding []
?
have done like sugested: open Console in FF, make shure right frame is selected and input:
f__lnk_t_btn(['/majordomo/', '/majordomo/index.cgi'], 'form table tbody td', 'a[href*="edit_info.cgi?"], a[href*="edit_members.cgi?"]', 'btn btn-transparent btn-transparent-link-force btn-borderless btn-xxs vertical-align-top margined-top-2', 0, '(~)', ' ~ ', '(~..)');
Result was:
undefined
same happen when I enter /majordomo/index.cgi
in the browser and repeat console input
It's alright with any output, if you already made a change.
It's messy either way. There is only one clean way to build it. JSON response from the server and then drawing it on the client side using MVVMs. No iframes, no loading/reloading stuff on each page load.
Meanwhile it's not possible, so we deal with bunch of the mess.
We're heading to this direction.
Can you please post complete page HTML? Including the page's windows location?
sorry for late resposne, but today is "fathers day" in germany and we went to my father to wish him care :-)
attached you find an zip archive with an example HTML. the frame locations can be /majordomo/
and /majordomo/index.cgi
. The links I like to be replaced are edit_info.cgi?
and edit_members.cgi?
I think about replacing them with an Edit icon like in file manager:
You could add:
f__lnk_t_btn(['/majordomo/', '/majordomo/index.cgi'], 'table tbody td em', 'a[href*="edit_info.cgi?"], a[href*="edit_members.cgi?"]', 'btn btn-transparent btn-xxs vertical-align-top margined-top-2', 'fa-edit fa-xs');
Wrapping links in [ ]
is not very good, I think. You might need to run some other script to remove it.
Hi again, with a little bit of modification and some aditional JS and CSS I made it working, you can see the result in https://github.com/webmin/webmin/pull/574
👍
JC accepted my patches to convert majordomo module from button based to more modern table based layout, see https://github.com/webmin/webmin/pull/572
to work with every theme I placed regular
[edit]
links to call existing cgi's. For better integration (and nicer look) I need some advice how to change HTML Code to display edit Icons if atuthetic theme is used,HTML Code for a table line looks currently like this;
I put mailinglist icon in a div .majordomo_icon and text+edit links in a div .majordomo_edit
any suggestions for improvements?