Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
60
gaia/apps/communications/dialer/js/call_group_menu.js
Executable file
60
gaia/apps/communications/dialer/js/call_group_menu.js
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
'use strict';
|
||||
|
||||
/* exported CallGroupMenu */
|
||||
|
||||
/* globals CallInfo, LazyLoader, MozActivity, OptionMenu */
|
||||
|
||||
var CallGroupMenu = (function() {
|
||||
|
||||
var _showCallInfo = function(phoneNumber, date, type, status) {
|
||||
LazyLoader.load(['/dialer/js/call_info.js',
|
||||
'/dialer/style/call_info.css'], function() {
|
||||
CallInfo.show(phoneNumber, date, type, status);
|
||||
});
|
||||
};
|
||||
|
||||
var _sendSms = function(phoneNumber) {
|
||||
/* jshint nonew: false */
|
||||
try {
|
||||
new MozActivity({
|
||||
name: 'new',
|
||||
data: {
|
||||
type: 'websms/sms',
|
||||
number: phoneNumber
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('Error while creating activity: ' + e);
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
show: function(groupPrimaryInfo, phoneNumber, date, type, status) {
|
||||
var span = document.createElement('span');
|
||||
span.dir = 'auto';
|
||||
span.textContent = groupPrimaryInfo;
|
||||
var params = {
|
||||
items: [{
|
||||
l10nId: 'callInformation',
|
||||
method: _showCallInfo,
|
||||
params: [phoneNumber, date, type, status]
|
||||
},{
|
||||
l10nId: 'sendSms',
|
||||
method: _sendSms,
|
||||
params: [phoneNumber]
|
||||
},{ // Last item is the Cancel button
|
||||
l10nId: 'cancel',
|
||||
incomplete: true
|
||||
}],
|
||||
header: span,
|
||||
classes: ['call-group-menu']
|
||||
};
|
||||
|
||||
LazyLoader.load(['/shared/js/option_menu.js',
|
||||
'/shared/style/action_menu.css'], function() {
|
||||
new OptionMenu(params).show();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}());
|
||||
Loading…
Reference in a new issue