Use human-readable way to define history window params

This commit is contained in:
Dmitriy Simushev 2015-01-14 13:38:39 +00:00
parent e333ff3d27
commit 1914b23c74
4 changed files with 8 additions and 5 deletions

View File

@ -51,7 +51,7 @@
var user = Mibew.Objects.Models.user;
var link = this.model.get('link');
if (user.get('isAgent') && link) {
var winParams = this.model.get('windowParams');
var winParams = Mibew.Utils.buildWindowParams(this.model.get('windowParams'));
// TODO: Kill & at the server side
link = link.replace('&', '&', 'g');

View File

@ -364,7 +364,7 @@ function setup_chatview(Thread $thread)
$page_style = new PageStyle(PageStyle::getCurrentStyle());
$style_config = $page_style->getConfigurations();
$data['chat']['windowsParams']['history']
= $style_config['history']['window_params'];
= $style_config['history']['window'];
$data['startFrom'] = 'chat';

View File

@ -119,7 +119,7 @@ class PageStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface
{
return array(
'history' => array(
'window_params' => '',
'window' => array(),
),
'users' => array(
'thread_tag' => 'div',

View File

@ -1,8 +1,11 @@
# This file determines some core styles options
history:
# window_param use as param string in JavaScript window.open method
window_params: "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=720,height=560,resizable=1"
# These params are used for history windows opened via JavaScript's window.open.
window:
width: 720
height: 560
resizable: true
users:
# Use as wrap tag for the thread element