|
|
@ -1400,7 +1400,6 @@ define([
|
|
|
|
case 'copy':
|
|
|
|
case 'copy':
|
|
|
|
button = $('<button>', {
|
|
|
|
button = $('<button>', {
|
|
|
|
'class': 'fa fa-clone cp-toolbar-icon-import',
|
|
|
|
'class': 'fa fa-clone cp-toolbar-icon-import',
|
|
|
|
title: Messages.makeACopy,
|
|
|
|
|
|
|
|
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.makeACopy));
|
|
|
|
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.makeACopy));
|
|
|
|
button
|
|
|
|
button
|
|
|
|
.click(common.prepareFeedback(type))
|
|
|
|
.click(common.prepareFeedback(type))
|
|
|
@ -1413,7 +1412,6 @@ define([
|
|
|
|
if (!common.isLoggedIn()) { return; }
|
|
|
|
if (!common.isLoggedIn()) { return; }
|
|
|
|
button = $('<button>', {
|
|
|
|
button = $('<button>', {
|
|
|
|
'class': 'fa fa-upload cp-toolbar-icon-import',
|
|
|
|
'class': 'fa fa-upload cp-toolbar-icon-import',
|
|
|
|
title: Messages.template_import,
|
|
|
|
|
|
|
|
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.template_import));
|
|
|
|
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.template_import));
|
|
|
|
button
|
|
|
|
button
|
|
|
|
.click(common.prepareFeedback(type))
|
|
|
|
.click(common.prepareFeedback(type))
|
|
|
@ -1425,9 +1423,8 @@ define([
|
|
|
|
if (!AppConfig.enableTemplates) { return; }
|
|
|
|
if (!AppConfig.enableTemplates) { return; }
|
|
|
|
if (!common.isLoggedIn()) { return; }
|
|
|
|
if (!common.isLoggedIn()) { return; }
|
|
|
|
button = $('<button>', {
|
|
|
|
button = $('<button>', {
|
|
|
|
title: Messages.saveTemplateButton,
|
|
|
|
'class': 'fa fa-bookmark cp-toolbar-icon-template',
|
|
|
|
class: 'fa fa-bookmark cp-toolbar-icon-template'
|
|
|
|
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.saveTemplateButton));
|
|
|
|
});
|
|
|
|
|
|
|
|
if (data.rt) {
|
|
|
|
if (data.rt) {
|
|
|
|
button
|
|
|
|
button
|
|
|
|
.click(function () {
|
|
|
|
.click(function () {
|
|
|
@ -1472,9 +1469,8 @@ define([
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'forget':
|
|
|
|
case 'forget':
|
|
|
|
button = $('<button>', {
|
|
|
|
button = $('<button>', {
|
|
|
|
title: Messages.forgetButtonTitle,
|
|
|
|
|
|
|
|
'class': "fa fa-trash cp-toolbar-icon-forget"
|
|
|
|
'class': "fa fa-trash cp-toolbar-icon-forget"
|
|
|
|
});
|
|
|
|
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.fc_delete));
|
|
|
|
callback = typeof callback === "function" ? callback : function () {};
|
|
|
|
callback = typeof callback === "function" ? callback : function () {};
|
|
|
|
button
|
|
|
|
button
|
|
|
|
.click(common.prepareFeedback(type))
|
|
|
|
.click(common.prepareFeedback(type))
|
|
|
@ -1578,8 +1574,8 @@ define([
|
|
|
|
button = $('<button>', {
|
|
|
|
button = $('<button>', {
|
|
|
|
'class': 'fa fa-hashtag cp-toolbar-icon-hashtag',
|
|
|
|
'class': 'fa fa-hashtag cp-toolbar-icon-hashtag',
|
|
|
|
title: Messages.tags_title,
|
|
|
|
title: Messages.tags_title,
|
|
|
|
})
|
|
|
|
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.fc_hashtag));
|
|
|
|
.click(common.prepareFeedback(type))
|
|
|
|
button.click(common.prepareFeedback(type))
|
|
|
|
.click(function () {
|
|
|
|
.click(function () {
|
|
|
|
common.isPadStored(function (err, data) {
|
|
|
|
common.isPadStored(function (err, data) {
|
|
|
|
if (!data) {
|
|
|
|
if (!data) {
|
|
|
@ -1647,6 +1643,17 @@ define([
|
|
|
|
.click(common.prepareFeedback(type));
|
|
|
|
.click(common.prepareFeedback(type));
|
|
|
|
if (callback) { button.click(callback); }
|
|
|
|
if (callback) { button.click(callback); }
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'newpad':
|
|
|
|
|
|
|
|
button = $('<button>', {
|
|
|
|
|
|
|
|
title: Messages.newButtonTitle,
|
|
|
|
|
|
|
|
'class': 'fa fa-plus cp-toolbar-icon-newpad',
|
|
|
|
|
|
|
|
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.newButton));
|
|
|
|
|
|
|
|
button
|
|
|
|
|
|
|
|
.click(common.prepareFeedback(type))
|
|
|
|
|
|
|
|
.click(function () {
|
|
|
|
|
|
|
|
common.createNewPadModal();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
data = data || {};
|
|
|
|
data = data || {};
|
|
|
|
var icon = data.icon || "fa-question";
|
|
|
|
var icon = data.icon || "fa-question";
|
|
|
@ -2293,6 +2300,17 @@ define([
|
|
|
|
content: h('span', Messages.type.teams)
|
|
|
|
content: h('span', Messages.type.teams)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (padType !== 'contacts' && accountName) {
|
|
|
|
|
|
|
|
options.push({
|
|
|
|
|
|
|
|
tag: 'a',
|
|
|
|
|
|
|
|
attributes: {
|
|
|
|
|
|
|
|
'target': '_blank',
|
|
|
|
|
|
|
|
'href': origin+'/contacts/',
|
|
|
|
|
|
|
|
'class': 'cptools cptools-contacts'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
content: h('span', Messages.type.contacts)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
options.push({ tag: 'hr' });
|
|
|
|
options.push({ tag: 'hr' });
|
|
|
|
// Add the change display name button if not in read only mode
|
|
|
|
// Add the change display name button if not in read only mode
|
|
|
|
if (config.changeNameButtonCls && config.displayChangeName && !AppConfig.disableProfile) {
|
|
|
|
if (config.changeNameButtonCls && config.displayChangeName && !AppConfig.disableProfile) {
|
|
|
|