Dropdown button to make a pad from homepage
This commit is contained in:
parent
d93086a92d
commit
46b5b8766d
@ -76,9 +76,9 @@
|
|||||||
<!--<button class="btn btn-secondary knowmore">Know more</button>-->
|
<!--<button class="btn btn-secondary knowmore">Know more</button>-->
|
||||||
<!--<button class="btn btn-secondary tryit">Discover our tools</button>-->
|
<!--<button class="btn btn-secondary tryit">Discover our tools</button>-->
|
||||||
<!--<br>-->
|
<!--<br>-->
|
||||||
<!--<button class="btn btn-success nologin" data-localization="login_nologin"></button>-->
|
<button class="btn btn-secondary nologin" data-localization="login_nologin"></button>
|
||||||
<!--<button class="btn btn-success nologin">Make a pad right now</button>-->
|
<!--<button class="btn btn-success nologin">Make a pad right now</button>-->
|
||||||
<p class="buttons"><a id="create-pad" href="/pad/"><button class="btn btn-success nologin">Make a pad right now</button></a></p>
|
<!--<p class="buttons"></p>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -347,7 +347,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
min-width: 200px;
|
min-width: 250px;
|
||||||
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
|
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
@ -735,6 +735,7 @@ html.cp,
|
|||||||
height: calc(100vh - 150px);
|
height: calc(100vh - 150px);
|
||||||
min-height: 450px;
|
min-height: 450px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
z-index: 1;
|
||||||
font-size: medium;
|
font-size: medium;
|
||||||
}
|
}
|
||||||
.cp #main #main-container,
|
.cp #main #main-container,
|
||||||
|
|||||||
@ -35,9 +35,25 @@ define([
|
|||||||
|
|
||||||
var displayCreateButtons = function () {
|
var displayCreateButtons = function () {
|
||||||
var $parent = $('#buttons');
|
var $parent = $('#buttons');
|
||||||
|
var options = [];
|
||||||
Config.availablePadTypes.forEach(function (el) {
|
Config.availablePadTypes.forEach(function (el) {
|
||||||
$('#create-' + el).attr('target', '_blank').show();
|
options.push({
|
||||||
|
tag: 'a',
|
||||||
|
attributes: {
|
||||||
|
'class': 'newdoc',
|
||||||
|
'href': '/' + el,
|
||||||
|
'target': '_blank'
|
||||||
|
},
|
||||||
|
content: Messages['button_new' + el] // Pretty name of the language value
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
var dropdownConfig = {
|
||||||
|
text: Messages.makeAPad, // Button initial text
|
||||||
|
options: options, // Entries displayed in the menu
|
||||||
|
};
|
||||||
|
var $block = Cryptpad.createDropdown(dropdownConfig);
|
||||||
|
$block.find('button').addClass('btn').addClass('btn-success');
|
||||||
|
$block.appendTo($parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Language selector
|
// Language selector
|
||||||
|
|||||||
@ -10,9 +10,9 @@
|
|||||||
<!--<button class="btn btn-secondary knowmore">Know more</button>-->
|
<!--<button class="btn btn-secondary knowmore">Know more</button>-->
|
||||||
<!--<button class="btn btn-secondary tryit">Discover our tools</button>-->
|
<!--<button class="btn btn-secondary tryit">Discover our tools</button>-->
|
||||||
<!--<br>-->
|
<!--<br>-->
|
||||||
<!--<button class="btn btn-success nologin" data-localization="login_nologin"></button>-->
|
<button class="btn btn-secondary nologin" data-localization="login_nologin"></button>
|
||||||
<!--<button class="btn btn-success nologin">Make a pad right now</button>-->
|
<!--<button class="btn btn-success nologin">Make a pad right now</button>-->
|
||||||
<p class="buttons"><a id="create-pad" href="/pad/"><button class="btn btn-success nologin">Make a pad right now</button></a></p>
|
<!--<p class="buttons"></p>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -297,6 +297,7 @@ body.html {
|
|||||||
min-height: 450px;
|
min-height: 450px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
//margin-top: 100px;
|
//margin-top: 100px;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
font-size: medium;
|
font-size: medium;
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
min-width: 200px;
|
min-width: 250px;
|
||||||
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
|
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
min-width: 200px;
|
min-width: 250px;
|
||||||
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
|
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
|
|||||||
@ -296,6 +296,7 @@ define(function () {
|
|||||||
out.table_created = 'Créé le';
|
out.table_created = 'Créé le';
|
||||||
out.table_last = 'Dernier accès';
|
out.table_last = 'Dernier accès';
|
||||||
|
|
||||||
|
out.makeAPad = 'Créer un document';
|
||||||
out.button_newpad = 'Nouveau document texte';
|
out.button_newpad = 'Nouveau document texte';
|
||||||
out.button_newcode = 'Nouvelle page de code';
|
out.button_newcode = 'Nouvelle page de code';
|
||||||
out.button_newpoll = 'Nouveau sondage';
|
out.button_newpoll = 'Nouveau sondage';
|
||||||
|
|||||||
@ -294,6 +294,7 @@ define(function () {
|
|||||||
out.table_created = 'Created';
|
out.table_created = 'Created';
|
||||||
out.table_last = 'Last Accessed';
|
out.table_last = 'Last Accessed';
|
||||||
|
|
||||||
|
out.makeAPad = 'Make a pad right now';
|
||||||
out.button_newpad = 'New Rich Text pad';
|
out.button_newpad = 'New Rich Text pad';
|
||||||
out.button_newcode = 'New Code pad';
|
out.button_newcode = 'New Code pad';
|
||||||
out.button_newpoll = 'New Poll';
|
out.button_newpoll = 'New Poll';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user