This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 856888 - Support links was added in calendar's notes
**What was made: ** * Move modules that provides convertion telephone numbers, emails and links to links in messages to shared component from sms. * Add this functionality in calendar's notes.
- Loading branch information
1 parent
961528f
commit 3609ecc
Showing
15 changed files
with
76 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* global ActivityPicker */ | ||
|
||
define(function(require, exports, module) { | ||
'use strict'; | ||
/* | ||
Centralized event handling for various | ||
data-actions url, email, phone in a message | ||
*/ | ||
|
||
module.exports.onClick = function lah_onClick(event) { | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
|
||
var dataset = event.target.dataset; | ||
var action = dataset.action; | ||
|
||
if (!action) { | ||
return; | ||
} | ||
|
||
var type = action.replace('-link', ''); | ||
|
||
ActivityPicker[type]( | ||
dataset[type], this.reset, this.reset | ||
); | ||
|
||
}; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,8 @@ | |
*/ | ||
'use strict'; | ||
|
||
require('/views/conversation/js/link_helper.js'); | ||
require('/shared/js/links/link_helper.js'); | ||
|
||
require('/views/shared/js/utils.js'); | ||
require('/views/shared/test/unit/mock_utils.js'); | ||
|
||
suite('link_helper_test.js', function() { | ||
|
@@ -366,8 +365,9 @@ suite('link_helper_test.js', function() { | |
'<a data-url="http://stackoverflow.com/q/12882966/" ' + | ||
'data-action="url-link" >http://stackoverflow.com/q/12882966/</a>' + | ||
' and call me at ' + | ||
'<a dir="ltr" data-dial="+18155551212" data-action="dial-link">' + | ||
'+18155551212</a> or (e-mail <a data-email="[email protected]"' + | ||
'<a dir="ltr" data-dial="+18155551212" ' + | ||
'data-action="dial-link">+18155551212</a> or (e-mail ' + | ||
'<a data-email="[email protected]"' + | ||
' data-action="email-link">[email protected]</a>)'; | ||
assert.equal(LinkHelper.searchAndLinkClickableData(test), expected); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters