Skip to content

Commit

Permalink
Merge branch 'voxter-feature-copy-callflow-button'
Browse files Browse the repository at this point in the history
  • Loading branch information
JRMaitre committed Oct 9, 2015
2 parents 7655bb9 + 14eb034 commit 96a1835
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 2 deletions.
11 changes: 11 additions & 0 deletions whapps/voip/callflow/callflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,15 @@ winkstart.module('voip', 'callflow', {
}
});

$('.copy_icon', '#ws_cf_flow').click(function() {
delete(THIS.dataCallflow.id);
delete(THIS.dataCallflow.numbers);
THIS.flow.name = '';
THIS.flow.numbers = [];
THIS.flow.id = undefined;
THIS.renderFlow();
});

$('.buttons').append(buttons_html);
},

Expand Down Expand Up @@ -520,9 +529,11 @@ winkstart.module('voip', 'callflow', {
var THIS = this;
if(pending_change) {
$('#pending_change', '#ws_callflow').show();
$('.copy_icon', '#ws_cf_flow').hide();
$('.save', '#ws_callflow').addClass('pulse-box');
} else {
$('#pending_change', '#ws_callflow').hide();
$('.copy_icon', '#ws_cf_flow').show();
$('.save', '#ws_callflow').removeClass('pulse-box');
}
},
Expand Down
3 changes: 2 additions & 1 deletion whapps/voip/callflow/css/callflow.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@

#callflow-view .wrapper_callflow_buttons {
display: block;
width: 322px;
width: 485px;
margin: auto;
margin-bottom: 5px;
text-align: center;
}

#callflow-view .wrapper_callflow_buttons .btn {
Expand Down
9 changes: 9 additions & 0 deletions whapps/voip/callflow/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,12 @@
margin: 3px 0px 0px 7px;
width: 20px;
}

#ws_callflow .root .top_bar .copy_icon {
background: url('../images/copy_icon.png') no-repeat scroll center center transparent;
cursor: pointer;
display: inline-block;
height: 18px;
margin: 3px 0px 0px 4px;
width: 17px;
}
Binary file added whapps/voip/callflow/images/copy_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions whapps/voip/callflow/lang/en.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
window.translate['callflow'] = {
duplicate_callflow: "Duplicate callflow",
css_callflow: "css/callflow.css",
delete_callflow: "Delete callflow",
save_changes: "Save changes",
Expand Down
1 change: 1 addition & 0 deletions whapps/voip/callflow/lang/nl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
window.translate['callflow'] = {
duplicate_callflow: "Duplikat callflow",
css_callflow: "css/callflow.css",
delete_callflow: "Verwijder callflow",
save_changes: "Wijzigingen opslaan",
Expand Down
1 change: 1 addition & 0 deletions whapps/voip/callflow/lang/ru.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
window.translate['callflow'] = $.extend(true, {}, window.translate['callflow'], {
duplicate_callflow: "дублировать сценарий",
css_callflow: "css/callflow.css",
delete_callflow: "Удалить сценарий",
save_changes: "Сохранить изменения",
Expand Down
1 change: 1 addition & 0 deletions whapps/voip/callflow/lang/zh.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
window.translate['callflow'] = {
duplicate_callflow: "重复呼叫流程",
css_callflow: "css/callflow.css",
delete_callflow: "删除呼叫流程",
save_changes: "保存修改",
Expand Down
3 changes: 2 additions & 1 deletion whapps/voip/callflow/tmpl/root.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div>
<div class="root">
<div class="top_bar">
<span class="name">${name}</span><span class="edit_icon"/>
<span class="name">${name}</span><span class="edit_icon" title="Edit callflow name"/>
<span class="copy_icon" title="Make a copy of the callflow"/>
<div class="tooltip"/>
</div>
<div class="content"></div>
Expand Down

0 comments on commit 96a1835

Please sign in to comment.