mirror of
https://github.com/Mibew/mibew.git
synced 2025-03-03 18:38:31 +03:00
Use "mibewRoot" only in file paths
This commit is contained in:
parent
0253f8e67e
commit
e5031f9987
@ -70,7 +70,7 @@
|
||||
playNewMessageSound: function() {
|
||||
if (! this.get('skipNextMessageSound')) {
|
||||
// Build sound path
|
||||
var path = Mibew.Objects.Models.page.get('mibewRoot');
|
||||
var path = Mibew.Objects.Models.page.get('mibewBasePath');
|
||||
if (typeof path !== 'undefined') {
|
||||
path += '/sounds/new_message';
|
||||
// Play sound
|
||||
|
@ -165,7 +165,7 @@
|
||||
*/
|
||||
threadAdded: function() {
|
||||
// Build sound path
|
||||
var path = Mibew.Objects.Models.page.get('mibewRoot');
|
||||
var path = Mibew.Objects.Models.page.get('mibewBasePath');
|
||||
if (typeof path !== 'undefined') {
|
||||
path += '/sounds/new_user';
|
||||
// Play sound
|
||||
|
@ -70,6 +70,9 @@ class OperatorChatController extends AbstractController
|
||||
// Build js application options
|
||||
$page['chatOptions'] = json_encode($page['chat']);
|
||||
|
||||
$page['mibewBasePath'] = $request->getBasePath();
|
||||
$page['mibewBaseUrl'] = $request->getBaseUrl();
|
||||
|
||||
// Render the page with chat.
|
||||
return $this->render('chat', $page);
|
||||
}
|
||||
|
@ -56,6 +56,9 @@ class UserChatController extends AbstractController
|
||||
// Build js application options
|
||||
$page['chatOptions'] = json_encode($page['chat']);
|
||||
|
||||
$page['mibewBasePath'] = $request->getBasePath();
|
||||
$page['mibewBaseUrl'] = $request->getBaseUrl();
|
||||
|
||||
// Expand page
|
||||
return $this->render('chat', $page);
|
||||
}
|
||||
@ -141,6 +144,10 @@ class UserChatController extends AbstractController
|
||||
$group_id,
|
||||
$info,
|
||||
$referrer
|
||||
),
|
||||
array(
|
||||
'mibewBasePath' => $request->getBasePath(),
|
||||
'mibewBaseUrl' => $request->getBaseUrl(),
|
||||
)
|
||||
);
|
||||
$page['leaveMessageOptions'] = json_encode($page['leaveMessage']);
|
||||
@ -173,6 +180,10 @@ class UserChatController extends AbstractController
|
||||
$group_id,
|
||||
$info,
|
||||
$referrer
|
||||
),
|
||||
array(
|
||||
'mibewBasePath' => $request->getBasePath(),
|
||||
'mibewBaseUrl' => $request->getBaseUrl(),
|
||||
)
|
||||
);
|
||||
$page['surveyOptions'] = json_encode($page['survey']);
|
||||
@ -239,6 +250,9 @@ class UserChatController extends AbstractController
|
||||
// Build js application options
|
||||
$page['invitationOptions'] = json_encode($page['invitation']);
|
||||
|
||||
$page['mibewBasePath'] = $request->getBasePath();
|
||||
$page['mibewBaseUrl'] = $request->getBaseUrl();
|
||||
|
||||
// Expand page
|
||||
return $this->render('chat', $page);
|
||||
}
|
||||
|
@ -60,6 +60,9 @@ class UsersController extends AbstractController
|
||||
$page['inviteLink'] = $request->getBaseUrl() . '/operator/invite';
|
||||
$page['agentLink'] = $request->getBaseUrl() . '/operator/chat';
|
||||
|
||||
$page['mibewBasePath'] = $request->getBasePath();
|
||||
$page['mibewBaseUrl'] = $request->getBaseUrl();
|
||||
|
||||
// Load dialogs style options
|
||||
$chat_style = new ChatStyle(ChatStyle::getCurrentStyle());
|
||||
$style_config = $chat_style->getConfigurations();
|
||||
|
@ -82,7 +82,8 @@
|
||||
},
|
||||
page: {
|
||||
style: '{{styleName}}',
|
||||
mibewRoot: '{{mibewRoot}}',
|
||||
mibewBasePath: '{{mibewBasePath}}',
|
||||
mibewBaseUrl: '{{mibewBaseUrl}}',
|
||||
stylePath: '{{stylePath}}',
|
||||
company: {
|
||||
name: '{{#jsString}}{{company.name}}{{/jsString}}',
|
||||
|
@ -89,7 +89,8 @@
|
||||
},
|
||||
|
||||
page: {
|
||||
mibewRoot: "{{mibewRoot}}",
|
||||
mibewBasePath: "{{mibewBasePath}}",
|
||||
mibewBaseUrl: "{{mibewBaseUrl}}",
|
||||
|
||||
showOnlineOperators: {{#if showonline}}true{{else}}false{{/if}},
|
||||
showVisitors: {{#if showvisitors}}true{{else}}false{{/if}},
|
||||
|
Loading…
Reference in New Issue
Block a user