Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -365,5 +365,62 @@ define([
|
||||
])];
|
||||
};
|
||||
|
||||
var appToolbar = function () {
|
||||
return h('div#toolbar.toolbar-container');
|
||||
};
|
||||
|
||||
Pages['/whiteboard/'] = Pages['/whiteboard/index.html'] = function () {
|
||||
return [
|
||||
appToolbar(),
|
||||
h('div#canvas-area', h('canvas#canvas', {
|
||||
width: 600,
|
||||
height: 600
|
||||
})),
|
||||
h('div#controls', {
|
||||
style: {
|
||||
display: 'block',
|
||||
}
|
||||
}, [
|
||||
h('button#clear', Msg.canvas_clear), ' ',
|
||||
h('button#toggleDraw', Msg.canvas_disable),
|
||||
h('button#delete', {
|
||||
style: {
|
||||
display: 'none',
|
||||
}
|
||||
}),
|
||||
h('input#width', {
|
||||
type: 'range',
|
||||
value: "5",
|
||||
min: "1",
|
||||
max: "100"
|
||||
}),
|
||||
h('label', {
|
||||
'for': 'width'
|
||||
}, Msg.canvas_width),
|
||||
h('input#opacity', {
|
||||
type: 'range',
|
||||
value: "1",
|
||||
min: "0.1",
|
||||
max: "1",
|
||||
step: "0.1"
|
||||
}),
|
||||
h('label', {
|
||||
'for': 'width',
|
||||
}),
|
||||
h('span.selected')
|
||||
]),
|
||||
setHTML(h('div#colors'), ' '),
|
||||
loadingScreen(),
|
||||
h('div#cursors', {
|
||||
style: {
|
||||
display: 'none',
|
||||
background: 'white',
|
||||
'text-align': 'center',
|
||||
}
|
||||
}),
|
||||
h('div#pickers'),
|
||||
];
|
||||
};
|
||||
|
||||
return Pages;
|
||||
});
|
||||
|
||||
@@ -6,11 +6,13 @@ define([
|
||||
|
||||
'css!/customize/main.css',
|
||||
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
||||
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
|
||||
], function ($, h, Cryptpad, Pages) {
|
||||
$(function () {
|
||||
var Messages = Cryptpad.Messages;
|
||||
var $body = $('body');
|
||||
var isMainApp = function () {
|
||||
return /^\/(pad|code|slide|poll|whiteboard)\//.test(location.pathname);
|
||||
};
|
||||
|
||||
var rightLink = function (ref, loc, txt) {
|
||||
return h('span.link.right', [
|
||||
@@ -113,11 +115,24 @@ $(function () {
|
||||
]));
|
||||
|
||||
var pathname = location.pathname;
|
||||
if (/^\/(pad|code|slide|poll|whiteboard)\//.test(pathname)) {
|
||||
// TODO load apps
|
||||
return;
|
||||
|
||||
|
||||
if (isMainApp()) {
|
||||
if (typeof(Pages[pathname]) === 'function') {
|
||||
$('body').html(h('body', Pages[pathname]()).innerHTML);
|
||||
setTimeout(function () {
|
||||
require(['/whiteboard/main.js'], function () {
|
||||
$('body').removeClass('noscroll');
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
require([
|
||||
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
|
||||
], function () {});
|
||||
|
||||
$body.append($topbar).append($main).append($footer);
|
||||
|
||||
if (/^\/settings\//.test(pathname)) {
|
||||
|
||||
Reference in New Issue
Block a user