Use human-readable way to define send mail window params

This commit is contained in:
Dmitriy Simushev 2015-01-14 12:51:38 +00:00
parent 9faf346634
commit a5b7002239
4 changed files with 12 additions and 5 deletions

View File

@ -51,7 +51,7 @@
var link = this.model.get('link');
var page = Mibew.Objects.Models.page;
if (link) {
var winParams = this.model.get('windowParams');
var winParams = Mibew.Utils.buildWindowOptions(this.model.get('windowParams'));
var style = page.get('style');
var styleArg = '';

View File

@ -358,7 +358,7 @@ function setup_chatview(Thread $thread)
$chat_style = new ChatStyle(ChatStyle::getCurrentStyle());
$style_config = $chat_style->getConfigurations();
$data['chat']['windowsParams']['mail']
= $style_config['mail']['window_params'];
= $style_config['mail']['window'];
// Load core style options
$page_style = new PageStyle(PageStyle::getCurrentStyle());

View File

@ -148,7 +148,11 @@ class ChatStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface
),
),
'mail' => array(
'window_params' => ''
'window' => array(
'width' => 640,
'height' => 480,
'resizable' => true,
),
),
'screenshots' => array(),
);

View File

@ -8,8 +8,11 @@ chat:
resizable: true
mail:
# window_param use as param string in JavaScript window.open method
window_params: "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=603,height=254,resizable=0"
# These params are used for send mail windows opened via JavaScript's window.open.
window:
height: 254
width: 603
resizable: false
# Screenshots section describe all screenshots shiped with style
# Params names should be equals to file names without extension. Pictures