Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
2511ad50
提交
2511ad50
authored
9月 23, 2016
作者:
Italo Rossi
提交者:
Anthony Minessale
9月 27, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-8955 [verto_communicator] Adding DTMF shortcuts and handling DTMF history on DTMF widget
上级
6d6bd1ef
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
52 行增加
和
16 行删除
+52
-16
chat.html
html5/verto/verto_communicator/src/partials/chat.html
+2
-1
dialpad_widget.html
...verto/verto_communicator/src/partials/dialpad_widget.html
+13
-13
MainController.js
...icator/src/vertoControllers/controllers/MainController.js
+37
-2
没有找到文件。
html5/verto/verto_communicator/src/partials/chat.html
浏览文件 @
2511ad50
...
...
@@ -188,7 +188,8 @@
<div
class=
"chat-message-input"
>
<form
ng-submit=
"send()"
>
<div
class=
"chat-message-input-group"
>
<textarea
ng-model=
"message"
ng-keydown=
"($event.keyCode == 13 && $event.shiftKey !== true) && send($event)"
required=
"required"
class=
"form-control input-sm"
placeholder=
"{{ 'CHAT_TYPE_MESSAGE' | translate }}"
></textarea>
<textarea
ng-model=
"message"
ng-keydown=
"($event.keyCode == 13 && $event.shiftKey !== true) && send($event)"
required=
"required"
class=
"form-control input-sm"
placeholder=
"{{ 'CHAT_TYPE_MESSAGE' | translate }}"
ng-focus=
"disableOnKeydownDtmf()"
ng-blur=
"enableOnKeydownDtmf()"
></textarea>
<button
class=
"btn btn-success btn-sm"
type=
"submit"
>
{{ 'CHAT_SEND_MESSAGE' | translate }}
<span
class=
"mdi-navigation-arrow-forward chat-message-input-group-icon-button"
></span>
...
...
html5/verto/verto_communicator/src/partials/dialpad_widget.html
浏览文件 @
2511ad50
<div
class=
"panel panel-default shadow-z-2"
ng-class=
"{'shadow-z-2': !call_history}"
>
<form
name=
"form"
>
<div
class=
"input-group dialpad-display"
>
<input
name=
"d
ialpadnumber"
type=
"text"
class=
"form-control text-center"
placeholder=
""
ng-model=
"dialpadNumber
"
/>
<input
name=
"d
tmfHistory"
type=
"text"
class=
"form-control text-center"
placeholder=
""
ng-model=
"dtmfHistory.value
"
/>
</div>
<div
class=
"panel-body"
>
<div
class=
"dialpad-numbers"
>
<div
class=
"row"
>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(1)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(1)"
>
<h2
class=
"dialpad-number"
>
1
</h2>
<span
class=
"dialpad-alpha"
>
./@
</span>
</a>
</div>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(2)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(2)"
>
<h2
class=
"dialpad-number"
>
2
</h2>
<span
class=
"dialpad-alpha"
>
ABC
</span>
</a>
</div>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(3)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(3)"
>
<h2
class=
"dialpad-number"
>
3
</h2>
<span
class=
"dialpad-alpha"
>
DEF
</span>
</a>
...
...
@@ -27,19 +27,19 @@
</div>
<div
class=
"row"
>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(4)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(4)"
>
<h2
class=
"dialpad-number"
>
4
</h2>
<span
class=
"dialpad-alpha"
>
GHI
</span>
</a>
</div>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(5)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(5)"
>
<h2
class=
"dialpad-number"
>
5
</h2>
<span
class=
"dialpad-alpha"
>
JKL
</span>
</a>
</div>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(6)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(6)"
>
<h2
class=
"dialpad-number"
>
6
</h2>
<span
class=
"dialpad-alpha"
>
MNO
</span>
</a>
...
...
@@ -47,19 +47,19 @@
</div>
<div
class=
"row"
>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(7)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(7)"
>
<h2
class=
"dialpad-number"
>
7
</h2>
<span
class=
"dialpad-alpha"
>
PQRS
</span>
</a>
</div>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(8)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(8)"
>
<h2
class=
"dialpad-number"
>
8
</h2>
<span
class=
"dialpad-alpha"
>
TUV
</span>
</a>
</div>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(9)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(9)"
>
<h2
class=
"dialpad-number"
>
9
</h2>
<span
class=
"dialpad-alpha"
>
WXYZ
</span>
</a>
...
...
@@ -67,19 +67,19 @@
</div>
<div
class=
"row"
>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf('*')"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
('*')"
>
<h2
class=
"dialpad-number dialpad-star"
>
*
</h2>
<span
class=
"dialpad-alpha"
></span>
</a>
</div>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf(0)"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
(0)"
>
<h2
class=
"dialpad-number"
>
0
</h2>
<span
class=
"dialpad-alpha"
>
+
</span>
</a>
</div>
<div
class=
"col-md-4 col-xs-4"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf('#')"
>
<a
class=
"btn btn-block"
href=
""
ng-click=
"dtmf
Widget
('#')"
>
<h2
class=
"dialpad-number dialpad-pound"
>
#
</h2>
<span
class=
"dialpad-alpha"
></span>
</a>
...
...
html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js
浏览文件 @
2511ad50
...
...
@@ -4,9 +4,11 @@
angular
.
module
(
'vertoControllers'
)
.
controller
(
'MainController'
,
function
(
$scope
,
$rootScope
,
$location
,
$modal
,
$timeout
,
$q
,
verto
,
storage
,
CallHistory
,
toastr
,
Fullscreen
,
prompt
,
eventQueue
,
$translate
)
{
function
(
$scope
,
$rootScope
,
$location
,
$modal
,
$timeout
,
$q
,
verto
,
storage
,
CallHistory
,
toastr
,
Fullscreen
,
prompt
,
eventQueue
,
$translate
,
$window
)
{
console
.
debug
(
'Executing MainController.'
);
$rootScope
.
dtmfHistory
=
{
value
:
''
};
$rootScope
.
onKeydownDtmfEnabled
=
true
;
if
(
storage
.
data
.
language
&&
storage
.
data
.
language
!==
'browser'
)
{
$translate
.
use
(
storage
.
data
.
language
);
...
...
@@ -239,7 +241,8 @@
* @param {String} number - New touched number.
*/
$rootScope
.
dtmf
=
function
(
number
)
{
$rootScope
.
dialpadNumber
=
$scope
.
dialpadNumber
+
number
;
console
.
log
(
'dtmf'
,
number
);
$rootScope
.
dialpadNumber
=
$rootScope
.
dialpadNumber
+
number
;
if
(
verto
.
data
.
call
)
{
verto
.
dtmf
(
number
);
}
...
...
@@ -555,6 +558,38 @@
}
}
$rootScope
.
dtmfWidget
=
function
(
number
)
{
$rootScope
.
dtmfHistory
.
value
=
$rootScope
.
dtmfHistory
.
value
+
number
;
if
(
verto
.
data
.
call
)
{
verto
.
dtmf
(
number
);
}
}
$rootScope
.
disableOnKeydownDtmf
=
function
()
{
$rootScope
.
onKeydownDtmfEnabled
=
false
;
};
$rootScope
.
enableOnKeydownDtmf
=
function
()
{
$rootScope
.
onKeydownDtmfEnabled
=
true
;
};
$rootScope
.
$on
(
"$routeChangeStart"
,
function
(
event
,
next
,
current
)
{
if
(
next
.
$$route
.
originalPath
===
'/incall'
)
{
$rootScope
.
dtmfHistory
.
value
=
''
;
angular
.
element
(
$window
).
bind
(
'keydown'
,
onKeydownDtmfHistory
);
}
else
{
angular
.
element
(
$window
).
unbind
(
'keydown'
,
onKeydownDtmfHistory
);
}
});
function
onKeydownDtmfHistory
(
event
)
{
var
caracter
=
event
.
key
;
if
(
$rootScope
.
onKeydownDtmfEnabled
&&
caracter
.
match
(
/^
(\*
|
\#
|
[
0-9a-dA-D
])
$/g
))
{
$rootScope
.
dtmfWidget
(
caracter
);
$scope
.
$applyAsync
();
}
}
}
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论