[xwiki-users] Redirect to page on 'Save' action
Hi there, I had a question regarding the redirect that is happening in the SaveAction class. When you have a title such as "1 & 2", hitting 'Save' will make the AJAX call and redirect you to "www.wiki.com/bin/view/1+%26+2". The encoding of the '&' appears to be done in the call to Util.getRedirect('view', context) in the SaveAction class. I want to be able to redirect to "www.wiki-name.com/bin/view/1+&+2" so that users do not have to see the encoded URL (in case they wish to copy-paste the url elsewhere). I was able to do this by extending the SaveAction class into a class of my own, overriding the action() method, and doing a string replace of all instances of "%26" with "&"; however, this is a very hacky solution. I was hoping to get input on any other alternative ways to provide cleaner URLs to my users. Thank you! -- View this message in context: http://xwiki.475771.n2.nabble.com/Redirect-to-page-on-Save-action-tp7600164.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Changing border-top color of basic tables
Thanks for the suggestion! I have thought about this; however, I was hoping for a more robust solution. Ideally, I'd prefer to not have users do extra work to have what should be the default behavior. -- View this message in context: http://xwiki.475771.n2.nabble.com/Changing-border-top-color-of-basic-tables-tp7599949p7599986.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Changing border-top color of basic tables
Hi, I was looking into a way to modify the border-top color of tables in XWiki (defined in table.less) such that all basic tables have a solid 1px black top border (instead of the current solid 1px #ddd definition). I've been having trouble with finding a proper way to apply the style only to basic tables. Here are a few approaches I have taken: *Approach 1.* Override the tables.less file in our own tables_overrides.less and make all tables have a black 1px border. *Problem:* This selector is too general, and adds a black border to all tables on the page (History pane, Format guide, etc) *Approach 2.* Narrow the selector down to #xwikicontent (only the user’s content). #xwikicontent .table *Problem:* Now all tables in the xwikicontent div have borders and nowhere outside; however, other tables (such as those used by live tables) are also selected, making the LiveTables look wrong. *Approach 3.* Modify only the source where the border-color is defined (because table styles simply use @table-border-color variable to define the default border-top style *Problem:* XWiki uses tables throughout (i.e. History pane) and these tables also use @table-border-color, making their border-top black as well. *Approach 4.* Create a new table class (i.e. class=“bordered”) so that we can specifically select tables defined by CKEditor and nothing else. Hook into CKEditor table dialog and set Stylesheet Classes to “bordered” by default *Problem:* Users creating tables via source editor will have no context of adding borders to their table and their tables will not have proper borders by default As of now, there does not seem to be any clear cut way of selecting only the basic tables (because so many other parts of XWiki use that basic table). I was wondering if anyone has any insight on a possible solution to this issue. Thanks! -- View this message in context: http://xwiki.475771.n2.nabble.com/Changing-border-top-color-of-basic-tables-tp7599949.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Disabling javascript in HTML macro
Thank you for the responses, Vincent and Marius. After playing around with the HTML macro, I came across a potential solution. It appears that all the XWiki-created pages reside within certain spaces (xwiki:Wiki, xwiki:WikiManager, etc). With that in mind, I was able to prototype an override for the HTML macro that whitelisted specific wiki spaces (Wiki, WikiManager, etc) and potentially lock down the creation/edit of pages in those spaces to the Admin group. This way we would be able to avoid conflicting with any existing Javascript usage while preventing outside (non-admin) users from using JavaScript on their pages. In the event that the page in question is not part of the whitelisted space and contains Javascript, we would return an error block with an error message instead of rendering the content passed into the HTML macro. I wanted to get any input on if this is a viable solution or if there are any crucial parts I may have overlooked that jeopardize this approach. Thank you! -- View this message in context: http://xwiki.475771.n2.nabble.com/Disabling-javascript-in-HTML-macro-tp7599019p7599044.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Disabling javascript in HTML macro
Hi, I wanted to assess how difficult it might be to disable all javascript execution in HTML macros on XWiki. My main concern would be to avoid breaking any important XWiki pages that utilize javascript within the HTML macro (as referenced here: http://lists.xwiki.org/pipermail/users/2009-June/012226.html). Is there any XWiki functionality that is still dependent on executing javascript via {{html}}? I also noticed in the comments on this JIRA issue (https://jira.xwiki.org/browse/XRENDERING-27?jql=text%20~%20%22html%20macro%20script%22), Vincent Massol mentioned that wiki macros 2.0 will be designed in such a way that we can override the HTML macro and filter out javascript usages. I was wondering if this was still the best solution to disabling future javscript usage within {{html}}. Thank you! -- View this message in context: http://xwiki.475771.n2.nabble.com/Disabling-javascript-in-HTML-macro-tp7599019.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Formatting Blocks
Hi, I had a question regarding styling Blocks (ParagraphBlock, TextBlock, etc). I noticed in the documentation of the code (https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-api/src/main/java/org/xwiki/rendering/block/Block.java#L247-L248) that we could use the parameters map; however, it does not seem to be working. I've tried to find more documentation or use cases/examples online with no luck. Could someone provide more context on this? Thank you! -- View this message in context: http://xwiki.475771.n2.nabble.com/Formatting-Blocks-tp7598906.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Fetching resources from cdn
Hi, I had a question regarding resource calls in XWiki. Currently, they are being made to my local environment and I would like to know if there is any simple way to modify the calls to fetch the resources from a CDN. I was able to replicate my desired functionality by extending the AbstractSkinExtensionPlugin and its API class; however, to fully implement the changes would require overriding all the classes for jsfx, jsx, jsrx, ssx, etc. Is there any simpler way to do this? To clarify, I'd like to change the url being hit by the script tag from ' https://mywebsite/resources/js/file.js' to ' https://cdnwebsite/mywebsite/resources/js/file.js'. Thank you! Best, Andrew ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users