add new feedback keys
This commit is contained in:
parent
7a5c5ce0a3
commit
39149a052b
4 changed files with 18 additions and 6 deletions
|
@ -150,6 +150,7 @@ define([
|
||||||
options: options, // Entries displayed in the menu
|
options: options, // Entries displayed in the menu
|
||||||
left: true, // Open to the left of the button
|
left: true, // Open to the left of the button
|
||||||
isSelect: true,
|
isSelect: true,
|
||||||
|
feedback: 'CODE_LANGUAGE',
|
||||||
};
|
};
|
||||||
var $block = exp.$language = Cryptpad.createDropdown(dropdownConfig);
|
var $block = exp.$language = Cryptpad.createDropdown(dropdownConfig);
|
||||||
$block.find('button').attr('title', Messages.languageButtonTitle);
|
$block.find('button').attr('title', Messages.languageButtonTitle);
|
||||||
|
@ -183,7 +184,8 @@ define([
|
||||||
options: options, // Entries displayed in the menu
|
options: options, // Entries displayed in the menu
|
||||||
left: true, // Open to the left of the button
|
left: true, // Open to the left of the button
|
||||||
isSelect: true,
|
isSelect: true,
|
||||||
initialValue: lastTheme
|
initialValue: lastTheme,
|
||||||
|
feedback: 'CODE_THEME',
|
||||||
};
|
};
|
||||||
var $block = exp.$theme = Cryptpad.createDropdown(dropdownConfig);
|
var $block = exp.$theme = Cryptpad.createDropdown(dropdownConfig);
|
||||||
$block.find('button').attr('title', Messages.themeButtonTitle);
|
$block.find('button').attr('title', Messages.themeButtonTitle);
|
||||||
|
|
|
@ -1205,6 +1205,7 @@ define([
|
||||||
setActive($val);
|
setActive($val);
|
||||||
$innerblock.scrollTop($val.position().top + $innerblock.scrollTop());
|
$innerblock.scrollTop($val.position().top + $innerblock.scrollTop());
|
||||||
}
|
}
|
||||||
|
if (config.feedback) { Cryptpad.feedback(config.feedback); }
|
||||||
};
|
};
|
||||||
|
|
||||||
$container.click(function (e) {
|
$container.click(function (e) {
|
||||||
|
@ -1403,7 +1404,8 @@ define([
|
||||||
text: $userButton.html(), // Button initial text
|
text: $userButton.html(), // Button initial text
|
||||||
options: options, // Entries displayed in the menu
|
options: options, // Entries displayed in the menu
|
||||||
left: true, // Open to the left of the button
|
left: true, // Open to the left of the button
|
||||||
container: config.$initBlock // optional
|
container: config.$initBlock, // optional
|
||||||
|
feedback: "USER_ADMIN",
|
||||||
};
|
};
|
||||||
var $userAdmin = createDropdown(dropdownConfigUser);
|
var $userAdmin = createDropdown(dropdownConfigUser);
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,9 @@ define([
|
||||||
|
|
||||||
$button.click(function () {
|
$button.click(function () {
|
||||||
$content.toggle();
|
$content.toggle();
|
||||||
Cryptpad.setAttribute('userlist-drawer', $content.is(':visible'));
|
var visible = $content.is(':visible');
|
||||||
|
Cryptpad.setAttribute('userlist-drawer', visible);
|
||||||
|
Cryptpad.feedback(visible?'USERLIST_SHOW': 'USERLIST_HIDE');
|
||||||
});
|
});
|
||||||
|
|
||||||
Cryptpad.getAttribute('userlist-drawer', function (err, val) {
|
Cryptpad.getAttribute('userlist-drawer', function (err, val) {
|
||||||
|
@ -343,7 +345,8 @@ define([
|
||||||
}
|
}
|
||||||
var dropdownConfigShare = {
|
var dropdownConfigShare = {
|
||||||
text: $('<div>').append($shareIcon).html(),
|
text: $('<div>').append($shareIcon).html(),
|
||||||
options: options
|
options: options,
|
||||||
|
feedback: 'SHARE',
|
||||||
};
|
};
|
||||||
var $shareBlock = Cryptpad.createDropdown(dropdownConfigShare);
|
var $shareBlock = Cryptpad.createDropdown(dropdownConfigShare);
|
||||||
//$shareBlock.find('button').attr('id', 'shareButton');
|
//$shareBlock.find('button').attr('id', 'shareButton');
|
||||||
|
@ -676,7 +679,9 @@ define([
|
||||||
var dropdownConfig = {
|
var dropdownConfig = {
|
||||||
text: '', // Button initial text
|
text: '', // Button initial text
|
||||||
options: pads_options, // Entries displayed in the menu
|
options: pads_options, // Entries displayed in the menu
|
||||||
container: $newPad
|
container: $newPad,
|
||||||
|
feedback: /drive/.test(window.location.pathname)?
|
||||||
|
'DRIVE_NEWPAD': 'NEWPAD',
|
||||||
};
|
};
|
||||||
var $newPadBlock = Cryptpad.createDropdown(dropdownConfig);
|
var $newPadBlock = Cryptpad.createDropdown(dropdownConfig);
|
||||||
$newPadBlock.find('button').attr('title', Messages.newButtonTitle);
|
$newPadBlock.find('button').attr('title', Messages.newButtonTitle);
|
||||||
|
|
|
@ -1353,6 +1353,7 @@ define([
|
||||||
setViewMode('list');
|
setViewMode('list');
|
||||||
$iframe.find('#' + FOLDER_CONTENT_ID).removeClass('grid');
|
$iframe.find('#' + FOLDER_CONTENT_ID).removeClass('grid');
|
||||||
$iframe.find('#' + FOLDER_CONTENT_ID).addClass('list');
|
$iframe.find('#' + FOLDER_CONTENT_ID).addClass('list');
|
||||||
|
Cryptpad.feedback('DRIVE_LIST_MODE');
|
||||||
});
|
});
|
||||||
$gridButton.click(function () {
|
$gridButton.click(function () {
|
||||||
$listButton.removeClass('active');
|
$listButton.removeClass('active');
|
||||||
|
@ -1360,6 +1361,7 @@ define([
|
||||||
setViewMode('grid');
|
setViewMode('grid');
|
||||||
$iframe.find('#' + FOLDER_CONTENT_ID).addClass('grid');
|
$iframe.find('#' + FOLDER_CONTENT_ID).addClass('grid');
|
||||||
$iframe.find('#' + FOLDER_CONTENT_ID).removeClass('list');
|
$iframe.find('#' + FOLDER_CONTENT_ID).removeClass('list');
|
||||||
|
Cryptpad.feedback('DRIVE_GRID_MODE');
|
||||||
});
|
});
|
||||||
|
|
||||||
if (getViewMode() === 'list') {
|
if (getViewMode() === 'list') {
|
||||||
|
@ -1413,7 +1415,8 @@ define([
|
||||||
|
|
||||||
var dropdownConfig = {
|
var dropdownConfig = {
|
||||||
text: $plusIcon.html() + Messages.fm_newButton,
|
text: $plusIcon.html() + Messages.fm_newButton,
|
||||||
options: options
|
options: options,
|
||||||
|
feedback: 'DRIVE_NEWPAD_LOCALFOLDER',
|
||||||
};
|
};
|
||||||
var $block = Cryptpad.createDropdown(dropdownConfig);
|
var $block = Cryptpad.createDropdown(dropdownConfig);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue