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 link = this.model.get('link');
var page = Mibew.Objects.Models.page; var page = Mibew.Objects.Models.page;
if (link) { if (link) {
var winParams = this.model.get('windowParams'); var winParams = Mibew.Utils.buildWindowOptions(this.model.get('windowParams'));
var style = page.get('style'); var style = page.get('style');
var styleArg = ''; var styleArg = '';

View File

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

View File

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

View File

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