mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-21 15:02:40 +00:00
(js) Use a speed dial for event/task creation
This commit is contained in:
1 parent
e4c6b83c33
commit
d2869bed7f
3 files changed
+26
-18
No files matched your search
@@ -123,16 +123,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
function newComponent($event, baseComponent) {
|
||||
var type = 'appointment', component;
|
||||
function newComponent($event, type, baseComponent) {
|
||||
var component;
|
||||
|
||||
if (baseComponent) {
|
||||
component = baseComponent;
|
||||
type = baseComponent.type;
|
||||
}
|
||||
else {
|
||||
if (vm.componentType == 'tasks')
|
||||
type = 'task';
|
||||
component = new Component({ pid: Calendar.$defaultCalendar(), type: type });
|
||||
}
|
||||
|
||||
@@ -166,7 +163,7 @@
|
||||
if (component.isAllDay)
|
||||
coordinates.duration -= 96;
|
||||
component.setDelta(coordinates.duration * 15);
|
||||
newComponent(null, component).finally(function() {
|
||||
newComponent(null, 'appointment', component).finally(function() {
|
||||
$timeout(function() {
|
||||
Component.$resetGhost();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user