mirror of
https://github.com/Mibew/mibew.git
synced 2025-05-12 06:43:08 +03:00
Use human-readable way to define chat window params
This commit is contained in:
parent
67a0db5349
commit
9faf346634
@ -193,7 +193,7 @@
|
|||||||
+ '/' + threadId
|
+ '/' + threadId
|
||||||
+ (viewOnly ? '?viewonly=true': ''),
|
+ (viewOnly ? '?viewonly=true': ''),
|
||||||
'ImCenter' + threadId,
|
'ImCenter' + threadId,
|
||||||
page.get('chatWindowParams')
|
Mibew.Utils.buildWindowOptions(page.get('chatWindowParams'))
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -176,6 +176,11 @@ abstract class AbstractGenerator implements GeneratorInterface
|
|||||||
$chat_style = new ChatStyle($style_name);
|
$chat_style = new ChatStyle($style_name);
|
||||||
$chat_configurations = $chat_style->getConfigurations();
|
$chat_configurations = $chat_style->getConfigurations();
|
||||||
|
|
||||||
return $chat_configurations['chat']['window_params'];
|
return sprintf(
|
||||||
|
"toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=%u,height=%u,resizable=%u",
|
||||||
|
$chat_configurations['chat']['window']['width'],
|
||||||
|
$chat_configurations['chat']['window']['height'],
|
||||||
|
$chat_configurations['chat']['window']['resizable'] ? '1' : '0'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,12 +124,12 @@ class UsersController extends AbstractController
|
|||||||
'banLink' => $request->getBaseUrl() . '/operator/ban',
|
'banLink' => $request->getBaseUrl() . '/operator/ban',
|
||||||
'inviteLink' => $request->getBaseUrl() . '/operator/invite',
|
'inviteLink' => $request->getBaseUrl() . '/operator/invite',
|
||||||
|
|
||||||
'chatWindowParams' => $chat_style_config['chat']['window_params'],
|
'chatWindowParams' => $chat_style_config['chat']['window'],
|
||||||
'geoWindowParams' => Settings::get('geolinkparams'),
|
'geoWindowParams' => Settings::get('geolinkparams'),
|
||||||
'trackedUserWindowParams' => $page_style_config['tracked']['user_window_params'],
|
'trackedUserWindowParams' => $page_style_config['tracked']['user_window_params'],
|
||||||
'trackedVisitorWindowParams' => $page_style_config['tracked']['visitor_window_params'],
|
'trackedVisitorWindowParams' => $page_style_config['tracked']['visitor_window_params'],
|
||||||
'banWindowParams' => $page_style_config['ban']['window_params'],
|
'banWindowParams' => $page_style_config['ban']['window_params'],
|
||||||
'inviteWindowParams' => $chat_style_config['chat']['window_params'],
|
'inviteWindowParams' => $chat_style_config['chat']['window'],
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
@ -141,7 +141,11 @@ class ChatStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface
|
|||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'chat' => array(
|
'chat' => array(
|
||||||
'window_params' => ''
|
'window' => array(
|
||||||
|
'width' => 640,
|
||||||
|
'height' => 480,
|
||||||
|
'resizable' => true,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
'mail' => array(
|
'mail' => array(
|
||||||
'window_params' => ''
|
'window_params' => ''
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
# This file determines some dialog styles options
|
# This file determines some chat styles options
|
||||||
|
|
||||||
chat:
|
chat:
|
||||||
# window_param use as param string in JavaScript window.open method
|
# These params are used for chat windows opened via JavaScript's window.open.
|
||||||
window_params: "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1"
|
window:
|
||||||
|
height: 480
|
||||||
|
width: 640
|
||||||
|
resizable: true
|
||||||
|
|
||||||
mail:
|
mail:
|
||||||
# window_param use as param string in JavaScript window.open method
|
# window_param use as param string in JavaScript window.open method
|
||||||
|
Loading…
Reference in New Issue
Block a user