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