I found a solution that's working here:
http://jsfiddle.net/9xr5af00/
(next step: CSS stuff)
--------------------------------------------
En date de : Mar 21.6.16, Pascal BASTIEN <pbasnews-xwiki(a)yahoo.fr> a écrit :
Objet: need help about JS/webjar integration
À: "XWiki Users" <users(a)xwiki.org>
Date: Mardi 21 juin 2016, 11h53
Hi,
about http://jira.xwiki.org/browse/XWIKI-13470
I can use https://silviomoreto.github.io/bootstrap-select/ JS if
I copy js content in a JSX object between this stuff:
require(['jquery'], function ($) {
});
To PullRequesting I need to writing cleaner code: I mean
"use RequireJS and WebJars API to load and use the
bootstrap-select widget"
Then I copied bootstrap-select JAR to WEB-INF/lib and add
add this 2 lines in ./skins/flamingo/javascript.vm:
(bootstrap-select requires jQuery v1.8.0+, Bootstrap’s
dropdown.js component, and Bootstrap's CSS.)
------------------------------
require.config({
paths: {
'jquery':
'#removeJsSuffix($services.webjars.url("jquery",
"jquery${jsExtension}"))',
'bootstrap':
'#removeJsSuffix($services.webjars.url("bootstrap",
"js/bootstrap${jsExtension}"))',
'bootstrap-select':
'#removeJsSuffix($services.webjars.url("bootstrap-select/1.10.0/js/bootstrap-select.js"))',
<cut>
shim: {
'bootstrap' : ['jquery'],
'bootstrap-select' : ['jquery'],
(or 'bootstrap-select' : ['jquery', 'bootstrap'],
<cut>
I tested with minify version too with
shim: {
'bootstrap' : ['jquery'],
'bootstrap-select': {
deps: ['jquery', 'bootstrap'],
exports: 'bootstrap-select'
},
http://requirejs.org/docs/api.html#config-shim
------------------------------
Unfortunaly when I use the webjar with this config,
bootstrap-select doesn't work.
Do I miss something?
(Source Page generated contain:
'bootstrap-select':
'/xwiki/webjars/wiki%3Axwiki/bootstrap-select/1.10.0/js/bootstrap-select.js?r=1',
and my browser can read bootstrap-select.js content at this
URL.)
(I tried to enables this too:
pluginsToDisable = ['collapse', 'dropdown', 'modal',
'tooltip', 'tab', 'popover'] => pluginsToDisable =
['collapse', 'modal', 'tooltip', 'tab', 'popover']
Any help are welcome.
Thxs
Pascal B
Bonjour,
Voici des informations pour la création d'un premier wiki sur votre
plateforme :
* *description*:
Je souhaite utiliser xwiki en ligne afin de proposer des outils
collaboratifs de démocratie participative
aux membres du Conseil du Quartier Centre de Bagnolet (93170).
D’un point de vue fonctionnel, j’envisage d’implémenter :
- Des espaces de travail
- Une gestion documentaire et médias,
- une veille collaborative (à l’aide de xwikiwatch)
dédiés aux différents groupes et intergroupes auxquels je
participe.
* *owner name*:
Paule Bouton
* *wiki name*:
bagnoletcqcentre.myxwiki.org
Merci pour votre diligence et attention.
*Paule Bouton*
paulebouton(a)gmail.com <mailto:paulebouton@gmail.com>
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
Hi,
about http://jira.xwiki.org/browse/XWIKI-13470
I can use https://silviomoreto.github.io/bootstrap-select/ JS if I copy js content in a JSX object between this stuff:
require(['jquery'], function ($) {
});
To PullRequesting I need to writing cleaner code: I mean "use RequireJS and WebJars API to load and use the bootstrap-select widget"
Then I copied bootstrap-select JAR to WEB-INF/lib and add add this 2 lines in ./skins/flamingo/javascript.vm:
(bootstrap-select requires jQuery v1.8.0+, Bootstrap’s dropdown.js component, and Bootstrap's CSS.)
------------------------------
require.config({
paths: {
'jquery': '#removeJsSuffix($services.webjars.url("jquery", "jquery${jsExtension}"))',
'bootstrap': '#removeJsSuffix($services.webjars.url("bootstrap", "js/bootstrap${jsExtension}"))',
'bootstrap-select': '#removeJsSuffix($services.webjars.url("bootstrap-select/1.10.0/js/bootstrap-select.js"))',
<cut>
shim: {
'bootstrap' : ['jquery'],
'bootstrap-select' : ['jquery'],
(or 'bootstrap-select' : ['jquery', 'bootstrap'],
<cut>
I tested with minify version too with
shim: {
'bootstrap' : ['jquery'],
'bootstrap-select': {
deps: ['jquery', 'bootstrap'],
exports: 'bootstrap-select'
},
http://requirejs.org/docs/api.html#config-shim
------------------------------
Unfortunaly when I use the webjar with this config, bootstrap-select doesn't work.
Do I miss something?
(Source Page generated contain:
'bootstrap-select': '/xwiki/webjars/wiki%3Axwiki/bootstrap-select/1.10.0/js/bootstrap-select.js?r=1',
and my browser can read bootstrap-select.js content at this URL.)
(I tried to enables this too:
pluginsToDisable = ['collapse', 'dropdown', 'modal', 'tooltip', 'tab', 'popover'] => pluginsToDisable = ['collapse', 'modal', 'tooltip', 'tab', 'popover']
Any help are welcome.
Thxs
Pascal B
Hi.
I made a new Xwiki installazione, but when I create an article or a space
with a title likes "One two" I see two titles/names: "One two" and
"One+two".
Wath I made wrong?
I used "war" package 7.4.3 and 7.4.4-SNAPSHOT on CentOS 7.2 (as minimal
server) with OpenJDK 1.8.0_91, Tomcat 8.0.35, MariaDB 5.5.47 and the Oracle
mysql connector 5.1.9.
Thanks in advance.
--
View this message in context: http://xwiki.475771.n2.nabble.com/Xwiki-replace-with-on-title-tp7599972.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello guys,
i am quite desperate installing xwiki 8.1. It is a fresh install and i
try to install it via apt package management on a fresh debian stable
distribution. Everything works fine until i want to access the xwiki
page http://localhost:8080. I only get a "error 404" tomcat default
error page presented.
I installed the following packages without errors:
*/- xwiki-enterprise-common /*
*/- xwiki-enterprise-tomcat8-mysql/*
*/- xwiki-solr-data/*
*//*
*/I also edited the JAVA_OPTS to "-Xmx512m"/*
*/I also tried it with different debian distributions but i encounter
the same problem every/**//*//time*/. I always use a "headless" debian
install without X11 if that matters./*
*//*
*/Any help would be appreciated.
/**/Thanks/*
*/Patrick/*
*//*
All -
I am trying to use the XWiki REST APIs to create a user in our XWiki system,
but I am not able to give them admin rights.
Background:
I have an empty database (mysql) and I am running an XWiki war inside a
tomcat server. The system starts correctly and creates the database with
default data. No issues at this point. Next I want to create an admin user
with the REST APIs.
What I want to accomplish with REST APIs:
1) Create an admin user using REST API.
2) Login to the XWiki with that admin user.
3) import the XAR file (xwiki-enterprise-ui-mainwiki-all-8.1.xar).
4) Change the admin user back to a normal user using the REST API.
5) Add the user to the XWikiAdminGroup and use those group rights going
forward.
6) Login again as an admin user as part of the XWikiAdminGroup group.
7) Any user can edit their own profile (admin or not). Currently it can
only be edited by admin users.
8) User is assigned the home wiki as a default wiki.
I have two issues at this point. One there is no way to run the REST call
except as a superadmin, because there are no admin users created during the
initial data load (I think that I saw that admin users are not created when
running just the xwiki.war). If I add a new user to the system, the user is
created, but I cannot seem to find a way to make them an admin user so that
I can import an xar file to load the extra setup for the XWiki.
I cannot login to the XWiki as a superadmin, because I have enabled CAS SSO.
REST API to create admin group:
curl -v -u superadmin:system -X PUT -H "Content-type: text/plain"
--data-ascii ' '
http://<ipaddr>/xwiki-enterprise-web-8.1-SNAPSHOT/rest/wikis/xwiki/spaces/XWiki/pages/XWikiAdminGroup
curl -v -u superadmin:system -X POST -d
"className=XWiki.XWikiRights&property#levels=login,view,edit,delete,creator,register,comment,script,admin,createwiki,programming&property#allow=1"
http://localhost:8080/xwiki-enterprise-web-8.1-SNAPSHOT/rest/wikis/xwiki/sp…
REST API to create user:
curl -v -u superadmin:system -X PUT -H "Content-type: text/plain"
--data-ascii '{{include document="XWiki.XWikiUserSheet"/}}'
http://<ipaddr>/xwiki-enterprise-web-8.1-SNAPSHOT/rest/wikis/xwiki/spaces/XWiki/pages/foo
curl -v -u superadmin:system -X POST -d
"className=XWiki.XWikiUsers&property#first_name=FooFirst&property#last_name=FooLast&property#password=foo"
http://<ipaddr>/xwiki-enterprise-web-8.1-SNAPSHOT/rest/wikis/xwiki/spaces/XWiki/pages/foo/objects
curl -v -u superadmin:system -X POST -d
"className=XWiki.XWikiRights&property#levels=edit&property#allow=1&property#users=XWiki.foo"
http://<ipaddr>/xwiki-enterprise-web-8.1-SNAPSHOT/rest/wikis/xwiki/spaces/XWiki/pages/foo/objects
curl -v -u superadmin:system -X POST -d
"className=XWiki.XWikiGroups&property#member=XWiki.foo"
http://<ipaddr>/xwiki-enterprise-web-8.1-SNAPSHOT/rest/wikis/xwiki/spaces/XWiki/pages/XWikiAdminGroup/objects
Any help would be greatly appreciated!
Thanks,
John
--
View this message in context: http://xwiki.475771.n2.nabble.com/Using-REST-APIs-to-create-Users-and-give-…
Sent from the XWiki- Users mailing list archive at Nabble.com.
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…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, I would like a wiki for:
*Description*: Document small things I would like to remember, and might
even help out others
*Owner Name*: Tom Groeneveld
*Wiki Name*: Fantasyworld
Kind regards, Tom.