Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
faed47bb
提交
faed47bb
authored
9月 02, 2015
作者:
Stefan Yohansson
提交者:
root
9月 03, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7994 - Verto Communicator - Using factory for group calls in history
上级
46c0d052
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
148 行增加
和
42 行删除
+148
-42
verto.css
html5/verto/verto_communicator/src/css/verto.css
+36
-0
index.html
html5/verto/verto_communicator/src/index.html
+1
-0
dialpad.html
html5/verto/verto_communicator/src/partials/dialpad.html
+23
-7
call_history.js
..._communicator/src/storageService/services/call_history.js
+57
-0
storage.js
...verto_communicator/src/storageService/services/storage.js
+2
-1
DialPadController.js
...tor/src/vertoControllers/controllers/DialPadController.js
+19
-9
MainController.js
...icator/src/vertoControllers/controllers/MainController.js
+6
-21
vertoService.js
...to_communicator/src/vertoService/services/vertoService.js
+4
-4
没有找到文件。
html5/verto/verto_communicator/src/css/verto.css
浏览文件 @
faed47bb
...
@@ -8,6 +8,22 @@ body {
...
@@ -8,6 +8,22 @@ body {
padding-top
:
60px
;
padding-top
:
60px
;
}
}
.inline-block
{
display
:
inline-block
;
}
.icon-tiny
{
font-size
:
14px
;
}
.back-icon
{
cursor
:
pointer
;
margin-top
:
-2px
;
float
:
left
;
margin-left
:
-2px
;
margin-right
:
7px
;
}
.container-fluid
{
.container-fluid
{
height
:
100%
;
height
:
100%
;
}
}
...
@@ -237,6 +253,12 @@ body .modal-body .btn-group .btn.active {
...
@@ -237,6 +253,12 @@ body .modal-body .btn-group .btn.active {
width
:
100%
;
width
:
100%
;
}
}
#dialpad
.list-icon
{
margin-top
:
8px
;
float
:
right
;
margin-left
:
2px
;
}
#dialpad
.dialpad-display
.btn-fab
{
#dialpad
.dialpad-display
.btn-fab
{
font-size
:
32px
;
font-size
:
32px
;
position
:
relative
;
position
:
relative
;
...
@@ -319,6 +341,11 @@ body .modal-body .btn-group .btn.active {
...
@@ -319,6 +341,11 @@ body .modal-body .btn-group .btn.active {
position
:
relative
;
position
:
relative
;
}
}
.call_direction
{
position
:
absolute
;
margin-top
:
6px
;
}
#dialpad
#call_history
.active
{
#dialpad
#call_history
.active
{
visibility
:
visible
;
visibility
:
visible
;
...
@@ -363,6 +390,8 @@ body .modal-body .btn-group .btn.active {
...
@@ -363,6 +390,8 @@ body .modal-body .btn-group .btn.active {
text-overflow
:
clip
;
text-overflow
:
clip
;
overflow
:
hidden
;
overflow
:
hidden
;
overflow-wrap
:
break-word
;
overflow-wrap
:
break-word
;
margin-left
:
26px
!important
;
position
:
absolute
;
}
}
#dialpad
.dialpad-number
{
#dialpad
.dialpad-number
{
...
@@ -370,6 +399,13 @@ body .modal-body .btn-group .btn.active {
...
@@ -370,6 +399,13 @@ body .modal-body .btn-group .btn.active {
color
:
rgb
(
38
,
204
,
218
);
color
:
rgb
(
38
,
204
,
218
);
}
}
#dialpad
.date
{
margin-top
:
15px
;
display
:
block
;
font-size
:
11px
;
color
:
#CCC
;
}
#dialpad
.dialpad-alpha
{
#dialpad
.dialpad-alpha
{
font-size
:
11px
;
font-size
:
11px
;
color
:
#CCC
;
color
:
#CCC
;
...
...
html5/verto/verto_communicator/src/index.html
浏览文件 @
faed47bb
...
@@ -120,6 +120,7 @@
...
@@ -120,6 +120,7 @@
<script
type=
"text/javascript"
src=
"src/storageService/storageService.module.js"
></script>
<script
type=
"text/javascript"
src=
"src/storageService/storageService.module.js"
></script>
<script
type=
"text/javascript"
src=
"src/storageService/services/storage.js"
></script>
<script
type=
"text/javascript"
src=
"src/storageService/services/storage.js"
></script>
<script
type=
"text/javascript"
src=
"src/storageService/services/call_history.js"
></script>
<!-- endbuild -->
<!-- endbuild -->
...
...
html5/verto/verto_communicator/src/partials/dialpad.html
浏览文件 @
faed47bb
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
<div
id=
"call_history"
class=
"shadow-z-2 panel"
>
<div
id=
"call_history"
class=
"shadow-z-2 panel"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-title"
>
<div
class=
"panel-title"
>
Call History
<i
class=
"mdi-navigation-arrow-back back-icon"
ng-click=
"viewCallsList()"
ng-if=
"call_list"
></i>
<span
ng-if=
"!call_list"
>
Call History
</span>
<span
ng-if=
"call_list"
>
{{ call_list[0].number }}
</span>
<span
class=
"pull-right pull-right-margin dropdown"
>
<span
class=
"pull-right pull-right-margin dropdown"
>
<a
href=
""
class=
"dropdown-toggle"
data-target=
"#"
data-toggle=
"dropdown"
aria-expanded=
"true"
>
<a
href=
""
class=
"dropdown-toggle"
data-target=
"#"
data-toggle=
"dropdown"
aria-expanded=
"true"
>
...
@@ -16,18 +18,32 @@
...
@@ -16,18 +18,32 @@
</div>
</div>
</div>
</div>
<ul
class=
"call-history"
>
<ul
class=
"call-history"
>
<div
ng-
show=
"!storage.data.call_history.length
"
>
<div
ng-
if=
"!has_history
"
>
<p
class=
"text-center text-muted"
>
No history calls.
</p>
<p
class=
"text-center text-muted"
>
No history calls.
</p>
</div>
</div>
<li
ng-repeat=
"call in storage.data.call_history"
>
<li
ng-repeat=
"number in history_control track by number"
ng-if=
"!call_list"
>
<a
ng-show=
"call.number"
href=
""
ng-dblclick=
"$parent.call(call.number)"
ng-click=
"$parent.fillDialpadNumber(call.number)"
>
<a
ng-init=
"call = call_history[number][0]"
class=
"inline-block"
ng-show=
"call.number"
href=
""
ng-dblclick=
"$parent.call(call.number)"
ng-click=
"$parent.fillDialpadNumber(call.number)"
>
<i
ng-show=
"call.direction == 'inbound'"
ng-class=
"{'mdi-communication-call-missed': !call.status,'mdi-communication-call-received': call.status}"
></i>
<div
class=
"call-history-info"
>
<i
ng-show=
"call.direction == 'outbound'"
class=
"mdi-communication-call-made"
></i>
<i
ng-if=
"call.direction == 'inbound'"
ng-class=
"{'mdi-communication-call-missed': !call.status,'mdi-communication-call-received': call.status}"
></i>
<h2
class=
"dialpad-number dialpad-number-limited"
>
{{ call.number }}
</h2>
<i
ng-if=
"call.direction == 'outbound'"
class=
"mdi-communication-call-made call_direction"
></i>
<h2
class=
"dialpad-number dialpad-number-limited"
>
{{ call.number }} ({{ call_history[number].length }})
</h2>
<br/>
<br/>
<span
class=
"date"
>
{{ call.call_start }}
</span>
</div>
</a>
<a
href=
""
ng-click=
"$parent.viewCallsList(call_history[number])"
class=
"list-icon"
>
<i
class=
"mdi-action-view-list"
></i>
</a>
</li>
<li
ng-repeat=
"call in call_list"
>
<a
ng-show=
"call.number"
href=
""
ng-dblclick=
"$parent.call(call.number)"
ng-click=
"$parent.fillDialpadNumber(call.number)"
>
<i
ng-if=
"call.direction == 'inbound'"
class=
"icon-tiny"
ng-class=
"{'mdi-communication-call-missed': !call.status,'mdi-communication-call-received': call.status}"
></i>
<i
ng-if=
"call.direction == 'outbound'"
class=
"icon-tiny mdi-communication-call-made"
></i>
<span
class=
"dialpad-alpha"
>
{{ call.call_start }}
</span>
<span
class=
"dialpad-alpha"
>
{{ call.call_start }}
</span>
</a>
</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
...
html5/verto/verto_communicator/src/storageService/services/call_history.js
0 → 100644
浏览文件 @
faed47bb
'use strict'
;
angular
.
module
(
'storageService'
)
.
factory
(
'CallHistory'
,
function
(
storage
)
{
var
history
=
storage
.
data
.
call_history
;
var
history_control
=
storage
.
data
.
history_control
;
var
addCallToHistory
=
function
(
number
,
direction
,
status
)
{
if
(
history
[
number
]
==
undefined
)
{
history
[
number
]
=
[];
}
history
[
number
].
unshift
({
'number'
:
number
,
'direction'
:
direction
,
'status'
:
status
,
'call_start'
:
Date
()
});
var
index
=
history_control
.
indexOf
(
number
);
console
.
log
(
index
);
if
(
index
>
-
1
)
{
history_control
.
splice
(
index
,
1
);
}
history_control
.
unshift
(
number
);
};
var
getCallsFromHistory
=
function
(
number
)
{
return
history
[
number
];
};
return
{
all
:
function
()
{
return
history
;
},
all_control
:
function
()
{
return
history_control
;
},
get
:
function
(
number
)
{
return
getCallsFromHistory
(
number
);
},
add
:
function
(
number
,
direction
,
status
)
{
return
addCallToHistory
(
number
,
direction
,
status
);
},
clear
:
function
()
{
storage
.
data
.
call_history
=
{};
storage
.
data
.
history_control
=
[];
history
=
storage
.
data
.
call_history
;
history_control
=
storage
.
data
.
history_control
;
return
history_control
;
}
}
});
html5/verto/verto_communicator/src/storageService/services/storage.js
浏览文件 @
faed47bb
...
@@ -12,7 +12,8 @@
...
@@ -12,7 +12,8 @@
cur_call
:
0
,
cur_call
:
0
,
called_number
:
''
,
called_number
:
''
,
useVideo
:
true
,
useVideo
:
true
,
call_history
:
[],
call_history
:
{},
history_control
:
[],
call_start
:
false
,
call_start
:
false
,
name
:
''
,
name
:
''
,
email
:
''
,
email
:
''
,
...
...
html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js
浏览文件 @
faed47bb
...
@@ -4,15 +4,29 @@
...
@@ -4,15 +4,29 @@
angular
angular
.
module
(
'vertoControllers'
)
.
module
(
'vertoControllers'
)
.
controller
(
'DialPadController'
,
[
'$rootScope'
,
'$scope'
,
.
controller
(
'DialPadController'
,
[
'$rootScope'
,
'$scope'
,
'$http'
,
'$location'
,
'toastr'
,
'verto'
,
'storage'
,
'$http'
,
'$location'
,
'toastr'
,
'verto'
,
'storage'
,
'CallHistory'
,
function
(
$rootScope
,
$scope
,
$http
,
$location
,
toastr
,
verto
,
storage
)
{
function
(
$rootScope
,
$scope
,
$http
,
$location
,
toastr
,
verto
,
storage
,
CallHistory
)
{
console
.
debug
(
'Executing DialPadController.'
);
console
.
debug
(
'Executing DialPadController.'
);
$scope
.
checkBrowser
();
$scope
.
checkBrowser
();
$scope
.
call_history
=
CallHistory
.
all
();
$scope
.
history_control
=
CallHistory
.
all_control
();
$scope
.
has_history
=
Object
.
keys
(
$scope
.
call_history
).
length
;
storage
.
data
.
videoCall
=
false
;
storage
.
data
.
videoCall
=
false
;
storage
.
data
.
userStatus
=
'connecting'
;
storage
.
data
.
userStatus
=
'connecting'
;
storage
.
data
.
calling
=
false
;
storage
.
data
.
calling
=
false
;
$scope
.
clearCallHistory
=
function
()
{
CallHistory
.
clear
();
$scope
.
call_history
=
CallHistory
.
all
();
$scope
.
history_control
=
CallHistory
.
all_control
();
$scope
.
has_history
=
Object
.
keys
(
$scope
.
call_history
).
length
;
return
$scope
.
history_control
;
};
$scope
.
viewCallsList
=
function
(
calls
)
{
return
$scope
.
call_list
=
calls
;
};
/**
/**
* fill dialpad via querystring [?autocall=\d+]
* fill dialpad via querystring [?autocall=\d+]
*/
*/
...
@@ -62,14 +76,10 @@
...
@@ -62,14 +76,10 @@
verto
.
call
(
$rootScope
.
dialpadNumber
);
verto
.
call
(
$rootScope
.
dialpadNumber
);
storage
.
data
.
called_number
=
$rootScope
.
dialpadNumber
;
storage
.
data
.
called_number
=
$rootScope
.
dialpadNumber
;
storage
.
data
.
call_history
.
unshift
({
CallHistory
.
add
(
$rootScope
.
dialpadNumber
,
'outbound'
);
'number'
:
$rootScope
.
dialpadNumber
,
'direction'
:
'outbound'
,
'call_start'
:
Date
()
});
$location
.
path
(
'/incall'
);
$location
.
path
(
'/incall'
);
}
}
}
}
]);
]);
})();
})();
\ No newline at end of file
html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js
浏览文件 @
faed47bb
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
angular
angular
.
module
(
'vertoControllers'
)
.
module
(
'vertoControllers'
)
.
controller
(
'MainController'
,
.
controller
(
'MainController'
,
function
(
$scope
,
$rootScope
,
$location
,
$modal
,
$timeout
,
verto
,
storage
,
toastr
,
Fullscreen
,
prompt
)
{
function
(
$scope
,
$rootScope
,
$location
,
$modal
,
$timeout
,
verto
,
storage
,
CallHistory
,
toastr
,
Fullscreen
,
prompt
)
{
console
.
debug
(
'Executing MainController.'
);
console
.
debug
(
'Executing MainController.'
);
var
myVideo
=
document
.
getElementById
(
"webcam"
);
var
myVideo
=
document
.
getElementById
(
"webcam"
);
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
);
);
};
};
$
s
cope
.
openModal
=
function
(
templateUrl
,
controller
)
{
$
rootS
cope
.
openModal
=
function
(
templateUrl
,
controller
)
{
var
modalInstance
=
$modal
.
open
({
var
modalInstance
=
$modal
.
open
({
animation
:
$scope
.
animationsEnabled
,
animation
:
$scope
.
animationsEnabled
,
templateUrl
:
templateUrl
,
templateUrl
:
templateUrl
,
...
@@ -201,10 +201,6 @@
...
@@ -201,10 +201,6 @@
$scope
.
call_history
=
angular
.
element
(
"#call_history"
).
hasClass
(
'active'
);
$scope
.
call_history
=
angular
.
element
(
"#call_history"
).
hasClass
(
'active'
);
};
};
$scope
.
clearCallHistory
=
function
()
{
storage
.
data
.
call_history
=
[];
};
$scope
.
toggleChat
=
function
()
{
$scope
.
toggleChat
=
function
()
{
if
(
$scope
.
chatStatus
&&
$rootScope
.
activePane
===
'chat'
)
{
if
(
$scope
.
chatStatus
&&
$rootScope
.
activePane
===
'chat'
)
{
$rootScope
.
chat_counter
=
0
;
$rootScope
.
chat_counter
=
0
;
...
@@ -328,22 +324,11 @@
...
@@ -328,22 +324,11 @@
$scope
.
answerCall
();
$scope
.
answerCall
();
storage
.
data
.
called_number
=
data
;
storage
.
data
.
called_number
=
data
;
CallHistory
.
add
(
number
,
'inbound'
,
true
);
storage
.
data
.
call_history
.
unshift
({
'number'
:
data
,
'direction'
:
'inbound'
,
'status'
:
true
,
'call_start'
:
Date
()
});
$location
.
path
(
'/incall'
);
$location
.
path
(
'/incall'
);
},
function
()
{
},
function
()
{
$scope
.
declineCall
();
$scope
.
declineCall
();
storage
.
data
.
call_history
.
unshift
({
CallHistory
.
add
(
number
,
'inbound'
,
false
);
'number'
:
data
,
'direction'
:
'inbound'
,
'status'
:
false
,
'call_start'
:
Date
()
});
});
});
});
});
...
@@ -439,4 +424,4 @@
...
@@ -439,4 +424,4 @@
}
}
);
);
})();
})();
\ No newline at end of file
html5/verto/verto_communicator/src/vertoService/services/vertoService.js
浏览文件 @
faed47bb
...
@@ -258,8 +258,8 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
...
@@ -258,8 +258,8 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
label
:
device
.
label
||
device
.
id
label
:
device
.
label
||
device
.
id
});
});
}
}
console
.
debug
(
'Devices were refreshed, checking that we have cameras.'
);
console
.
debug
(
'Devices were refreshed, checking that we have cameras.'
);
// This means that we cannot use video!
// This means that we cannot use video!
if
(
data
.
videoDevices
.
length
===
0
)
{
if
(
data
.
videoDevices
.
length
===
0
)
{
console
.
log
(
'No camera, disabling video.'
);
console
.
log
(
'No camera, disabling video.'
);
...
@@ -274,7 +274,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
...
@@ -274,7 +274,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
},
},
refreshDevices
:
function
(
callback
)
{
refreshDevices
:
function
(
callback
)
{
console
.
debug
(
'Attempting to refresh the devices.'
);
console
.
debug
(
'Attempting to refresh the devices.'
);
jQuery
.
verto
.
refreshDevices
(
this
.
refreshDevicesCallback
);
jQuery
.
verto
.
refreshDevices
(
this
.
refreshDevicesCallback
);
},
},
...
@@ -416,7 +416,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
...
@@ -416,7 +416,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
console
.
log
(
'Has data.liveArray.'
);
console
.
log
(
'Has data.liveArray.'
);
$rootScope
.
$emit
(
'members.clear'
);
$rootScope
.
$emit
(
'members.clear'
);
data
.
liveArray
=
null
;
data
.
liveArray
=
null
;
}
else
{
}
else
{
console
.
log
(
'Doesn
\'
t found data.liveArray.'
);
console
.
log
(
'Doesn
\'
t found data.liveArray.'
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论