mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-01 05:44:41 +03:00
Merge remote-tracking branch 'upstream/master'
Conflicts: src/mibew/libs/chat.php
This commit is contained in:
commit
bc33e32ea4
@ -1,6 +1,6 @@
|
||||
{
|
||||
"require": {
|
||||
"xamin/handlebars.php": "dev-master#3514a2b1518a64789074af6df1c11a21bb9723cf"
|
||||
"xamin/handlebars.php": "dev-master#da443c5fd52ea5456d8eebdd030968e9fbddbebf"
|
||||
},
|
||||
"config": {
|
||||
"vendor-dir": "mibew/vendor"
|
||||
|
@ -42,7 +42,7 @@ if (Settings::get('enablessl') == "1" && Settings::get('forcessl') == "1") {
|
||||
}
|
||||
|
||||
// Initialize chat style which is currently used in system
|
||||
$chat_style = new ChatStyle(ChatStyle::currentStyle());
|
||||
$chat_style = new ChatStyle(ChatStyle::getCurrentStyle());
|
||||
|
||||
// Do not support old browsers at all
|
||||
if (get_remote_level($_SERVER['HTTP_USER_AGENT']) == 'old') {
|
||||
|
@ -5,6 +5,6 @@
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
(function(e,b){b.registerHelper("apply",function(a,c){var f=a,e=/^[0-9A-z_]+$/;c=c.split(/\s*,\s*/);for(var d in c)if(c.hasOwnProperty(d)&&e.test(c[d])){if("function"!=typeof b.helpers[c[d]])throw Error("Unregistered helper '"+c[d]+"'!");f=b.helpers[c[d]](f).toString()}return new b.SafeString(f)});b.registerHelper("allowTags",function(a){a=a.replace(/<(span|strong)>(.*?)<\/\1>/g,"<$1>$2</$1>");a=a.replace(/<span class="(.*?)">(.*?)<\/span>/g,'<span class="$1">$2</span>');
|
||||
return new b.SafeString(a)});b.registerHelper("formatTime",function(a){var c=new Date(1E3*a);a=c.getHours().toString();var b=c.getMinutes().toString(),c=c.getSeconds().toString();return(10>a?"0"+a:a)+":"+(10>b?"0"+b:b)+":"+(10>c?"0"+c:c)});b.registerHelper("urlReplace",function(a){return new b.SafeString(a.replace(/((?:https?|ftp):\/\/\S*)/g,'<a href="$1" target="_blank">$1</a>'))});b.registerHelper("nl2br",function(a){return new b.SafeString(a.replace(/\n/g,"<br/>"))});b.registerHelper("l10n",function(a){return e.Localization.get(a)||
|
||||
""})})(Mibew,Handlebars);
|
||||
(function(e,c){c.registerHelper("apply",function(a,b){var f=a,e=/^[0-9A-z_]+$/;b=b.split(/\s*,\s*/);for(var d in b)if(b.hasOwnProperty(d)&&e.test(b[d])){if("function"!=typeof c.helpers[b[d]])throw Error("Unregistered helper '"+b[d]+"'!");f=c.helpers[b[d]](f).toString()}return new c.SafeString(f)});c.registerHelper("allowTags",function(a){a=a.replace(/<(span|strong)>(.*?)<\/\1>/g,"<$1>$2</$1>");a=a.replace(/<span class="(.*?)">(.*?)<\/span>/g,'<span class="$1">$2</span>');
|
||||
return new c.SafeString(a)});c.registerHelper("formatTime",function(a){var b=new Date(1E3*a);a=b.getHours().toString();var c=b.getMinutes().toString(),b=b.getSeconds().toString();return(10>a?"0"+a:a)+":"+(10>c?"0"+c:c)+":"+(10>b?"0"+b:b)});c.registerHelper("urlReplace",function(a){return new c.SafeString(a.replace(/((?:https?|ftp):\/\/\S*)/g,'<a href="$1" target="_blank">$1</a>'))});c.registerHelper("nl2br",function(a){return new c.SafeString(a.replace(/\n/g,"<br/>"))});c.registerHelper("l10n",function(a){return e.Localization.get(a)||
|
||||
""});c.registerHelper("ifEven",function(a,b){return 0===a%2?b.fn(this):b.inverse(this)});c.registerHelper("ifOdd",function(a,b){return 0!==a%2?b.fn(this):b.inverse(this)})})(Mibew,Handlebars);
|
||||
|
@ -11,9 +11,9 @@ var Mibew={};(function(a,d,b){d.Marionette.TemplateCache.prototype.compileTempla
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
(function(e,b){b.registerHelper("apply",function(a,c){var f=a,e=/^[0-9A-z_]+$/;c=c.split(/\s*,\s*/);for(var d in c)if(c.hasOwnProperty(d)&&e.test(c[d])){if("function"!=typeof b.helpers[c[d]])throw Error("Unregistered helper '"+c[d]+"'!");f=b.helpers[c[d]](f).toString()}return new b.SafeString(f)});b.registerHelper("allowTags",function(a){a=a.replace(/<(span|strong)>(.*?)<\/\1>/g,"<$1>$2</$1>");a=a.replace(/<span class="(.*?)">(.*?)<\/span>/g,'<span class="$1">$2</span>');
|
||||
return new b.SafeString(a)});b.registerHelper("formatTime",function(a){var c=new Date(1E3*a);a=c.getHours().toString();var b=c.getMinutes().toString(),c=c.getSeconds().toString();return(10>a?"0"+a:a)+":"+(10>b?"0"+b:b)+":"+(10>c?"0"+c:c)});b.registerHelper("urlReplace",function(a){return new b.SafeString(a.replace(/((?:https?|ftp):\/\/\S*)/g,'<a href="$1" target="_blank">$1</a>'))});b.registerHelper("nl2br",function(a){return new b.SafeString(a.replace(/\n/g,"<br/>"))});b.registerHelper("l10n",function(a){return e.Localization.get(a)||
|
||||
""})})(Mibew,Handlebars);
|
||||
(function(e,c){c.registerHelper("apply",function(a,b){var f=a,e=/^[0-9A-z_]+$/;b=b.split(/\s*,\s*/);for(var d in b)if(b.hasOwnProperty(d)&&e.test(b[d])){if("function"!=typeof c.helpers[b[d]])throw Error("Unregistered helper '"+b[d]+"'!");f=c.helpers[b[d]](f).toString()}return new c.SafeString(f)});c.registerHelper("allowTags",function(a){a=a.replace(/<(span|strong)>(.*?)<\/\1>/g,"<$1>$2</$1>");a=a.replace(/<span class="(.*?)">(.*?)<\/span>/g,'<span class="$1">$2</span>');
|
||||
return new c.SafeString(a)});c.registerHelper("formatTime",function(a){var b=new Date(1E3*a);a=b.getHours().toString();var c=b.getMinutes().toString(),b=b.getSeconds().toString();return(10>a?"0"+a:a)+":"+(10>c?"0"+c:c)+":"+(10>b?"0"+b:b)});c.registerHelper("urlReplace",function(a){return new c.SafeString(a.replace(/((?:https?|ftp):\/\/\S*)/g,'<a href="$1" target="_blank">$1</a>'))});c.registerHelper("nl2br",function(a){return new c.SafeString(a.replace(/\n/g,"<br/>"))});c.registerHelper("l10n",function(a){return e.Localization.get(a)||
|
||||
""});c.registerHelper("ifEven",function(a,b){return 0===a%2?b.fn(this):b.inverse(this)});c.registerHelper("ifOdd",function(a,b){return 0!==a%2?b.fn(this):b.inverse(this)})})(Mibew,Handlebars);
|
||||
/*
|
||||
Copyright 2005-2014 the original author or authors.
|
||||
Licensed under the Apache License, Version 2.0 (the "License").
|
||||
|
2
src/mibew/js/libs/backbone-min.js
vendored
2
src/mibew/js/libs/backbone-min.js
vendored
File diff suppressed because one or more lines are too long
5
src/mibew/js/libs/backbone.marionette.min.js
vendored
5
src/mibew/js/libs/backbone.marionette.min.js
vendored
File diff suppressed because one or more lines are too long
@ -110,4 +110,44 @@
|
||||
Handlebars.registerHelper('l10n', function(key) {
|
||||
return (Mibew.Localization.get(key) || '');
|
||||
});
|
||||
|
||||
/**
|
||||
* Register "ifEven" helper.
|
||||
*
|
||||
* This helper checks if specified value is even or not. Example of usage:
|
||||
* <code>
|
||||
* {{#ifEven value}}
|
||||
* The value is even.
|
||||
* {{else}}
|
||||
* The value is odd.
|
||||
* {{/ifEven}}
|
||||
* </code>
|
||||
*/
|
||||
Handlebars.registerHelper('ifEven', function(value, options) {
|
||||
if ((value % 2) === 0) {
|
||||
return options.fn(this);
|
||||
} else {
|
||||
return options.inverse(this);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Register "ifOdd" helper.
|
||||
*
|
||||
* This helper checks if specified value is odd or not. Example of usage:
|
||||
* <code>
|
||||
* {{#ifOdd value}}
|
||||
* The value is odd.
|
||||
* {{else}}
|
||||
* The value is even.
|
||||
* {{/ifOdd}}
|
||||
* </code>
|
||||
*/
|
||||
Handlebars.registerHelper('ifOdd', function(value, options) {
|
||||
if ((value % 2) !== 0) {
|
||||
return options.fn(this);
|
||||
} else {
|
||||
return options.inverse(this);
|
||||
}
|
||||
});
|
||||
})(Mibew, Handlebars);
|
@ -22,11 +22,6 @@ use Mibew\Thread;
|
||||
use Mibew\Style\ChatStyle;
|
||||
use Mibew\Style\PageStyle;
|
||||
|
||||
/**
|
||||
* Names for chat-related cookies
|
||||
*/
|
||||
define('USERID_COOKIE_NAME', 'MIBEW_UserID');
|
||||
define('USERNAME_COOKIE_NAME', 'MIBEW_Data');
|
||||
/**
|
||||
* Convert messages to formated text
|
||||
*
|
||||
@ -34,6 +29,7 @@ define('USERNAME_COOKIE_NAME', 'MIBEW_Data');
|
||||
*
|
||||
* @return string formatted message
|
||||
*/
|
||||
|
||||
function message_to_text($msg)
|
||||
{
|
||||
$message_time = date("H:i:s ", $msg['created']);
|
||||
@ -49,6 +45,7 @@ function message_to_text($msg)
|
||||
return $message_time . "[" . $msg['message'] . "]\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Format username
|
||||
*
|
||||
@ -70,6 +67,7 @@ function get_user_name($user_name, $addr, $id)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if browser support ajax requests
|
||||
*
|
||||
@ -105,6 +103,7 @@ function is_ajax_browser($browser_id, $ver, $user_agent)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if browser support ajax requests
|
||||
*
|
||||
@ -152,6 +151,7 @@ function get_known_user_agents()
|
||||
"mozilla",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if browser is opera 9.5 or greater
|
||||
*
|
||||
@ -172,6 +172,7 @@ function is_agent_opera95()
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if browser is opera with mac os
|
||||
*
|
||||
@ -183,6 +184,7 @@ function is_mac_opera()
|
||||
|
||||
return strstr($user_agent, "opera") && strstr($user_agent, "mac");
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if frame src needed
|
||||
*
|
||||
@ -483,14 +485,14 @@ function setup_chatview(Thread $thread)
|
||||
$data['neediframesrc'] = needs_frame_src();
|
||||
|
||||
// Load dialogs style options
|
||||
$chat_style = new ChatStyle(ChatStyle::currentStyle());
|
||||
$style_config = $chat_style->configurations();
|
||||
$chat_style = new ChatStyle(ChatStyle::getCurrentStyle());
|
||||
$style_config = $chat_style->getConfigurations();
|
||||
$data['chat']['windowsParams']['mail']
|
||||
= $style_config['mail']['window_params'];
|
||||
|
||||
// Load core style options
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$style_config = $page_style->configurations();
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$style_config = $page_style->getConfigurations();
|
||||
$data['chat']['windowsParams']['history']
|
||||
= $style_config['history']['window_params'];
|
||||
|
||||
@ -628,6 +630,7 @@ function setup_chatview_for_operator(Thread $thread, $operator)
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the address is banned
|
||||
*
|
||||
@ -648,6 +651,7 @@ function ban_for_addr($addr)
|
||||
array('return_rows' => Database::RETURN_ONE_ROW)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array Return visitor info from active request. contains
|
||||
* (user_id string, user_name string)
|
||||
@ -676,6 +680,7 @@ function visitor_from_request()
|
||||
|
||||
return array('id' => $user_id, 'name' => $user_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array Return remote host from active request. contains
|
||||
* (user_id string, user_name string)
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
namespace Mibew;
|
||||
|
||||
use Mibew\Plugin\PluginInterface;
|
||||
|
||||
/**
|
||||
* Provide event-related functionality.
|
||||
* Implements singleton pattern.
|
||||
@ -65,7 +67,8 @@ class EventDispatcher
|
||||
* All event listeners must receive one argument of array type by reference.
|
||||
*
|
||||
* @param string $event_name Event's name
|
||||
* @param \Mibew\Plugin $plugin Plugin object, that handles the event
|
||||
* @param \Mibew\Plugin\PluginInterface $plugin Plugin object, that handles
|
||||
* the event
|
||||
* @param string $listener Plugins method, that handles the event
|
||||
* @param int $priority Priority of listener. If $priority = null, the
|
||||
* plugin weight will use instead.
|
||||
@ -73,8 +76,12 @@ class EventDispatcher
|
||||
*
|
||||
* @see \Mibew\Plugin::getWeight()
|
||||
*/
|
||||
public function attachListener($event_name, Plugin $plugin, $listener, $priority = null)
|
||||
{
|
||||
public function attachListener(
|
||||
$event_name,
|
||||
PluginInterface $plugin,
|
||||
$listener,
|
||||
$priority = null
|
||||
) {
|
||||
// Check method is callable
|
||||
if (!is_callable(array($plugin, $listener))) {
|
||||
trigger_error("Method '{$listener}' is not callable!", E_USER_WARNING);
|
||||
@ -107,8 +114,7 @@ class EventDispatcher
|
||||
* @param string $listener Plugins method, that handles the event
|
||||
* @return boolean true on success or false on failure.
|
||||
*/
|
||||
public function detachListener($event_name, Plugin $plugin, $listener)
|
||||
{
|
||||
public function detachListener($event_name, PluginInterface $plugin, $listener) {
|
||||
// Check event exists
|
||||
if (!array_key_exists($event_name, $this->events)) {
|
||||
return false;
|
||||
|
172
src/mibew/libs/classes/Mibew/Plugin/AbstractPlugin.php
Normal file
172
src/mibew/libs/classes/Mibew/Plugin/AbstractPlugin.php
Normal file
@ -0,0 +1,172 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright 2005-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
namespace Mibew\Plugin;
|
||||
|
||||
/**
|
||||
* Abstract class for plugin which implements base plugins functionality.
|
||||
*/
|
||||
abstract class AbstractPlugin
|
||||
{
|
||||
/**
|
||||
* Plugin's configurations
|
||||
* @var array
|
||||
*/
|
||||
protected $config = array();
|
||||
|
||||
/**
|
||||
* Indicates if plugin was initialized correctly or not.
|
||||
* @var boolean
|
||||
*/
|
||||
protected $initialized = false;
|
||||
|
||||
/**
|
||||
* Plugin's weight
|
||||
* @var int
|
||||
*/
|
||||
protected $weight = 0;
|
||||
|
||||
/**
|
||||
* Default plugin constructor.
|
||||
*
|
||||
* Saves passed in variable in AbstractPlugin::$config property. Also
|
||||
* updates AbstractPlugin::$weight property to $config["weigth"] if the last
|
||||
* one is specified.
|
||||
*
|
||||
* @param array $config Associative array of plugin's configurations.
|
||||
*/
|
||||
public function __construct($config)
|
||||
{
|
||||
// Update weight from the config
|
||||
if (isset($config['weight'])) {
|
||||
$this->weight = $config['weight'];
|
||||
}
|
||||
|
||||
// Save configurations
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of {@link \Mibew\Plugin\PluginInterface::getFilesPath()}.
|
||||
*
|
||||
* Determine file path based on path to the file which contains a class of
|
||||
* concrete plugin.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFilesPath()
|
||||
{
|
||||
static $path = false;
|
||||
|
||||
if ($path === false) {
|
||||
// Get full name of the file with the current plugin class
|
||||
$reflection = new \ReflectionClass($this);
|
||||
$file_path = $reflection->getFileName();
|
||||
|
||||
// Remove FS root from the path
|
||||
if (strpos($file_path, MIBEW_FS_ROOT) === 0) {
|
||||
$file_path = substr($file_path, strlen(MIBEW_FS_ROOT));
|
||||
}
|
||||
|
||||
// Remove file name
|
||||
$path_parts = explode(
|
||||
DIRECTORY_SEPARATOR,
|
||||
trim($file_path, DIRECTORY_SEPARATOR)
|
||||
);
|
||||
array_pop($path_parts);
|
||||
$path = implode(DIRECTORY_SEPARATOR, $path_parts);
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of {@link \Mibew\Plugin\PluginInterface::getWeight()}.
|
||||
*
|
||||
* Returns value of the AbstractPlugin::$weight property. Thus the
|
||||
* property can be used to change weight of the plugin.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getWeight()
|
||||
{
|
||||
return $this->weight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of {@link \Mibew\Plugin\PluginInterface::initialized()}.
|
||||
*
|
||||
* Returns value of the AbstractPlugin::$initialized property. Thus the
|
||||
* property can be used to change initialization status.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function initialized()
|
||||
{
|
||||
return $this->initialized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of
|
||||
* {@link \Mibew\Plugin\PluginInterface::getDependencies()}.
|
||||
*
|
||||
* Returns an empty array to tell the Plugin Manager that the plugin has
|
||||
* no dependencies.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getDependencies()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of {@link \Mibew\Plugin\PluginInterface::getInfo()}.
|
||||
*
|
||||
* Returns an empty array.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getInfo()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of {@link \Mibew\Plugin\PluginInterface::install()}.
|
||||
*
|
||||
* The method does not perform any actions just returns boolean true.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function install()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of {@link \Mibew\Plugin\PluginInterface::uninstall()}.
|
||||
*
|
||||
* The method does not perform any actions just returns boolean true.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function uninstall()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@ -29,6 +29,14 @@ interface PluginInterface
|
||||
*/
|
||||
public function getWeight();
|
||||
|
||||
/**
|
||||
* Builds base path for plugin files. This path is relative to Mibew root
|
||||
* and does not contain neither leading nor trailing slash.
|
||||
*
|
||||
* @return string Base path for plugin files
|
||||
*/
|
||||
public function getFilesPath();
|
||||
|
||||
/**
|
||||
* Indicates if plugin has been initialized correctly or not.
|
||||
*
|
||||
@ -56,4 +64,31 @@ interface PluginInterface
|
||||
* @return array List of plugin's dependencies.
|
||||
*/
|
||||
public static function getDependencies();
|
||||
|
||||
/**
|
||||
* Returns some info about plugin such as human-readable name, description,
|
||||
* version, etc.
|
||||
*
|
||||
* At the moment this info is not used at all, so a plugin can return an
|
||||
* empty array.
|
||||
*
|
||||
* @return array Associative array with plugin info
|
||||
*/
|
||||
public static function getInfo();
|
||||
|
||||
/**
|
||||
* Makes all actions that are needed to install the plugin.
|
||||
*
|
||||
* @return boolean True if the plugin was successfully installed and false
|
||||
* otherwise.
|
||||
*/
|
||||
public static function install();
|
||||
|
||||
/**
|
||||
* Makes all actions that are needed to uninstall the plugin.
|
||||
*
|
||||
* @return boolean True if the plugin was successfully uninstalled and false
|
||||
* otherwise.
|
||||
*/
|
||||
public static function uninstall();
|
||||
}
|
||||
|
@ -90,6 +90,8 @@ use Mibew\RequestProcessor\Exception\AbstractProcessorException;
|
||||
* }
|
||||
* </code>
|
||||
*
|
||||
* Implements Singleton pattern for children classes using Late Static Bindings.
|
||||
*
|
||||
* @see \Mibew\RequestProcessor\AbstractProcessor::__construct()
|
||||
*/
|
||||
abstract class AbstractProcessor
|
||||
@ -123,42 +125,24 @@ abstract class AbstractProcessor
|
||||
protected $config = array();
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
* An instance of the AbstractProcessor class
|
||||
*
|
||||
* @param type $config Configuration data.
|
||||
* It must contains following keys:
|
||||
* - 'signature': Use for verification sender
|
||||
* - 'trusted_signatures': array of trusted signatures. Uses for identify
|
||||
* another side of interaction.
|
||||
* And may contains following (if not default values will be used)
|
||||
* - 'event_prefix': prefix that uses for all events triggered by the
|
||||
* class. The default value is the class name with first character in
|
||||
* lower case
|
||||
* @var \Mibew\RequestProcessor\AbstractProcessor
|
||||
*/
|
||||
public function __construct($config)
|
||||
protected static $instance = null;
|
||||
|
||||
/**
|
||||
* Return an instance of the AbstractProcessor class.
|
||||
*
|
||||
* @return \Mibew\RequestProcessor\AbstractProcessor
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
// Check signature
|
||||
if (!isset($config['signature'])) {
|
||||
trigger_error("Signature is not specified", E_USER_ERROR);
|
||||
if (is_null(static::$instance)) {
|
||||
static::$instance = new static();
|
||||
}
|
||||
|
||||
// Check trusted signatures
|
||||
if (!isset($config['trusted_signatures'])) {
|
||||
trigger_error("Trusted signatures is not specified", E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Get an instance of the MibewAPI class
|
||||
$this->mibewAPI = $this->getMibewAPIInstance();
|
||||
|
||||
// Get class name and prefix for events and etc.
|
||||
$class_name_parts = explode('\\', get_class($this));
|
||||
$class_name = array_pop($class_name_parts);
|
||||
$this->eventPrefix = empty($config['event_prefix'])
|
||||
? strtolower(substr($class_name, 0, 1)) . substr($class_name, 1)
|
||||
: $config['event_prefix'];
|
||||
|
||||
// Store config
|
||||
$this->config = $config;
|
||||
return static::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -336,6 +320,45 @@ abstract class AbstractProcessor
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* @param type $config Configuration data.
|
||||
* It must contains following keys:
|
||||
* - 'signature': Use for verification sender
|
||||
* - 'trusted_signatures': array of trusted signatures. Uses for identify
|
||||
* another side of interaction.
|
||||
* And may contains following (if not default values will be used)
|
||||
* - 'event_prefix': prefix that uses for all events triggered by the
|
||||
* class. The default value is the class name with first character in
|
||||
* lower case
|
||||
*/
|
||||
protected function __construct($config)
|
||||
{
|
||||
// Check signature
|
||||
if (!isset($config['signature'])) {
|
||||
trigger_error("Signature is not specified", E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Check trusted signatures
|
||||
if (!isset($config['trusted_signatures'])) {
|
||||
trigger_error("Trusted signatures is not specified", E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Get an instance of the MibewAPI class
|
||||
$this->mibewAPI = $this->getMibewAPIInstance();
|
||||
|
||||
// Get class name and prefix for events and etc.
|
||||
$class_name_parts = explode('\\', get_class($this));
|
||||
$class_name = array_pop($class_name_parts);
|
||||
$this->eventPrefix = empty($config['event_prefix'])
|
||||
? strtolower(substr($class_name, 0, 1)) . substr($class_name, 1)
|
||||
: $config['event_prefix'];
|
||||
|
||||
// Store config
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process request
|
||||
*
|
||||
|
@ -30,41 +30,13 @@ use Mibew\RequestProcessor\Exception\InviteProcessorException;
|
||||
* - inviteReceiveRequestError
|
||||
* - inviteCallError
|
||||
* - inviteFunctionCall
|
||||
*
|
||||
* Implements Singleton pattern
|
||||
*/
|
||||
class InviteProcessor extends ClientSideProcessor
|
||||
{
|
||||
/**
|
||||
* An instance of the InviteProcessor class
|
||||
*
|
||||
* @var \Mibew\RequestProcessor\InviteProcessor
|
||||
*/
|
||||
protected static $instance = null;
|
||||
|
||||
/**
|
||||
* Return an instance of the InviteProcessor class.
|
||||
*
|
||||
* @return \Mibew\RequestProcessor\InviteProcessor
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if (is_null(self::$instance)) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* Do not use directly __construct method! Use
|
||||
* \Mibew\RequestProcessor\InviteProcessor::getInstance() instead!
|
||||
*
|
||||
* @todo Think about why the method is not protected
|
||||
*/
|
||||
public function __construct()
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct(array(
|
||||
'signature' => '',
|
||||
|
@ -36,32 +36,9 @@ use Mibew\RequestProcessor\Exception\ThreadProcessorException;
|
||||
* WARNING:
|
||||
* threadResponseReceived registered but never called because of asynchronous
|
||||
* nature of Core-to-Window interaction
|
||||
*
|
||||
* Implements Singleton pattern
|
||||
*/
|
||||
class ThreadProcessor extends ClientSideProcessor
|
||||
{
|
||||
/**
|
||||
* An instance of the ThreadProcessor class
|
||||
*
|
||||
* @var \Mibew\RequestProcessor\ThreadProcessor
|
||||
*/
|
||||
protected static $instance = null;
|
||||
|
||||
/**
|
||||
* Return an instance of the ThreadProcessor class.
|
||||
*
|
||||
* @return \Mibew\RequestProcessor\ThreadProcessor
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if (is_null(self::$instance)) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads thread by id and token and checks if thread loaded
|
||||
*
|
||||
@ -131,11 +108,8 @@ class ThreadProcessor extends ClientSideProcessor
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* Do not use directly __construct method! Use
|
||||
* \Mibew\RequestProcessor\ThreadProcessor::getInstance() instead!
|
||||
*/
|
||||
public function __construct()
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct(array(
|
||||
'signature' => '',
|
||||
|
@ -38,41 +38,13 @@ use Mibew\RequestProcessor\Exception\UsersProcessorException;
|
||||
* Also triggers follow events (see description of apiUpdateVisitors method):
|
||||
* - usersUpdateVisitorsLoad
|
||||
* - usersUpdateVisitorsAlter
|
||||
*
|
||||
* Implements Singleton pattern
|
||||
*/
|
||||
class UsersProcessor extends ClientSideProcessor
|
||||
{
|
||||
/**
|
||||
* An instance of the UsersProcessor class
|
||||
*
|
||||
* @var \Mibew\RequestProcessor\UsersProcessor
|
||||
*/
|
||||
protected static $instance = null;
|
||||
|
||||
/**
|
||||
* Return an instance of the UsersProcessor class.
|
||||
*
|
||||
* @return \Mibew\RequestProcessor\UsersProcessor
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if (is_null(self::$instance)) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class constructor
|
||||
*
|
||||
* Do not use directly __construct method! Use
|
||||
* \Mibew\RequestProcessor\UsersProcessor::getInstance() instead!
|
||||
*
|
||||
* @todo Think about why the method is not protected
|
||||
*/
|
||||
public function __construct()
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct(array(
|
||||
'signature' => '',
|
||||
@ -178,6 +150,12 @@ class UsersProcessor extends ClientSideProcessor
|
||||
/**
|
||||
* Return updated threads list. API function
|
||||
*
|
||||
* Triggers the following events:
|
||||
* 1. 'usersUpdateThreadsAlter': provide the ability to alter threads
|
||||
* list. Associative array is passed to event lister. It has the
|
||||
* following keys:
|
||||
* - 'threads': array of threads arrays.
|
||||
*
|
||||
* @param array $args Associative array of arguments. It must contains the
|
||||
* following keys:
|
||||
* - 'agentId': Id of the agent related to users window
|
||||
@ -317,6 +295,7 @@ class UsersProcessor extends ClientSideProcessor
|
||||
$threads[] = array(
|
||||
'id' => $thread->id,
|
||||
'token' => $thread->lastToken,
|
||||
'userId' => $thread->userId,
|
||||
'userName' => $user_name,
|
||||
'userIp' => $user_ip,
|
||||
'remote' => $thread->remote,
|
||||
@ -341,9 +320,16 @@ class UsersProcessor extends ClientSideProcessor
|
||||
unset($thread);
|
||||
}
|
||||
|
||||
// Provide an ability to alter threads list
|
||||
$arguments = array(
|
||||
'threads' => $threads,
|
||||
);
|
||||
$dispatcher = EventDispatcher::getInstance();
|
||||
$dispatcher->triggerEvent('usersUpdateThreadsAlter', $arguments);
|
||||
|
||||
// Send results back to the client
|
||||
return array(
|
||||
'threads' => $threads,
|
||||
'threads' => $arguments['threads'],
|
||||
'lastRevision' => $revision,
|
||||
);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ abstract class AbstractStyle
|
||||
*
|
||||
* @return string Name of the style
|
||||
*/
|
||||
public function name()
|
||||
public function getName()
|
||||
{
|
||||
return $this->styleName;
|
||||
}
|
||||
@ -72,9 +72,9 @@ abstract class AbstractStyle
|
||||
* @return array Style configurations
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function configurations()
|
||||
public function getConfigurations()
|
||||
{
|
||||
$config_file = MIBEW_FS_ROOT . '/' . $this->filesPath() . '/config.ini';
|
||||
$config_file = MIBEW_FS_ROOT . '/' . $this->getFilesPath() . '/config.ini';
|
||||
|
||||
// Check if configurations already loaded. Do not do the job twice.
|
||||
if (is_null($this->cachedConfigurations)) {
|
||||
@ -89,7 +89,7 @@ abstract class AbstractStyle
|
||||
// Load configurations from file, merge it with default configs and
|
||||
// cache the result.
|
||||
$loaded_config = parse_ini_file($config_file, true);
|
||||
$default_config = $this->defaultConfigurations();
|
||||
$default_config = $this->getDefaultConfigurations();
|
||||
$this->cachedConfigurations = $loaded_config + $default_config;
|
||||
}
|
||||
|
||||
@ -97,12 +97,12 @@ abstract class AbstractStyle
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds base path for style files. This path is relative Mibew root and
|
||||
* Builds base path for style files. This path is relative to Mibew root and
|
||||
* does not contain neither leading nor trailing slash.
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
abstract public function filesPath();
|
||||
abstract public function getFilesPath();
|
||||
|
||||
/**
|
||||
* Gets names of styles which are located in the $root_dir.
|
||||
@ -138,5 +138,5 @@ abstract class AbstractStyle
|
||||
*
|
||||
* @return array Default configurations of the style
|
||||
*/
|
||||
abstract protected function defaultConfigurations();
|
||||
abstract protected function getDefaultConfigurations();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
parent::__construct($style_name);
|
||||
|
||||
$templates_loader = new \Handlebars\Loader\FilesystemLoader(
|
||||
MIBEW_FS_ROOT . '/' . $this->filesPath() . '/templates_src/server_side/'
|
||||
MIBEW_FS_ROOT . '/' . $this->getFilesPath() . '/templates_src/server_side/'
|
||||
);
|
||||
|
||||
$this->templateEngine = new \Handlebars\Handlebars(array(
|
||||
@ -63,9 +63,9 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
public function filesPath()
|
||||
public function getFilesPath()
|
||||
{
|
||||
return 'styles/dialogs/' . $this->name();
|
||||
return 'styles/dialogs/' . $this->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -85,8 +85,8 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
$data['mibewVersion'] = MIBEW_VERSION;
|
||||
$data['currentLocale'] = CURRENT_LOCALE;
|
||||
$data['rtl'] = (getlocal("localedirection") == 'rtl');
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->filesPath();
|
||||
$data['styleName'] = $this->name();
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath();
|
||||
$data['styleName'] = $this->getName();
|
||||
|
||||
echo($this->templateEngine->render($template_name, $data));
|
||||
}
|
||||
@ -100,17 +100,17 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
* @return string Name of a style
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public static function currentStyle()
|
||||
public static function getCurrentStyle()
|
||||
{
|
||||
// Ceck if request contains chat style
|
||||
$style_name = verify_param("style", "/^\w+$/", "");
|
||||
if (!$style_name) {
|
||||
// Use the default style
|
||||
$style_name = self::defaultStyle();
|
||||
$style_name = self::getDefaultStyle();
|
||||
}
|
||||
|
||||
// Get all style list and make sure that in has at least one style.
|
||||
$available_styles = self::availableStyles();
|
||||
$available_styles = self::getAvailableStyles();
|
||||
if (empty($available_styles)) {
|
||||
throw new \RuntimeException('There are no dialog styles in the system');
|
||||
}
|
||||
@ -132,7 +132,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Name of a style
|
||||
*/
|
||||
public static function defaultStyle()
|
||||
public static function getDefaultStyle()
|
||||
{
|
||||
// Load value from system settings
|
||||
return Settings::get('chat_style');
|
||||
@ -154,7 +154,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @param array List of styles names
|
||||
*/
|
||||
public static function availableStyles()
|
||||
public static function getAvailableStyles()
|
||||
{
|
||||
$styles_root = MIBEW_FS_ROOT . '/styles/dialogs';
|
||||
|
||||
@ -167,7 +167,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return array Default configurations of the style
|
||||
*/
|
||||
protected function defaultConfigurations()
|
||||
protected function getDefaultConfigurations()
|
||||
{
|
||||
return array(
|
||||
'chat' => array(
|
||||
|
@ -31,9 +31,9 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
public function filesPath()
|
||||
public function getFilesPath()
|
||||
{
|
||||
return 'styles/invitations/' . $this->name();
|
||||
return 'styles/invitations/' . $this->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -41,7 +41,7 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return array Style configurations
|
||||
*/
|
||||
public function configurations()
|
||||
public function getConfigurations()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@ -65,10 +65,10 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Name of a style
|
||||
*/
|
||||
public static function currentStyle()
|
||||
public static function getCurrentStyle()
|
||||
{
|
||||
// Just use the default style
|
||||
return self::defaultStyle();
|
||||
return self::getDefaultStyle();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -76,7 +76,7 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Name of a style
|
||||
*/
|
||||
public static function defaultStyle()
|
||||
public static function getDefaultStyle()
|
||||
{
|
||||
// Load value from system settings
|
||||
return Settings::get('invitation_style');
|
||||
@ -98,7 +98,7 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @param array List of styles names
|
||||
*/
|
||||
public static function availableStyles()
|
||||
public static function getAvailableStyles()
|
||||
{
|
||||
$styles_root = MIBEW_FS_ROOT . '/styles/invitations';
|
||||
|
||||
@ -111,7 +111,7 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return array Default configurations of the style
|
||||
*/
|
||||
protected function defaultConfigurations()
|
||||
protected function getDefaultConfigurations()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
parent::__construct($style_name);
|
||||
|
||||
$templates_loader = new \Handlebars\Loader\FilesystemLoader(
|
||||
MIBEW_FS_ROOT . '/' . $this->filesPath() . '/templates_src/server_side/'
|
||||
MIBEW_FS_ROOT . '/' . $this->getFilesPath() . '/templates_src/server_side/'
|
||||
);
|
||||
|
||||
$this->templateEngine = new \Handlebars\Handlebars(array(
|
||||
@ -63,9 +63,9 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
public function filesPath()
|
||||
public function getFilesPath()
|
||||
{
|
||||
return 'styles/pages/' . $this->name();
|
||||
return 'styles/pages/' . $this->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,8 +86,8 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
$data['mibewVersion'] = MIBEW_VERSION;
|
||||
$data['currentLocale'] = CURRENT_LOCALE;
|
||||
$data['rtl'] = (getlocal("localedirection") == 'rtl');
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->filesPath();
|
||||
$data['styleName'] = $this->name();
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath();
|
||||
$data['styleName'] = $this->getName();
|
||||
|
||||
echo($this->templateEngine->render($template_name, $data));
|
||||
}
|
||||
@ -100,10 +100,10 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Name of a style
|
||||
*/
|
||||
public static function currentStyle()
|
||||
public static function getCurrentStyle()
|
||||
{
|
||||
// Just use the default style
|
||||
return self::defaultStyle();
|
||||
return self::getDefaultStyle();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -111,7 +111,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return string Name of a style
|
||||
*/
|
||||
public static function defaultStyle()
|
||||
public static function getDefaultStyle()
|
||||
{
|
||||
// Load value from system settings
|
||||
return Settings::get('page_style');
|
||||
@ -133,7 +133,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @param array List of styles names
|
||||
*/
|
||||
public static function availableStyles()
|
||||
public static function getAvailableStyles()
|
||||
{
|
||||
$styles_root = MIBEW_FS_ROOT . '/styles/pages';
|
||||
|
||||
@ -146,7 +146,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @return array Default configurations of the style
|
||||
*/
|
||||
protected function defaultConfigurations()
|
||||
protected function getDefaultConfigurations()
|
||||
{
|
||||
return array(
|
||||
'history' => array(
|
||||
|
@ -31,14 +31,14 @@ interface StyleInterface
|
||||
*
|
||||
* @return string Name of a style
|
||||
*/
|
||||
public static function currentStyle();
|
||||
public static function getCurrentStyle();
|
||||
|
||||
/**
|
||||
* Returns name of the style which is used in the system by default.
|
||||
*
|
||||
* @return string Name of a style
|
||||
*/
|
||||
public static function defaultStyle();
|
||||
public static function getDefaultStyle();
|
||||
|
||||
/**
|
||||
* Sets style which is used in the system by default
|
||||
@ -52,29 +52,29 @@ interface StyleInterface
|
||||
*
|
||||
* @param array List of styles names
|
||||
*/
|
||||
public static function availableStyles();
|
||||
public static function getAvailableStyles();
|
||||
|
||||
/**
|
||||
* Builds base path for style files. This URL is relative Mibew root and
|
||||
* Builds base path for style files. This path is relative to Mibew root and
|
||||
* does not contain neither leading nor trailing slash.
|
||||
*
|
||||
* @return string Base path for style files
|
||||
*/
|
||||
public function filesPath();
|
||||
public function getFilesPath();
|
||||
|
||||
/**
|
||||
* Loads and returns configurations of the style.
|
||||
*
|
||||
* @param array $name Style's configuration params
|
||||
*/
|
||||
public function configurations();
|
||||
public function getConfigurations();
|
||||
|
||||
/**
|
||||
* Returns name of the style related with the object
|
||||
*
|
||||
* @return string Name of the style
|
||||
*/
|
||||
public function name();
|
||||
public function getName();
|
||||
|
||||
/**
|
||||
* Renders template file to HTML and send it to the output
|
||||
|
@ -54,3 +54,9 @@ define('VISITOR_COOKIE_NAME', 'MIBEW_VisitorID');
|
||||
* Internal system encoding
|
||||
*/
|
||||
define('MIBEW_ENCODING', $mibew_encoding);
|
||||
|
||||
/**
|
||||
* Names for chat-related cookies
|
||||
*/
|
||||
define('USERID_COOKIE_NAME', 'MIBEW_UserID');
|
||||
define('USERNAME_COOKIE_NAME', 'MIBEW_Data');
|
||||
|
@ -197,8 +197,15 @@ function load_messages($locale)
|
||||
$plugins_list = array_keys(PluginManager::getAllPlugins());
|
||||
|
||||
foreach ($plugins_list as $plugin_name) {
|
||||
$locale_file = MIBEW_FS_ROOT .
|
||||
"/plugins/{$plugin_name}/locales/{$locale}/properties";
|
||||
// Build plugin path
|
||||
list($vendor_name, $plugin_short_name) = explode(':', $plugin_name, 2);
|
||||
$plugin_name_parts = explode('_', $plugin_short_name);
|
||||
$locale_file = MIBEW_FS_ROOT
|
||||
. "/plugins/" . ucfirst($vendor_name) . "/Mibew/Plugin/"
|
||||
. implode('', array_map('ucfirst', $plugin_name_parts))
|
||||
. "/locales/{$locale}/properties";
|
||||
|
||||
// Get localized strings
|
||||
if (is_readable($locale_file)) {
|
||||
$locale_data = read_locale_file($locale_file);
|
||||
// array_merge used to provide an ability for plugins to override
|
||||
|
@ -70,7 +70,7 @@ function generate_button(
|
||||
// Get popup window configurations
|
||||
if ($style) {
|
||||
$chat_style = new ChatStyle($style);
|
||||
$chat_configurations = $chat_style->configurations();
|
||||
$chat_configurations = $chat_style->getConfigurations();
|
||||
$popup_options = $chat_configurations['chat']['window_params'];
|
||||
} else {
|
||||
$popup_options = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1";
|
||||
@ -96,13 +96,13 @@ function generate_button(
|
||||
|
||||
// Get actual invitation style instance
|
||||
if (!$invitation_style_name) {
|
||||
$invitation_style_name = InvitationStyle::currentStyle();
|
||||
$invitation_style_name = InvitationStyle::getCurrentStyle();
|
||||
}
|
||||
$invitation_style = new InvitationStyle($invitation_style_name);
|
||||
|
||||
// URL of file with additional CSS rules for invitation popup
|
||||
$widget_data['inviteStyle'] = $app_location . '/' .
|
||||
$invitation_style->filesPath() .
|
||||
$invitation_style->getFilesPath() .
|
||||
'/invite.css';
|
||||
|
||||
// Time between requests to the server in milliseconds
|
||||
|
@ -20,9 +20,6 @@
|
||||
*/
|
||||
define('MIBEW_FS_ROOT', dirname(dirname(__FILE__)));
|
||||
|
||||
// Prevent Mibew from access to files outside the installation
|
||||
@ini_set('open_basedir', MIBEW_FS_ROOT);
|
||||
|
||||
// Include configuration file
|
||||
require_once(MIBEW_FS_ROOT . '/libs/config.php');
|
||||
|
||||
@ -30,7 +27,7 @@ require_once(MIBEW_FS_ROOT . '/libs/config.php');
|
||||
$mibewroot = join(
|
||||
"/",
|
||||
array_map(
|
||||
"urlencode",
|
||||
"rawurlencode",
|
||||
preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot)))
|
||||
)
|
||||
);
|
||||
|
@ -27,5 +27,5 @@ $page['no_right_menu'] = true;
|
||||
$page['fixedwrap'] = true;
|
||||
$page['show_small_login'] = false;
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('license', $page);
|
||||
|
@ -40,7 +40,7 @@ if (!$thread) {
|
||||
}
|
||||
|
||||
// Initialize chat style which is currently used in system
|
||||
$chat_style = new ChatStyle(ChatStyle::currentStyle());
|
||||
$chat_style = new ChatStyle(ChatStyle::getCurrentStyle());
|
||||
|
||||
$email = get_param('email');
|
||||
$page['email'] = $email;
|
||||
|
@ -50,9 +50,9 @@ $page = array(
|
||||
);
|
||||
|
||||
// Initialize chat style which is currently used in system
|
||||
$chat_style = new ChatStyle(ChatStyle::currentStyle());
|
||||
$chat_style = new ChatStyle(ChatStyle::getCurrentStyle());
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
|
||||
if (!isset($_GET['token'])) {
|
||||
|
||||
|
@ -104,5 +104,5 @@ $page['menuid'] = ($operator['operatorid'] == $op_id) ? "profile" : "operators";
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
$page['tabs'] = setup_operator_settings_tabs($op_id, 1);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('avatar', $page);
|
||||
|
@ -134,5 +134,5 @@ $page['title'] = getlocal("page_ban.title");
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator, false));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('ban', $page);
|
||||
|
@ -71,5 +71,5 @@ $page['pagination.items'] = $pagination['items'];
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('blocked_visitors', $page);
|
||||
|
@ -112,5 +112,5 @@ $page['menuid'] = "canned";
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('canned', $page);
|
||||
|
@ -33,7 +33,7 @@ $page = array(
|
||||
'errors' => array(),
|
||||
);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
|
||||
if ($string_id) {
|
||||
$canned_message = load_canned_message($string_id);
|
||||
|
@ -85,5 +85,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_settings_tabs(1);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('features', $page);
|
||||
|
@ -43,14 +43,14 @@ if (!isset($image_locales_map[$image])) {
|
||||
}
|
||||
$image_locales = $image_locales_map[$image];
|
||||
|
||||
$style_list = ChatStyle::availableStyles();
|
||||
$style_list = ChatStyle::getAvailableStyles();
|
||||
$style_list[""] = getlocal("page.preview.style_default");
|
||||
$style = verify_param("style", "/^\w*$/", "");
|
||||
if ($style && !in_array($style, $style_list)) {
|
||||
$style = "";
|
||||
}
|
||||
|
||||
$invitation_style_list = InvitationStyle::availableStyles();
|
||||
$invitation_style_list = InvitationStyle::getAvailableStyles();
|
||||
$invitation_style_list[""] = getlocal("page.preview.style_default");
|
||||
$invitation_style = verify_param("invitationstyle", "/^\w*$/", "");
|
||||
if ($invitation_style && !in_array($invitation_style, $invitation_style_list)) {
|
||||
@ -120,5 +120,5 @@ $page['menuid'] = "getcode";
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('get_code', $page);
|
||||
|
@ -156,5 +156,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_group_settings_tabs($group_id, 0);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('group', $page);
|
||||
|
@ -76,5 +76,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_group_settings_tabs($group_id, 1);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('group_members', $page);
|
||||
|
@ -87,5 +87,5 @@ $page['menuid'] = "groups";
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('groups', $page);
|
||||
|
@ -157,5 +157,5 @@ $page['canSearchInSystemMessages'] = ($search_type != 'all')
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('history', $page);
|
||||
|
@ -45,5 +45,5 @@ $page = array(
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('index', $page);
|
||||
|
@ -28,7 +28,7 @@ require_once(MIBEW_FS_ROOT . '/libs/settings.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$style_list = InvitationStyle::availableStyles();
|
||||
$style_list = InvitationStyle::getAvailableStyles();
|
||||
|
||||
$preview = verify_param("preview", "/^\w+$/", "default");
|
||||
if (!in_array($preview, $style_list)) {
|
||||
@ -48,5 +48,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_settings_tabs(5);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('invitation_themes', $page);
|
||||
|
@ -68,5 +68,5 @@ $page['headertitle'] = getlocal("app.title");
|
||||
$page['show_small_login'] = false;
|
||||
$page['fixedwrap'] = true;
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('login', $page);
|
||||
|
@ -173,5 +173,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_operator_settings_tabs($op_id, 0);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('operator', $page);
|
||||
|
@ -139,5 +139,5 @@ setlocale(LC_TIME, getstring("time.locale"));
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('operators', $page);
|
||||
|
@ -93,5 +93,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_operator_settings_tabs($op_id, 2);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('operator_groups', $page);
|
||||
|
@ -25,7 +25,7 @@ require_once(MIBEW_FS_ROOT . '/libs/settings.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$style_list = PageStyle::availableStyles();
|
||||
$style_list = PageStyle::getAvailableStyles();
|
||||
|
||||
$preview = verify_param("preview", "/^\w+$/", "default");
|
||||
if (!in_array($preview, $style_list)) {
|
||||
@ -34,13 +34,13 @@ if (!in_array($preview, $style_list)) {
|
||||
}
|
||||
|
||||
$preview_style = new PageStyle($preview);
|
||||
$style_config = $preview_style->configurations();
|
||||
$style_config = $preview_style->getConfigurations();
|
||||
|
||||
$screenshots = array();
|
||||
foreach ($style_config['screenshots'] as $name => $desc) {
|
||||
$screenshots[] = array(
|
||||
'name' => $name,
|
||||
'file' => (MIBEW_WEB_ROOT . '/' . $preview_style->filesPath()
|
||||
'file' => (MIBEW_WEB_ROOT . '/' . $preview_style->getFilesPath()
|
||||
. '/screenshots/' . $name . '.png'),
|
||||
'description' => $desc,
|
||||
);
|
||||
@ -56,5 +56,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_settings_tabs(3);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('page_themes', $page);
|
||||
|
@ -139,5 +139,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_settings_tabs(2);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('performance', $page);
|
||||
|
@ -89,5 +89,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_operator_settings_tabs($op_id, 3);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('permissions', $page);
|
||||
|
@ -42,7 +42,7 @@ $page = array(
|
||||
);
|
||||
|
||||
// Initialize chat style which is currently used in system
|
||||
$chat_style = new ChatStyle(ChatStyle::currentStyle());
|
||||
$chat_style = new ChatStyle(ChatStyle::getCurrentStyle());
|
||||
|
||||
if (isset($_GET['nextGroup'])) {
|
||||
$next_id = verify_param("nextGroup", "/^\d{1,8}$/");
|
||||
|
@ -34,7 +34,7 @@ $page = array(
|
||||
'errors' => array(),
|
||||
);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
|
||||
$op_id = verify_param("id", "/^\d{1,9}$/");
|
||||
$token = verify_param("token", "/^[\dabcdef]+$/");
|
||||
|
@ -36,7 +36,7 @@ $page = array(
|
||||
|
||||
$login_or_email = "";
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
|
||||
if (isset($_POST['loginoremail'])) {
|
||||
$login_or_email = get_param("loginoremail");
|
||||
|
@ -57,16 +57,16 @@ foreach ($options as $opt) {
|
||||
|
||||
// Load styles configs
|
||||
$styles_params = array(
|
||||
'chat_style' => ChatStyle::defaultStyle(),
|
||||
'page_style' => PageStyle::defaultStyle(),
|
||||
'chat_style' => ChatStyle::getDefaultStyle(),
|
||||
'page_style' => PageStyle::getDefaultStyle(),
|
||||
);
|
||||
|
||||
$chat_style_list = ChatStyle::availableStyles();
|
||||
$page_style_list = PageStyle::availableStyles();
|
||||
$chat_style_list = ChatStyle::getAvailableStyles();
|
||||
$page_style_list = PageStyle::getAvailableStyles();
|
||||
|
||||
if (Settings::get('enabletracking')) {
|
||||
$styles_params['invitation_style'] = InvitationStyle::defaultStyle();
|
||||
$invitation_style_list = InvitationStyle::availableStyles();
|
||||
$styles_params['invitation_style'] = InvitationStyle::getDefaultStyle();
|
||||
$invitation_style_list = InvitationStyle::getAvailableStyles();
|
||||
}
|
||||
|
||||
if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {
|
||||
@ -175,5 +175,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_settings_tabs(0);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('settings', $page);
|
||||
|
@ -201,5 +201,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_statistics_tabs($active_tab);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('statistics', $page);
|
||||
|
@ -30,7 +30,7 @@ require_once(MIBEW_FS_ROOT . '/libs/track.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$style_list = ChatStyle::availableStyles();
|
||||
$style_list = ChatStyle::getAvailableStyles();
|
||||
|
||||
$preview = verify_param("preview", "/^\w+$/", "default");
|
||||
if (!in_array($preview, $style_list)) {
|
||||
@ -40,13 +40,13 @@ if (!in_array($preview, $style_list)) {
|
||||
|
||||
$chat_style = new ChatStyle($preview);
|
||||
|
||||
$style_config = $chat_style->configurations();
|
||||
$style_config = $chat_style->getConfigurations();
|
||||
|
||||
$screenshots = array();
|
||||
foreach ($style_config['screenshots'] as $name => $desc) {
|
||||
$screenshots[] = array(
|
||||
'name' => $name,
|
||||
'file' => (MIBEW_WEB_ROOT . '/' . $chat_style->filesPath()
|
||||
'file' => (MIBEW_WEB_ROOT . '/' . $chat_style->getFilesPath()
|
||||
. '/screenshots/' . $name . '.png'),
|
||||
'description' => $desc
|
||||
);
|
||||
@ -62,5 +62,5 @@ $page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page['tabs'] = setup_settings_tabs(4);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('themes', $page);
|
||||
|
@ -60,5 +60,5 @@ $page['title'] = getlocal("thread.chat_log");
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator, false));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('thread_log', $page);
|
||||
|
@ -65,5 +65,5 @@ foreach ($path as $k => $v) {
|
||||
$page['title'] = getlocal("tracked.path");
|
||||
$page['show_small_login'] = false;
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('tracked', $page);
|
||||
|
@ -48,7 +48,7 @@ $page = array(
|
||||
'errors' => array(),
|
||||
);
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
|
||||
if ($string_id) {
|
||||
$translation = isset($lang2[$string_id]) ? $lang2[$string_id] : "";
|
||||
|
@ -48,5 +48,5 @@ foreach ($default_extensions as $ext) {
|
||||
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('updates', $page);
|
||||
|
@ -85,5 +85,5 @@ foreach ($page['pagination.items'] as $key => $item) {
|
||||
$page['title'] = getlocal("page.analysis.userhistory.title");
|
||||
$page['menuid'] = "history";
|
||||
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('user_history', $page);
|
||||
|
@ -46,14 +46,14 @@ $page['geoLink'] = Settings::get('geolink');
|
||||
$page['geoWindowParams'] = Settings::get('geolinkparams');
|
||||
|
||||
// Load dialogs style options
|
||||
$chat_style = new ChatStyle(ChatStyle::currentStyle());
|
||||
$style_config = $chat_style->configurations();
|
||||
$chat_style = new ChatStyle(ChatStyle::getCurrentStyle());
|
||||
$style_config = $chat_style->getConfigurations();
|
||||
$page['chatStyles.chatWindowParams'] = $style_config['chat']['window_params'];
|
||||
$page['coreStyles.inviteWindowParams'] = $style_config['chat']['window_params'];
|
||||
|
||||
// Load page style options
|
||||
$page_style = new PageStyle(PageStyle::currentStyle());
|
||||
$style_config = $page_style->configurations();
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$style_config = $page_style->getConfigurations();
|
||||
$page['coreStyles.threadTag'] = $style_config['users']['thread_tag'];
|
||||
$page['coreStyles.visitorTag'] = $style_config['users']['visitor_tag'];
|
||||
$page['coreStyles.trackedUserWindowParams'] = $style_config['tracked']['user_window_params'];
|
||||
|
@ -4,55 +4,58 @@
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
(function(){var r=Handlebars.template,q=Handlebars.templates=Handlebars.templates||{};q._logo=r(function(d,b,e,a,c){function f(a){var e;return a=""+("\n <a onclick=\"window.open('"+g((e=(e=a.page,null==e||!1===e?e:e.mibewHost),typeof e===h?e.apply(a):e))+'\');return false;" href="'+g((e=(e=a.page,null==e||!1===e?e:e.mibewHost),typeof e===h?e.apply(a):e))+'">\n <img src="'+g((e=(e=(e=a.page,null==e||!1===e?e:e.company),null==e||!1===e?e:e.chatLogoURL),typeof e===h?
|
||||
e.apply(a):e))+'" alt=""/>\n </a>\n ')}function n(e){var a;return e=""+('\n <img src="'+g((a=(a=(a=e.page,null==a||!1===a?a:a.company),null==a||!1===a?a:a.chatLogoURL),typeof a===h?a.apply(e):a))+'" alt=""/>\n ')}function j(a){var e;return a=""+("\n <a onclick=\"window.open('"+g((e=(e=a.page,null==e||!1===e?e:e.mibewHost),typeof e===h?e.apply(a):e))+'\');return false;" href="'+g((e=(e=a.page,null==e||!1===e?e:e.mibewHost),typeof e===
|
||||
h?e.apply(a):e))+'">\n <img src="'+g((e=(e=a.page,null==e||!1===e?e:e.tplRoot),typeof e===h?e.apply(a):e))+'/images/default-logo.gif" alt=""/>\n </a>\n ')}function t(e){var a;return e=""+('\n <img src="'+g((a=(a=e.page,null==a||!1===a?a:a.tplRoot),typeof a===h?a.apply(e):a))+'/images/default-logo.gif" alt=""/>\n ')}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var l,h="function",g=this.escapeExpression,k=this;
|
||||
d='\n<div id="top2">\n <div id="logo">\n ';if((c=e["if"].call(b,(l=(l=b.page,null==l||!1===l?l:l.company),null==l||!1===l?l:l.chatLogoURL),{hash:{},inverse:k.program(6,function(a,d){var b,c,f;b="\n ";if((f=e["if"].call(a,(c=a.page,null==c||!1===c?c:c.mibewHost),{hash:{},inverse:k.program(9,t,d),fn:k.program(7,j,d),data:d}))||0===f)b+=f;return b+"\n "},c),fn:k.program(1,function(a,d){var b,c,g;b="\n ";if((g=e["if"].call(a,(c=a.page,null==c||!1===c?c:c.mibewHost),
|
||||
{hash:{},inverse:k.program(4,n,d),fn:k.program(2,f,d),data:d}))||0===g)b+=g;return b+"\n "},c),data:c}))||0===c)d+=c;return d+='\n \n <div id="page-title">'+g((l=(l=b.page,null==l||!1===l?l:l.title),typeof l===h?l.apply(b):l))+'</div>\n <div class="clear"> </div>\n </div>\n</div>'});q.chat_avatar=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f=this.escapeExpression;return(d=e["if"].call(b,b.imageLink,{hash:{},
|
||||
inverse:this.program(3,function(){return'<div class="default-avatar"></div>'},c),fn:this.program(1,function(a,d){var b,c;b='<img src="';(c=e.imageLink)?c=c.call(a,{hash:{},data:d}):(c=a.imageLink,c="function"===typeof c?c.apply(a):c);return b+=f(c)+'" border="0" alt="" />'},c),data:c}))||0===d?d:""});q.chat_controls_close=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f;d=e.helperMissing;a=this.escapeExpression;c={hash:{},data:c};return b='<div class="tpl-image" title="'+
|
||||
(a((f=e.l10n||b.l10n,f?f.call(b,"chat.window.close_title",c):d.call(b,"l10n","chat.window.close_title",c)))+'"></div>')});q.chat_controls_history=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f;d=e.helperMissing;a=this.escapeExpression;c={hash:{},data:c};return b='<div class="tpl-image" title="'+(a((f=e.l10n||b.l10n,f?f.call(b,"page.analysis.userhistory.title",c):d.call(b,"l10n","page.analysis.userhistory.title",c)))+'"></div>')});q.chat_controls_redirect=
|
||||
r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f,n=e.helperMissing,j=this.escapeExpression;return(d=e["if"].call(b,(f=b.user,null==f||!1===f?f:f.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,d){var b,c;b={hash:{},data:d};return b='\n<div class="tpl-image" title="'+(j((c=e.l10n||a.l10n,c?c.call(a,"chat.window.toolbar.redirect_user",b):n.call(a,"l10n","chat.window.toolbar.redirect_user",b)))+'"></div>\n')},c),data:c}))||0===d?d:""});q.chat_controls_refresh=
|
||||
r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f;d=e.helperMissing;a=this.escapeExpression;c={hash:{},data:c};return b='<div class="tpl-image" title="'+(a((f=e.l10n||b.l10n,f?f.call(b,"chat.window.toolbar.refresh",c):d.call(b,"l10n","chat.window.toolbar.refresh",c)))+'"></div>')});q.chat_controls_secure_mode=r(function(d,b,e){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,d.helpers);return'<div class="tpl-image" title="SSL"></div>'});q.chat_controls_send_mail=
|
||||
r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f;d=e.helperMissing;a=this.escapeExpression;c={hash:{},data:c};return b='<div class="tpl-image" title="'+(a((f=e.l10n||b.l10n,f?f.call(b,"chat.window.toolbar.mail_history",c):d.call(b,"l10n","chat.window.toolbar.mail_history",c)))+'"></div>')});q.chat_controls_sound=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f=e.helperMissing,n=this.escapeExpression;return(d=
|
||||
e["if"].call(b,b.enabled,{hash:{},inverse:this.program(3,function(a,d){var b,c;b={hash:{},data:d};return b='\n <div class="tpl-image sound-control-off" title="'+(n((c=e.l10n||a.l10n,c?c.call(a,"chat.window.toolbar.turn_on_sound",b):f.call(a,"l10n","chat.window.toolbar.turn_on_sound",b)))+'"></div>\n')},c),fn:this.program(1,function(a,d){var b,c;b={hash:{},data:d};return b='\n <div class="tpl-image sound-control-on" title="'+(n((c=e.l10n||a.l10n,c?c.call(a,"chat.window.toolbar.turn_off_sound",
|
||||
b):f.call(a,"l10n","chat.window.toolbar.turn_off_sound",b)))+'"></div>\n')},c),data:c}))||0===d?d:""});q.chat_controls_user_name=r(function(d,b,e,a,c){function f(a,b){var d,c,f;d=""+('\n <div class="user-name-control-input-bg"><input id="user-name-control-input" type="text" size="12" value="'+l((c=(c=a.user,null==c||!1===c?c:c.name),typeof c===t?c.apply(a):c))+'" class="username" /></div>\n <a href="javascript:void(0)" class="user-name-control-set tpl-image" title="');f={hash:{},data:b};
|
||||
return d+=l((c=e.l10n||a.l10n,c?c.call(a,"chat.client.changename",f):h.call(a,"l10n","chat.client.changename",f)))+'"></a>\n '}function n(a,b){var d,c,f;f={hash:{},data:b};d='\n <a href="javascript:void(0)" title="'+(l((c=e.l10n||a.l10n,c?c.call(a,"chat.client.changename",f):h.call(a,"l10n","chat.client.changename",f)))+'">'+l((c=(c=a.user,null==c||!1===c?c:c.name),typeof c===t?c.apply(a):c))+'</a>\n <a class="user-name-control-change tpl-image" title="');f={hash:{},data:b};return d+=
|
||||
l((c=e.l10n||a.l10n,c?c.call(a,"chat.client.changename",f):h.call(a,"l10n","chat.client.changename",f)))+'"></a>\n '}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var j,t="function",l=this.escapeExpression,h=e.helperMissing,g=this;return(d=e["if"].call(b,(j=b.user,null==j||!1===j?j:j.canChangeName),{hash:{},inverse:g.program(6,function(a,c){var d,b;d={hash:{},data:c};return d="\n"+(l((b=e.l10n||a.l10n,b?b.call(a,"chat.client.name",d):h.call(a,"l10n","chat.client.name",d)))+
|
||||
" "+l((b=(b=a.user,null==b||!1===b?b:b.name),typeof b===t?b.apply(a):b))+"\n")},c),fn:g.program(1,function(a,b){var c,d;c={hash:{},data:b};c='\n <span class="user-name-control-prefix">'+(l((d=e.l10n||a.l10n,d?d.call(a,"chat.client.name",c):h.call(a,"l10n","chat.client.name",c)))+"</span>\n ");if((d=e["if"].call(a,a.nameInput,{hash:{},inverse:g.program(4,n,b),fn:g.program(2,f,b),data:b}))||0===d)c+=d;return c+="\n"},c),data:c}))||0===d?d:""});q.chat_layout=r(function(d,b,e,a,c){this.compilerInfo=
|
||||
[4,">= 1.0.0"];e=this.merge(e,d.helpers);a=this.merge(a,d.partials);c=c||{};var f,n=e.helperMissing,j=this.escapeExpression;d="\n";if((a=this.invokePartial(a._logo,"_logo",b,e,a,c))||0===a)d+=a;d+='\n\n\n<div id="chat-header">\n <div class="bgc"><div class="bgl"><div class="bgr">\n \n <div id="controls-region"></div>\n </div></div></div>\n</div>\n\n\n<div id="chat">\n <div class="bgl"><div class="bgr"><div class="sdwbgc"><div class="sdwbgl"><div class="sdwbgr">\n ';if((f=
|
||||
e.unless.call(b,(a=b.user,null==a||!1===a?a:a.isAgent),{hash:{},inverse:this.noop,fn:this.program(1,function(){return'\n <div id="avatar-region"></div>\n '},c),data:c}))||0===f)d+=f;c={hash:{},data:c};return d=d+'\n \n <div id="messages-region"></div>\n \n <div id="status-region"></div>\n </div></div></div></div></div>\n</div>\n\n\n<div id="message-form-region"></div>\n\n\n<div id="footer">'+(j((a=e.l10n||b.l10n,a?a.call(b,"chat.window.poweredby",c):n.call(b,
|
||||
"l10n","chat.window.poweredby",c)))+' <a id="poweredByLink" href="http://mibew.org" title="Mibew Community" target="_blank">mibew.org</a></div>')});q.chat_message=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f,n=this.escapeExpression,j=e.helperMissing;d={hash:{},data:c};d="<span>"+(n((f=e.formatTime||b.formatTime,f?f.call(b,b.created,d):j.call(b,"formatTime",b.created,d)))+"</span> \n");if((f=e["if"].call(b,b.name,{hash:{},inverse:this.noop,fn:this.program(1,
|
||||
function(a,b){var c,d;c="<span class='n";(d=e.kindName)?d=d.call(a,{hash:{},data:b}):(d=a.kindName,d="function"===typeof d?d.apply(a):d);c+=n(d)+"'>";(d=e.name)?d=d.call(a,{hash:{},data:b}):(d=a.name,d="function"===typeof d?d.apply(a):d);return c+=n(d)+"</span>: "},c),data:c}))||0===f)d+=f;d+="\n<span class='m";(f=e.kindName)?f=f.call(b,{hash:{},data:c}):(f=b.kindName,f="function"===typeof f?f.apply(b):f);d+=n(f)+"'>";if((f=e["if"].call(b,b.allowFormatting,{hash:{},inverse:this.program(5,function(a,
|
||||
d){var b,c;c={hash:{},data:d};return n((b=e.apply||a.apply,b?b.call(a,a.message,"urlReplace, nl2br",c):j.call(a,"apply",a.message,"urlReplace, nl2br",c)))},c),fn:this.program(3,function(a,d){var b,c;c={hash:{},data:d};return n((b=e.apply||a.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",c):j.call(a,"apply",a.message,"urlReplace, nl2br, allowTags",c)))},c),data:c}))||0===f)d+=f;return d+="</span><br/>"});q.chat_message_form=r(function(d,b,e,a,c){function f(a,d){var b,c;b={hash:{},data:d};
|
||||
b='\n <select id="predefined" size="1" class="answer">\n <option>'+(l((c=e.l10n||a.l10n,c?c.call(a,"chat.window.predefined.select_answer",b):h.call(a,"l10n","chat.window.predefined.select_answer",b)))+"</option>\n ");if((c=e.each.call(a,a.predefinedAnswers,{hash:{},inverse:g.noop,fn:g.program(5,n,d),data:d}))||0===c)b+=c;return b+="\n </select>\n "}function n(a){var e;return a=""+("\n <option>"+l((e=a["short"],
|
||||
typeof e===r?e.apply(a):e))+"</option>\n ")}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var j,r="function",l=this.escapeExpression,h=e.helperMissing,g=this;d='<div id="message">\n';if((a=e["if"].call(b,(j=b.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:g.noop,fn:g.program(1,function(){return'\n <div class="bgc"><div class="bgl"><div class="bgr">\n <textarea id="message-input" class="message" tabindex="0" rows="4" cols="10"></textarea>\n </div></div></div>\n'},
|
||||
c),data:c}))||0===a)d+=a;d+='\n</div>\n\n<div id="send">\n';if((a=e["if"].call(b,(j=b.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:g.noop,fn:g.program(3,function(a,d){var b,c,s;b='\n <div id="postmessage">\n <div id="predefined-wrapper">\n ';if((s=e["if"].call(a,(c=a.user,null==c||!1===c?c:c.isAgent),{hash:{},inverse:g.noop,fn:g.program(4,f,d),data:d}))||0===s)b+=s;s={hash:{},data:d};b=b+'\n </div>\n <a href="javascript:void(0)" id="send-message" title="'+
|
||||
(l((c=e.l10n||a.l10n,c?c.call(a,"chat.window.send_message",s):h.call(a,"l10n","chat.window.send_message",s)))+'">');s={hash:{},data:d};return b+=l((c=e.l10n||a.l10n,c?c.call(a,"chat.window.send_message_short_and_shortcut",s):h.call(a,"l10n","chat.window.send_message_short_and_shortcut",s)))+"</a>\n </div>\n"},c),data:c}))||0===a)d+=a;return d+'\n</div>\n<div class="clear"></div>'});q.chat_status_base=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};d=this.escapeExpression;
|
||||
(e=e.title)?e=e.call(b,{hash:{},data:c}):(e=b.title,e="function"===typeof e?e.apply(b):e);return d(e)});q.chat_status_message=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};d=this.escapeExpression;(e=e.message)?e=e.call(b,{hash:{},data:c}):(e=b.message,e="function"===typeof e?e.apply(b):e);return d(e)});q.chat_status_typing=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f;d=e.helperMissing;a=this.escapeExpression;
|
||||
c={hash:{},data:c};return a((f=e.l10n||b.l10n,f?f.call(b,"typing.remote",c):d.call(b,"l10n","typing.remote",c)))});q.invitation_layout=r(function(d,b,e){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,d.helpers);return'<div id="invitation-messages-region"></div>'});q.leave_message_description=r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f,n=e.helperMissing,j=this.escapeExpression;a={hash:{},data:c};d='<div class="buttons">\n <a href="javascript:window.close();" title="'+
|
||||
(j((f=e.l10n||b.l10n,f?f.call(b,"leavemessage.close",a):n.call(b,"l10n","leavemessage.close",a)))+'">\n <img class="tpl-image iclosewin" src="'+j((f=(f=b.page,null==f||!1===f?f:f.tplRoot),"function"===typeof f?f.apply(b):f))+'/images/free.gif" alt="');a={hash:{},data:c};d+=j((f=e.l10n||b.l10n,f?f.call(b,"leavemessage.close",a):n.call(b,"l10n","leavemessage.close",a)))+'" />\n </a>\n</div>\n<div class="messagetxt">';a={hash:{},data:c};return d+=j((f=e.l10n||b.l10n,f?f.call(b,"leavemessage.descr",
|
||||
a):n.call(b,"l10n","leavemessage.descr",a)))+"</div>"});q.leave_message_form=r(function(d,b,e,a,c){function f(a,c){var b,d;b='<input type="hidden" name="group" value="';(d=e.groupId)?d=d.call(a,{hash:{},data:c}):(d=a.groupId,d=typeof d===g?d.apply(a):d);return b+=k(d)+'"/>'}function n(a,d){var b,c,f;b=""+('\n <option value="'+k((c=a.id,typeof c===g?c.apply(a):c))+'" ');if((f=e["if"].call(a,a.selected,{hash:{},inverse:m.noop,fn:m.program(6,j,d),data:d}))||0===f)b+=f;return b+=
|
||||
">"+k((c=a.name,typeof c===g?c.apply(a):c))+"</option>\n "}function j(){return'selected="selected"'}function r(a,c){var d;return(d=e["if"].call(a,a.selected,{hash:{},inverse:m.noop,fn:m.program(9,l,c),data:c}))||0===d?d:""}function l(a){var c;return k((c=a.description,typeof c===g?c.apply(a):c))}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var h,g="function",k=this.escapeExpression,m=this,p=e.helperMissing;d=""+('<form name="leaveMessageForm" method="post" action="">\n <input type="hidden" name="style" value="'+
|
||||
k((h=(h=b.page,null==h||!1===h?h:h.style),typeof h===g?h.apply(b):h))+'"/>\n <input type="hidden" name="info" value="');(a=e.info)?a=a.call(b,{hash:{},data:c}):(a=b.info,a=typeof a===g?a.apply(b):a);d+=k(a)+'"/>\n <input type="hidden" name="referrer" value="';(a=e.referrer)?a=a.call(b,{hash:{},data:c}):(a=b.referrer,a=typeof a===g?a.apply(b):a);d+=k(a)+'"/>\n ';if((a=e.unless.call(b,b.groups,{hash:{},inverse:m.noop,fn:m.program(1,function(a,c){var d;return(d=e["if"].call(a,a.groupId,{hash:{},
|
||||
inverse:m.noop,fn:m.program(2,f,c),data:c}))||0===d?d:""},c),data:c}))||0===a)d+=a;a={hash:{},data:c};d=d+'\n\n <div class="errors"></div>\n\n <table cellspacing="1" cellpadding="5" border="0" class="form">\n <tr>\n <td><strong>'+(k((h=e.l10n||b.l10n,h?h.call(b,"form.field.email",a):p.call(b,"l10n","form.field.email",a)))+':</strong></td>\n <td><input type="text" name="email" size="50" value="');(a=e.email)?a=a.call(b,{hash:{},data:c}):(a=b.email,a=typeof a===g?
|
||||
a.apply(b):a);d+=k(a)+'" class="username"/></td>\n </tr>\n <tr>\n <td><strong>';a={hash:{},data:c};d+=k((h=e.l10n||b.l10n,h?h.call(b,"form.field.name",a):p.call(b,"l10n","form.field.name",a)))+':</strong></td>\n <td><input type="text" name="name" size="50" value="';(a=e.name)?a=a.call(b,{hash:{},data:c}):(a=b.name,a=typeof a===g?a.apply(b):a);d+=k(a)+'" class="username"/></td>\n </tr>\n ';if((a=e["if"].call(b,b.groups,{hash:{},inverse:m.noop,fn:m.program(4,
|
||||
function(a,c){var d,b,f;f={hash:{},data:c};d='\n <tr>\n <td class="text"><strong>'+(k((b=e.l10n||a.l10n,b?b.call(a,"form.field.department",f):p.call(a,"l10n","form.field.department",f)))+'</strong></td>\n <td>\n <select name="group" style="min-width:200px;">\n ');if((f=e.each.call(a,a.groups,{hash:{},inverse:m.noop,fn:m.program(5,n,c),data:c}))||0===f)d+=f;d+='\n </select>\n </td>\n </tr>\n <tr>\n <td class="text"><strong>';
|
||||
f={hash:{},data:c};d+=k((b=e.l10n||a.l10n,b?b.call(a,"form.field.department.description",f):p.call(a,"l10n","form.field.department.description",f)))+'</strong></td>\n <td class="text" id="groupDescription">\n ';if((f=e.each.call(a,a.groups,{hash:{},inverse:m.noop,fn:m.program(8,r,c),data:c}))||0===f)d+=f;return d+="\n </td>\n </tr>\n "},c),data:c}))||0===a)d+=a;d+="\n <tr>\n <td><strong>";a={hash:{},data:c};d+=k((h=e.l10n||b.l10n,h?
|
||||
h.call(b,"form.field.message",a):p.call(b,"l10n","form.field.message",a)))+':</strong></td>\n <td valign="top">\n <textarea name="message" tabindex="0" cols="40" rows="5">';(a=e.message)?a=a.call(b,{hash:{},data:c}):(a=b.message,a=typeof a===g?a.apply(b):a);d+=k(a)+"</textarea>\n </td>\n </tr>\n ";if((a=e["if"].call(b,b.showCaptcha,{hash:{},inverse:m.noop,fn:m.program(11,function(){return'\n <tr>\n <td><img id="captcha-img" src="captcha.php"/></td>\n <td><input type="text" name="captcha" size="50" maxlength="15" value="" class="username"/></td>\n </tr>\n '},
|
||||
c),data:c}))||0===a)d+=a;d+='\n </table>\n <a href="javascript:void(0);" class="but" id="send-message">';a={hash:{},data:c};return d+=k((h=e.l10n||b.l10n,h?h.call(b,"mailthread.perform",a):p.call(b,"l10n","mailthread.perform",a)))+'</a>\n <div class="clear"> </div>\n</form>\n<div id="ajax-loader"><img src="'+k((h=(h=b.page,null==h||!1===h?h:h.tplRoot),typeof h===g?h.apply(b):h))+'/images/ajax-loader.gif" alt="Loading..." /></div>'});q.leave_message_layout=r(function(d,b,e,a,c){this.compilerInfo=
|
||||
[4,">= 1.0.0"];e=this.merge(e,d.helpers);a=this.merge(a,d.partials);c=c||{};d="\n";if((b=this.invokePartial(a._logo,"_logo",b,e,a,c))||0===b)d+=b;return d+'\n\n\n<div id="headers">\n <div class="wndb"><div class="wndl"><div class="wndr"><div class="wndt"><div class="wndtl"><div class="wndtr"><div class="wndbl"><div class="wndbr" id="description-region">\n </div></div></div></div></div></div></div></div>\n</div>\n\n\n<div id="content-wrapper"></div>'});q.leave_message_sent_description=r(function(d,
|
||||
b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var f,n=e.helperMissing,j=this.escapeExpression;a={hash:{},data:c};d='<div class="buttons">\n <a href="javascript:window.close();" title="'+(j((f=e.l10n||b.l10n,f?f.call(b,"chat.mailthread.sent.close",a):n.call(b,"l10n","chat.mailthread.sent.close",a)))+'">\n <img class="tpl-image iclosewin" src="'+j((f=(f=b.page,null==f||!1===f?f:f.tplRoot),"function"===typeof f?f.apply(b):f))+'/images/free.gif" alt="');
|
||||
a={hash:{},data:c};d+=j((f=e.l10n||b.l10n,f?f.call(b,"chat.mailthread.sent.close",a):n.call(b,"l10n","chat.mailthread.sent.close",a)))+'" />\n </a>\n</div>\n<div class="messagetxt">';a={hash:{},data:c};return d+=j((f=e.l10n||b.l10n,f?f.call(b,"leavemessage.sent.message",a):n.call(b,"l10n","leavemessage.sent.message",a)))+"</div>"});q.survey_form=r(function(d,b,e,a,c){function f(a,d){var c,b;c='<input type="hidden" name="group" value="';(b=e.groupId)?b=b.call(a,{hash:{},data:d}):(b=a.groupId,
|
||||
b=typeof b===k?b.apply(a):b);return c+=m(b)+'"/>'}function n(a,c){var d,b,f;d=""+('\n <option value="'+m((b=a.id,typeof b===k?b.apply(a):b))+'" ');if((f=e["if"].call(a,a.selected,{hash:{},inverse:p.noop,fn:p.program(10,j,c),data:c}))||0===f)d+=f;d+=">"+m((b=a.name,typeof b===k?b.apply(a):b));if((f=e.unless.call(a,a.online,{hash:{},inverse:p.noop,fn:p.program(12,r,c),data:c}))||0===f)d+=f;return d+"</option>\n "}function j(){return'selected="selected"'}function r(){return" (offline)"}
|
||||
function l(a,d){var c;return(c=e["if"].call(a,a.selected,{hash:{},inverse:p.noop,fn:p.program(15,h,d),data:d}))||0===c?c:""}function h(a){var d;return m((d=a.description,typeof d===k?d.apply(a):d))}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);c=c||{};var g,k="function",m=this.escapeExpression,p=this,q=e.helperMissing;d=""+('<form name="surveyForm" method="post" action="">\n <input type="hidden" name="style" value="'+m((g=(g=b.page,null==g||!1===g?g:g.style),typeof g===k?g.apply(b):
|
||||
g))+'"/>\n <input type="hidden" name="info" value="');(a=e.info)?a=a.call(b,{hash:{},data:c}):(a=b.info,a=typeof a===k?a.apply(b):a);d+=m(a)+'"/>\n <input type="hidden" name="referrer" value="';(a=e.referrer)?a=a.call(b,{hash:{},data:c}):(a=b.referrer,a=typeof a===k?a.apply(b):a);d+=m(a)+'"/>\n <input type="hidden" name="survey" value="on"/>\n ';if((a=e.unless.call(b,b.showEmail,{hash:{},inverse:p.noop,fn:p.program(1,function(a,d){var c,b;c='<input type="hidden" name="email" value="';
|
||||
(b=e.email)?b=b.call(a,{hash:{},data:d}):(b=a.email,b=typeof b===k?b.apply(a):b);return c+=m(b)+'"/>'},c),data:c}))||0===a)d+=a;d+="\n ";if((a=e.unless.call(b,b.groups,{hash:{},inverse:p.noop,fn:p.program(3,function(a,d){var c;return(c=e["if"].call(a,a.groupId,{hash:{},inverse:p.noop,fn:p.program(4,f,d),data:d}))||0===c?c:""},c),data:c}))||0===a)d+=a;d+="\n ";if((a=e.unless.call(b,b.showMessage,{hash:{},inverse:p.noop,fn:p.program(6,function(a,d){var c,b;c='<input type="hidden" name="message" value="';
|
||||
(b=e.message)?b=b.call(a,{hash:{},data:d}):(b=a.message,b=typeof b===k?b.apply(a):b);return c+=m(b)+'"/>'},c),data:c}))||0===a)d+=a;d+='\n\n <div class="errors"></div>\n\n <table class="form">\n ';if((a=e["if"].call(b,b.groups,{hash:{},inverse:p.noop,fn:p.program(8,function(a,d){var b,c,f;f={hash:{},data:d};b="\n <tr>\n <td><strong>"+(m((c=e.l10n||a.l10n,c?c.call(a,"form.field.department",f):q.call(a,"l10n","form.field.department",f)))+'</strong></td>\n <td>\n <select name="group">\n ');
|
||||
if((f=e.each.call(a,a.groups,{hash:{},inverse:p.noop,fn:p.program(9,n,d),data:d}))||0===f)b+=f;b+="\n </select>\n </td>\n </tr>\n <tr>\n <td><strong>";f={hash:{},data:d};b+=m((c=e.l10n||a.l10n,c?c.call(a,"form.field.department.description",f):q.call(a,"l10n","form.field.department.description",f)))+'</strong></td>\n <td id="groupDescription">';if((f=e.each.call(a,a.groups,{hash:{},inverse:p.noop,fn:p.program(14,l,d),data:d}))||0===f)b+=
|
||||
f;return b+="</td>\n </tr>\n "},c),data:c}))||0===a)d+=a;a={hash:{},data:c};d=d+"\n <tr>\n <td><strong>"+(m((g=e.l10n||b.l10n,g?g.call(b,"presurvey.name",a):q.call(b,"l10n","presurvey.name",a)))+'</strong></td>\n <td><input type="text" name="name" size="50" value="');(a=e.name)?a=a.call(b,{hash:{},data:c}):(a=b.name,a=typeof a===k?a.apply(b):a);d+=m(a)+'" class="username" ';if((a=e.unless.call(b,b.canChangeName,{hash:{},inverse:p.noop,fn:p.program(17,function(){return'disabled="disabled"'},
|
||||
c),data:c}))||0===a)d+=a;d+="/></td>\n </tr>\n ";if((a=e["if"].call(b,b.showEmail,{hash:{},inverse:p.noop,fn:p.program(19,function(a,b){var d,c;d={hash:{},data:b};d="\n <tr>\n <td><strong>"+(m((c=e.l10n||a.l10n,c?c.call(a,"presurvey.mail",d):q.call(a,"l10n","presurvey.mail",d)))+'</strong></td>\n <td><input type="text" name="email" size="50" value="');(c=e.email)?c=c.call(a,{hash:{},data:b}):(c=a.email,c=typeof c===k?c.apply(a):c);return d+=m(c)+'" class="username"/></td>\n </tr>\n '},
|
||||
c),data:c}))||0===a)d+=a;d+="\n ";if((a=e["if"].call(b,b.showMessage,{hash:{},inverse:p.noop,fn:p.program(21,function(a,c){var d,b;d={hash:{},data:c};d="\n <tr>\n <td><strong>"+(m((b=e.l10n||a.l10n,b?b.call(a,"presurvey.question",d):q.call(a,"l10n","presurvey.question",d)))+'</strong></td>\n <td valign="top"><textarea name="message" tabindex="0" cols="45" rows="2">');(b=e.message)?b=b.call(a,{hash:{},data:c}):(b=a.message,b=typeof b===k?b.apply(a):b);return d+=m(b)+
|
||||
"</textarea></td>\n </tr>\n "},c),data:c}))||0===a)d+=a;d+='\n </table>\n <a href="javascript:void(0);" class="but" id="submit-survey">';a={hash:{},data:c};return d+=m((g=e.l10n||b.l10n,g?g.call(b,"presurvey.submit",a):q.call(b,"l10n","presurvey.submit",a)))+'</a>\n <div class="clear"> </div>\n</form>\n<div id="ajax-loader"><img src="'+m((g=(g=b.page,null==g||!1===g?g:g.tplRoot),typeof g===k?g.apply(b):g))+'/images/ajax-loader.gif" alt="Loading..." /></div>'});q.survey_layout=
|
||||
r(function(d,b,e,a,c){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,d.helpers);a=this.merge(a,d.partials);c=c||{};var f,n=e.helperMissing,j=this.escapeExpression;d="\n";if((a=this.invokePartial(a._logo,"_logo",b,e,a,c))||0===a)d+=a;f={hash:{},data:c};d=d+'\n\n\n<div id="headers">\n <div class="wndb"><div class="wndl"><div class="wndr"><div class="wndt"><div class="wndtl"><div class="wndtr"><div class="wndbl"><div class="wndbr">\n <div class="buttons">\n <a href="javascript:window.close();" title="'+
|
||||
(j((a=e.l10n||b.l10n,a?a.call(b,"leavemessage.close",f):n.call(b,"l10n","leavemessage.close",f)))+'"><img class="tpl-image iclosewin" src="'+j((a=(a=b.page,null==a||!1===a?a:a.tplRoot),"function"===typeof a?a.apply(b):a))+'/images/free.gif" alt="');f={hash:{},data:c};d+=j((a=e.l10n||b.l10n,a?a.call(b,"leavemessage.close",f):n.call(b,"l10n","leavemessage.close",f)))+'" /></a>\n </div>\n <div class="messagetxt">';f={hash:{},data:c};return d+=j((a=e.l10n||b.l10n,a?a.call(b,"presurvey.intro",
|
||||
f):n.call(b,"l10n","presurvey.intro",f)))+'</div>\n </div></div></div></div></div></div></div></div>\n</div>\n\n\n<div id="content-wrapper"></div>'})})();
|
||||
(function(){var r=Handlebars.template,q=Handlebars.templates=Handlebars.templates||{};q._logo=r(function(b,c,e,a,d){function f(e){var a;return e=""+("\n <a onclick=\"window.open('"+g((a=(a=e.page,null==a||!1===a?a:a.mibewHost),typeof a===h?a.apply(e):a))+'\');return false;" href="'+g((a=(a=e.page,null==a||!1===a?a:a.mibewHost),typeof a===h?a.apply(e):a))+'">\n <img src="'+g((a=(a=(a=e.page,null==a||!1===a?a:a.company),null==a||!1===a?a:a.chatLogoURL),typeof a===h?
|
||||
a.apply(e):a))+'" alt=""/>\n </a>\n ')}function k(a){var e;return a=""+('\n <img src="'+g((e=(e=(e=a.page,null==e||!1===e?e:e.company),null==e||!1===e?e:e.chatLogoURL),typeof e===h?e.apply(a):e))+'" alt=""/>\n ')}function j(a){var e;return a=""+("\n <a onclick=\"window.open('"+g((e=(e=a.page,null==e||!1===e?e:e.mibewHost),typeof e===h?e.apply(a):e))+'\');return false;" href="'+g((e=(e=a.page,null==e||!1===e?e:e.mibewHost),typeof e===
|
||||
h?e.apply(a):e))+'">\n <img src="'+g((e=(e=a.page,null==e||!1===e?e:e.tplRoot),typeof e===h?e.apply(a):e))+'/images/default-logo.gif" alt=""/>\n </a>\n ')}function s(e){var a;return e=""+('\n <img src="'+g((a=(a=e.page,null==a||!1===a?a:a.tplRoot),typeof a===h?a.apply(e):a))+'/images/default-logo.gif" alt=""/>\n ')}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var m,h="function",g=this.escapeExpression,l=this;
|
||||
b='\n<div id="top2">\n <div id="logo">\n ';if((d=e["if"].call(c,(m=(m=c.page,null==m||!1===m?m:m.company),null==m||!1===m?m:m.chatLogoURL),{hash:{},inverse:l.program(6,function(a,b){var c,d,f;c="\n ";if((f=e["if"].call(a,(d=a.page,null==d||!1===d?d:d.mibewHost),{hash:{},inverse:l.program(9,s,b),fn:l.program(7,j,b),data:b}))||0===f)c+=f;return c+"\n "},d),fn:l.program(1,function(a,b){var c,d,g;c="\n ";if((g=e["if"].call(a,(d=a.page,null==d||!1===d?d:d.mibewHost),
|
||||
{hash:{},inverse:l.program(4,k,b),fn:l.program(2,f,b),data:b}))||0===g)c+=g;return c+"\n "},d),data:d}))||0===d)b+=d;return b+='\n \n <div id="page-title">'+g((m=(m=c.page,null==m||!1===m?m:m.title),typeof m===h?m.apply(c):m))+'</div>\n <div class="clear"> </div>\n </div>\n</div>'});q.chat_avatar=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f=this.escapeExpression;return(b=e["if"].call(c,c.imageLink,{hash:{},
|
||||
inverse:this.program(3,function(){return'<div class="default-avatar"></div>'},d),fn:this.program(1,function(a,b){var c,d;c='<img src="';(d=e.imageLink)?d=d.call(a,{hash:{},data:b}):(d=a.imageLink,d="function"===typeof d?d.apply(a):d);return c+=f(d)+'" border="0" alt="" />'},d),data:d}))||0===b?b:""});q.chat_controls_close=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f;b=e.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='<div class="tpl-image" title="'+
|
||||
(a((f=e.l10n||c.l10n,f?f.call(c,"chat.window.close_title",d):b.call(c,"l10n","chat.window.close_title",d)))+'"></div>')});q.chat_controls_history=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f;b=e.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='<div class="tpl-image" title="'+(a((f=e.l10n||c.l10n,f?f.call(c,"page.analysis.userhistory.title",d):b.call(c,"l10n","page.analysis.userhistory.title",d)))+'"></div>')});q.chat_controls_redirect=
|
||||
r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f,k=e.helperMissing,j=this.escapeExpression;return(b=e["if"].call(c,(f=c.user,null==f||!1===f?f:f.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,d;c={hash:{},data:b};return c='\n<div class="tpl-image" title="'+(j((d=e.l10n||a.l10n,d?d.call(a,"chat.window.toolbar.redirect_user",c):k.call(a,"l10n","chat.window.toolbar.redirect_user",c)))+'"></div>\n')},d),data:d}))||0===b?b:""});q.chat_controls_refresh=
|
||||
r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f;b=e.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='<div class="tpl-image" title="'+(a((f=e.l10n||c.l10n,f?f.call(c,"chat.window.toolbar.refresh",d):b.call(c,"l10n","chat.window.toolbar.refresh",d)))+'"></div>')});q.chat_controls_secure_mode=r(function(b,c,e){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,b.helpers);return'<div class="tpl-image" title="SSL"></div>'});q.chat_controls_send_mail=
|
||||
r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f;b=e.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='<div class="tpl-image" title="'+(a((f=e.l10n||c.l10n,f?f.call(c,"chat.window.toolbar.mail_history",d):b.call(c,"l10n","chat.window.toolbar.mail_history",d)))+'"></div>')});q.chat_controls_sound=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f=e.helperMissing,k=this.escapeExpression;return(b=
|
||||
e["if"].call(c,c.enabled,{hash:{},inverse:this.program(3,function(a,b){var c,d;c={hash:{},data:b};return c='\n <div class="tpl-image sound-control-off" title="'+(k((d=e.l10n||a.l10n,d?d.call(a,"chat.window.toolbar.turn_on_sound",c):f.call(a,"l10n","chat.window.toolbar.turn_on_sound",c)))+'"></div>\n')},d),fn:this.program(1,function(a,b){var c,d;c={hash:{},data:b};return c='\n <div class="tpl-image sound-control-on" title="'+(k((d=e.l10n||a.l10n,d?d.call(a,"chat.window.toolbar.turn_off_sound",
|
||||
c):f.call(a,"l10n","chat.window.toolbar.turn_off_sound",c)))+'"></div>\n')},d),data:d}))||0===b?b:""});q.chat_controls_user_name=r(function(b,c,e,a,d){function f(a,b){var c,d,f;c=""+('\n <div class="user-name-control-input-bg"><input id="user-name-control-input" type="text" size="12" value="'+m((d=(d=a.user,null==d||!1===d?d:d.name),typeof d===s?d.apply(a):d))+'" class="username" /></div>\n <a href="javascript:void(0)" class="user-name-control-set tpl-image" title="');f={hash:{},data:b};
|
||||
return c+=m((d=e.l10n||a.l10n,d?d.call(a,"chat.client.changename",f):h.call(a,"l10n","chat.client.changename",f)))+'"></a>\n '}function k(a,c){var b,d,f;f={hash:{},data:c};b='\n <a href="javascript:void(0)" title="'+(m((d=e.l10n||a.l10n,d?d.call(a,"chat.client.changename",f):h.call(a,"l10n","chat.client.changename",f)))+'">'+m((d=(d=a.user,null==d||!1===d?d:d.name),typeof d===s?d.apply(a):d))+'</a>\n <a class="user-name-control-change tpl-image" title="');f={hash:{},data:c};return b+=
|
||||
m((d=e.l10n||a.l10n,d?d.call(a,"chat.client.changename",f):h.call(a,"l10n","chat.client.changename",f)))+'"></a>\n '}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var j,s="function",m=this.escapeExpression,h=e.helperMissing,g=this;return(b=e["if"].call(c,(j=c.user,null==j||!1===j?j:j.canChangeName),{hash:{},inverse:g.program(6,function(a,b){var c,d;c={hash:{},data:b};return c="\n"+(m((d=e.l10n||a.l10n,d?d.call(a,"chat.client.name",c):h.call(a,"l10n","chat.client.name",c)))+
|
||||
" "+m((d=(d=a.user,null==d||!1===d?d:d.name),typeof d===s?d.apply(a):d))+"\n")},d),fn:g.program(1,function(a,d){var c,b;c={hash:{},data:d};c='\n <span class="user-name-control-prefix">'+(m((b=e.l10n||a.l10n,b?b.call(a,"chat.client.name",c):h.call(a,"l10n","chat.client.name",c)))+"</span>\n ");if((b=e["if"].call(a,a.nameInput,{hash:{},inverse:g.program(4,k,d),fn:g.program(2,f,d),data:d}))||0===b)c+=b;return c+="\n"},d),data:d}))||0===b?b:""});q.chat_layout=r(function(b,c,e,a,d){this.compilerInfo=
|
||||
[4,">= 1.0.0"];e=this.merge(e,b.helpers);a=this.merge(a,b.partials);d=d||{};var f,k=e.helperMissing,j=this.escapeExpression;b="\n";if((a=this.invokePartial(a._logo,"_logo",c,e,a,d))||0===a)b+=a;b+='\n\n\n<div id="chat-header">\n <div class="bgc"><div class="bgl"><div class="bgr">\n \n <div id="controls-region"></div>\n </div></div></div>\n</div>\n\n\n<div id="chat">\n <div class="bgl"><div class="bgr"><div class="sdwbgc"><div class="sdwbgl"><div class="sdwbgr">\n ';if((f=
|
||||
e.unless.call(c,(a=c.user,null==a||!1===a?a:a.isAgent),{hash:{},inverse:this.noop,fn:this.program(1,function(){return'\n <div id="avatar-region"></div>\n '},d),data:d}))||0===f)b+=f;d={hash:{},data:d};return b=b+'\n \n <div id="messages-region"></div>\n \n <div id="status-region"></div>\n </div></div></div></div></div>\n</div>\n\n\n<div id="message-form-region"></div>\n\n\n<div id="footer">'+(j((a=e.l10n||c.l10n,a?a.call(c,"chat.window.poweredby",d):k.call(c,
|
||||
"l10n","chat.window.poweredby",d)))+' <a id="poweredByLink" href="http://mibew.org" title="Mibew Community" target="_blank">mibew.org</a></div>')});q.chat_message=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f,k=this.escapeExpression,j=e.helperMissing;b={hash:{},data:d};b="<span>"+(k((f=e.formatTime||c.formatTime,f?f.call(c,c.created,b):j.call(c,"formatTime",c.created,b)))+"</span> \n");if((f=e["if"].call(c,c.name,{hash:{},inverse:this.noop,fn:this.program(1,
|
||||
function(a,d){var c,b;c="<span class='n";(b=e.kindName)?b=b.call(a,{hash:{},data:d}):(b=a.kindName,b="function"===typeof b?b.apply(a):b);c+=k(b)+"'>";(b=e.name)?b=b.call(a,{hash:{},data:d}):(b=a.name,b="function"===typeof b?b.apply(a):b);return c+=k(b)+"</span>: "},d),data:d}))||0===f)b+=f;b+="\n<span class='m";(f=e.kindName)?f=f.call(c,{hash:{},data:d}):(f=c.kindName,f="function"===typeof f?f.apply(c):f);b+=k(f)+"'>";if((f=e["if"].call(c,c.allowFormatting,{hash:{},inverse:this.program(5,function(a,
|
||||
b){var c,d;d={hash:{},data:b};return k((c=e.apply||a.apply,c?c.call(a,a.message,"urlReplace, nl2br",d):j.call(a,"apply",a.message,"urlReplace, nl2br",d)))},d),fn:this.program(3,function(a,b){var c,d;d={hash:{},data:b};return k((c=e.apply||a.apply,c?c.call(a,a.message,"urlReplace, nl2br, allowTags",d):j.call(a,"apply",a.message,"urlReplace, nl2br, allowTags",d)))},d),data:d}))||0===f)b+=f;return b+="</span><br/>"});q.chat_message_form=r(function(b,c,e,a,d){function f(a,b){var c,d;c={hash:{},data:b};
|
||||
c='\n <select id="predefined" size="1" class="answer">\n <option>'+(m((d=e.l10n||a.l10n,d?d.call(a,"chat.window.predefined.select_answer",c):h.call(a,"l10n","chat.window.predefined.select_answer",c)))+"</option>\n ");if((d=e.each.call(a,a.predefinedAnswers,{hash:{},inverse:g.noop,fn:g.program(5,k,b),data:b}))||0===d)c+=d;return c+="\n </select>\n "}function k(a){var e;return a=""+("\n <option>"+m((e=a["short"],
|
||||
typeof e===s?e.apply(a):e))+"</option>\n ")}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var j,s="function",m=this.escapeExpression,h=e.helperMissing,g=this;b='<div id="message">\n';if((a=e["if"].call(c,(j=c.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:g.noop,fn:g.program(1,function(){return'\n <div class="bgc"><div class="bgl"><div class="bgr">\n <textarea id="message-input" class="message" tabindex="0" rows="4" cols="10"></textarea>\n </div></div></div>\n'},
|
||||
d),data:d}))||0===a)b+=a;b+='\n</div>\n\n<div id="send">\n';if((a=e["if"].call(c,(j=c.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:g.noop,fn:g.program(3,function(a,c){var b,d,t;b='\n <div id="postmessage">\n <div id="predefined-wrapper">\n ';if((t=e["if"].call(a,(d=a.user,null==d||!1===d?d:d.isAgent),{hash:{},inverse:g.noop,fn:g.program(4,f,c),data:c}))||0===t)b+=t;t={hash:{},data:c};b=b+'\n </div>\n <a href="javascript:void(0)" id="send-message" title="'+
|
||||
(m((d=e.l10n||a.l10n,d?d.call(a,"chat.window.send_message",t):h.call(a,"l10n","chat.window.send_message",t)))+'">');t={hash:{},data:c};return b+=m((d=e.l10n||a.l10n,d?d.call(a,"chat.window.send_message_short_and_shortcut",t):h.call(a,"l10n","chat.window.send_message_short_and_shortcut",t)))+"</a>\n </div>\n"},d),data:d}))||0===a)b+=a;return b+'\n</div>\n<div class="clear"></div>'});q.chat_status_base=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};b=this.escapeExpression;
|
||||
(e=e.title)?e=e.call(c,{hash:{},data:d}):(e=c.title,e="function"===typeof e?e.apply(c):e);return b(e)});q.chat_status_message=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};b=this.escapeExpression;(e=e.message)?e=e.call(c,{hash:{},data:d}):(e=c.message,e="function"===typeof e?e.apply(c):e);return b(e)});q.chat_status_typing=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f;b=e.helperMissing;a=this.escapeExpression;
|
||||
d={hash:{},data:d};return a((f=e.l10n||c.l10n,f?f.call(c,"typing.remote",d):b.call(c,"l10n","typing.remote",d)))});q.default_control=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};a=this.escapeExpression;b="<strong>";(e=e.title)?e=e.call(c,{hash:{},data:d}):(e=c.title,e="function"===typeof e?e.apply(c):e);return b+=a(e)+"</strong>"});q.invitation_layout=r(function(b,c,e){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,b.helpers);return'<div id="invitation-messages-region"></div>'});
|
||||
q.leave_message_description=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f,k=e.helperMissing,j=this.escapeExpression;a={hash:{},data:d};b='<div class="buttons">\n <a href="javascript:window.close();" title="'+(j((f=e.l10n||c.l10n,f?f.call(c,"leavemessage.close",a):k.call(c,"l10n","leavemessage.close",a)))+'">\n <img class="tpl-image iclosewin" src="'+j((f=(f=c.page,null==f||!1===f?f:f.tplRoot),"function"===typeof f?f.apply(c):f))+'/images/free.gif" alt="');
|
||||
a={hash:{},data:d};b+=j((f=e.l10n||c.l10n,f?f.call(c,"leavemessage.close",a):k.call(c,"l10n","leavemessage.close",a)))+'" />\n </a>\n</div>\n<div class="messagetxt">';a={hash:{},data:d};return b+=j((f=e.l10n||c.l10n,f?f.call(c,"leavemessage.descr",a):k.call(c,"l10n","leavemessage.descr",a)))+"</div>"});q.leave_message_form=r(function(b,c,e,a,d){function f(a,d){var b,c;b='<input type="hidden" name="group" value="';(c=e.groupId)?c=c.call(a,{hash:{},data:d}):(c=a.groupId,c=typeof c===g?c.apply(a):
|
||||
c);return b+=l(c)+'"/>'}function k(a,c){var d,b,f;d=""+('\n <option value="'+l((b=a.id,typeof b===g?b.apply(a):b))+'" ');if((f=e["if"].call(a,a.selected,{hash:{},inverse:n.noop,fn:n.program(6,j,c),data:c}))||0===f)d+=f;return d+=">"+l((b=a.name,typeof b===g?b.apply(a):b))+"</option>\n "}function j(){return'selected="selected"'}function s(a,b){var c;return(c=e["if"].call(a,a.selected,{hash:{},inverse:n.noop,fn:n.program(9,m,b),data:b}))||0===c?c:""}function m(a){var b;
|
||||
return l((b=a.description,typeof b===g?b.apply(a):b))}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var h,g="function",l=this.escapeExpression,n=this,p=e.helperMissing;b=""+('<form name="leaveMessageForm" method="post" action="">\n <input type="hidden" name="style" value="'+l((h=(h=c.page,null==h||!1===h?h:h.style),typeof h===g?h.apply(c):h))+'"/>\n <input type="hidden" name="info" value="');(a=e.info)?a=a.call(c,{hash:{},data:d}):(a=c.info,a=typeof a===g?a.apply(c):a);
|
||||
b+=l(a)+'"/>\n <input type="hidden" name="referrer" value="';(a=e.referrer)?a=a.call(c,{hash:{},data:d}):(a=c.referrer,a=typeof a===g?a.apply(c):a);b+=l(a)+'"/>\n ';if((a=e.unless.call(c,c.groups,{hash:{},inverse:n.noop,fn:n.program(1,function(a,b){var c;return(c=e["if"].call(a,a.groupId,{hash:{},inverse:n.noop,fn:n.program(2,f,b),data:b}))||0===c?c:""},d),data:d}))||0===a)b+=a;a={hash:{},data:d};b=b+'\n\n <div class="errors"></div>\n\n <table cellspacing="1" cellpadding="5" border="0" class="form">\n <tr>\n <td><strong>'+
|
||||
(l((h=e.l10n||c.l10n,h?h.call(c,"form.field.email",a):p.call(c,"l10n","form.field.email",a)))+':</strong></td>\n <td><input type="text" name="email" size="50" value="');(a=e.email)?a=a.call(c,{hash:{},data:d}):(a=c.email,a=typeof a===g?a.apply(c):a);b+=l(a)+'" class="username"/></td>\n </tr>\n <tr>\n <td><strong>';a={hash:{},data:d};b+=l((h=e.l10n||c.l10n,h?h.call(c,"form.field.name",a):p.call(c,"l10n","form.field.name",a)))+':</strong></td>\n <td><input type="text" name="name" size="50" value="';
|
||||
(a=e.name)?a=a.call(c,{hash:{},data:d}):(a=c.name,a=typeof a===g?a.apply(c):a);b+=l(a)+'" class="username"/></td>\n </tr>\n ';if((a=e["if"].call(c,c.groups,{hash:{},inverse:n.noop,fn:n.program(4,function(a,b){var c,d,f;f={hash:{},data:b};c='\n <tr>\n <td class="text"><strong>'+(l((d=e.l10n||a.l10n,d?d.call(a,"form.field.department",f):p.call(a,"l10n","form.field.department",f)))+'</strong></td>\n <td>\n <select name="group" style="min-width:200px;">\n ');
|
||||
if((f=e.each.call(a,a.groups,{hash:{},inverse:n.noop,fn:n.program(5,k,b),data:b}))||0===f)c+=f;c+='\n </select>\n </td>\n </tr>\n <tr>\n <td class="text"><strong>';f={hash:{},data:b};c+=l((d=e.l10n||a.l10n,d?d.call(a,"form.field.department.description",f):p.call(a,"l10n","form.field.department.description",f)))+'</strong></td>\n <td class="text" id="groupDescription">\n ';if((f=e.each.call(a,a.groups,{hash:{},inverse:n.noop,
|
||||
fn:n.program(8,s,b),data:b}))||0===f)c+=f;return c+="\n </td>\n </tr>\n "},d),data:d}))||0===a)b+=a;b+="\n <tr>\n <td><strong>";a={hash:{},data:d};b+=l((h=e.l10n||c.l10n,h?h.call(c,"form.field.message",a):p.call(c,"l10n","form.field.message",a)))+':</strong></td>\n <td valign="top">\n <textarea name="message" tabindex="0" cols="40" rows="5">';(a=e.message)?a=a.call(c,{hash:{},data:d}):(a=c.message,a=typeof a===g?a.apply(c):a);b+=l(a)+
|
||||
"</textarea>\n </td>\n </tr>\n ";if((a=e["if"].call(c,c.showCaptcha,{hash:{},inverse:n.noop,fn:n.program(11,function(){return'\n <tr>\n <td><img id="captcha-img" src="captcha.php"/></td>\n <td><input type="text" name="captcha" size="50" maxlength="15" value="" class="username"/></td>\n </tr>\n '},d),data:d}))||0===a)b+=a;b+='\n </table>\n <a href="javascript:void(0);" class="but" id="send-message">';a={hash:{},data:d};return b+=l((h=
|
||||
e.l10n||c.l10n,h?h.call(c,"mailthread.perform",a):p.call(c,"l10n","mailthread.perform",a)))+'</a>\n <div class="clear"> </div>\n</form>\n<div id="ajax-loader"><img src="'+l((h=(h=c.page,null==h||!1===h?h:h.tplRoot),typeof h===g?h.apply(c):h))+'/images/ajax-loader.gif" alt="Loading..." /></div>'});q.leave_message_layout=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);a=this.merge(a,b.partials);d=d||{};b="\n";if((c=this.invokePartial(a._logo,"_logo",c,e,a,d))||
|
||||
0===c)b+=c;return b+'\n\n\n<div id="headers">\n <div class="wndb"><div class="wndl"><div class="wndr"><div class="wndt"><div class="wndtl"><div class="wndtr"><div class="wndbl"><div class="wndbr" id="description-region">\n </div></div></div></div></div></div></div></div>\n</div>\n\n\n<div id="content-wrapper"></div>'});q.leave_message_sent_description=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f,k=e.helperMissing,j=this.escapeExpression;a={hash:{},
|
||||
data:d};b='<div class="buttons">\n <a href="javascript:window.close();" title="'+(j((f=e.l10n||c.l10n,f?f.call(c,"chat.mailthread.sent.close",a):k.call(c,"l10n","chat.mailthread.sent.close",a)))+'">\n <img class="tpl-image iclosewin" src="'+j((f=(f=c.page,null==f||!1===f?f:f.tplRoot),"function"===typeof f?f.apply(c):f))+'/images/free.gif" alt="');a={hash:{},data:d};b+=j((f=e.l10n||c.l10n,f?f.call(c,"chat.mailthread.sent.close",a):k.call(c,"l10n","chat.mailthread.sent.close",a)))+
|
||||
'" />\n </a>\n</div>\n<div class="messagetxt">';a={hash:{},data:d};return b+=j((f=e.l10n||c.l10n,f?f.call(c,"leavemessage.sent.message",a):k.call(c,"l10n","leavemessage.sent.message",a)))+"</div>"});q.message=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var f,k=this.escapeExpression,j=e.helperMissing;b={hash:{},data:d};b="<span>"+(k((f=e.formatTime||c.formatTime,f?f.call(c,c.created,b):j.call(c,"formatTime",c.created,b)))+"</span>\n");if((f=e["if"].call(c,
|
||||
c.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,d;c="<span class='n";(d=e.kindName)?d=d.call(a,{hash:{},data:b}):(d=a.kindName,d="function"===typeof d?d.apply(a):d);c+=k(d)+"'>";(d=e.name)?d=d.call(a,{hash:{},data:b}):(d=a.name,d="function"===typeof d?d.apply(a):d);return c+=k(d)+"</span>: "},d),data:d}))||0===f)b+=f;b+="\n<span class='m";(f=e.kindName)?f=f.call(c,{hash:{},data:d}):(f=c.kindName,f="function"===typeof f?f.apply(c):f);b+=k(f)+"'>";if((f=e["if"].call(c,c.allowFormatting,
|
||||
{hash:{},inverse:this.program(5,function(a,c){var d,b;b={hash:{},data:c};return k((d=e.apply||a.apply,d?d.call(a,a.message,"urlReplace, nl2br",b):j.call(a,"apply",a.message,"urlReplace, nl2br",b)))},d),fn:this.program(3,function(a,d){var c,b;b={hash:{},data:d};return k((c=e.apply||a.apply,c?c.call(a,a.message,"urlReplace, nl2br, allowTags",b):j.call(a,"apply",a.message,"urlReplace, nl2br, allowTags",b)))},d),data:d}))||0===f)b+=f;return b+="</span><br/>"});q.survey_form=r(function(b,c,e,a,d){function f(a,
|
||||
c){var d,b;d='<input type="hidden" name="group" value="';(b=e.groupId)?b=b.call(a,{hash:{},data:c}):(b=a.groupId,b=typeof b===l?b.apply(a):b);return d+=n(b)+'"/>'}function k(a,b){var d,c,f;d=""+('\n <option value="'+n((c=a.id,typeof c===l?c.apply(a):c))+'" ');if((f=e["if"].call(a,a.selected,{hash:{},inverse:p.noop,fn:p.program(10,j,b),data:b}))||0===f)d+=f;d+=">"+n((c=a.name,typeof c===l?c.apply(a):c));if((f=e.unless.call(a,a.online,{hash:{},inverse:p.noop,fn:p.program(12,r,
|
||||
b),data:b}))||0===f)d+=f;return d+"</option>\n "}function j(){return'selected="selected"'}function r(){return" (offline)"}function m(a,b){var d;return(d=e["if"].call(a,a.selected,{hash:{},inverse:p.noop,fn:p.program(15,h,b),data:b}))||0===d?d:""}function h(a){var b;return n((b=a.description,typeof b===l?b.apply(a):b))}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);d=d||{};var g,l="function",n=this.escapeExpression,p=this,q=e.helperMissing;b=""+('<form name="surveyForm" method="post" action="">\n <input type="hidden" name="style" value="'+
|
||||
n((g=(g=c.page,null==g||!1===g?g:g.style),typeof g===l?g.apply(c):g))+'"/>\n <input type="hidden" name="info" value="');(a=e.info)?a=a.call(c,{hash:{},data:d}):(a=c.info,a=typeof a===l?a.apply(c):a);b+=n(a)+'"/>\n <input type="hidden" name="referrer" value="';(a=e.referrer)?a=a.call(c,{hash:{},data:d}):(a=c.referrer,a=typeof a===l?a.apply(c):a);b+=n(a)+'"/>\n <input type="hidden" name="survey" value="on"/>\n ';if((a=e.unless.call(c,c.showEmail,{hash:{},inverse:p.noop,fn:p.program(1,function(a,
|
||||
b){var d,c;d='<input type="hidden" name="email" value="';(c=e.email)?c=c.call(a,{hash:{},data:b}):(c=a.email,c=typeof c===l?c.apply(a):c);return d+=n(c)+'"/>'},d),data:d}))||0===a)b+=a;b+="\n ";if((a=e.unless.call(c,c.groups,{hash:{},inverse:p.noop,fn:p.program(3,function(a,b){var c;return(c=e["if"].call(a,a.groupId,{hash:{},inverse:p.noop,fn:p.program(4,f,b),data:b}))||0===c?c:""},d),data:d}))||0===a)b+=a;b+="\n ";if((a=e.unless.call(c,c.showMessage,{hash:{},inverse:p.noop,fn:p.program(6,function(a,
|
||||
b){var c,d;c='<input type="hidden" name="message" value="';(d=e.message)?d=d.call(a,{hash:{},data:b}):(d=a.message,d=typeof d===l?d.apply(a):d);return c+=n(d)+'"/>'},d),data:d}))||0===a)b+=a;b+='\n\n <div class="errors"></div>\n\n <table class="form">\n ';if((a=e["if"].call(c,c.groups,{hash:{},inverse:p.noop,fn:p.program(8,function(a,d){var b,c,f;f={hash:{},data:d};b="\n <tr>\n <td><strong>"+(n((c=e.l10n||a.l10n,c?c.call(a,"form.field.department",f):q.call(a,"l10n","form.field.department",
|
||||
f)))+'</strong></td>\n <td>\n <select name="group">\n ');if((f=e.each.call(a,a.groups,{hash:{},inverse:p.noop,fn:p.program(9,k,d),data:d}))||0===f)b+=f;b+="\n </select>\n </td>\n </tr>\n <tr>\n <td><strong>";f={hash:{},data:d};b+=n((c=e.l10n||a.l10n,c?c.call(a,"form.field.department.description",f):q.call(a,"l10n","form.field.department.description",f)))+'</strong></td>\n <td id="groupDescription">';
|
||||
if((f=e.each.call(a,a.groups,{hash:{},inverse:p.noop,fn:p.program(14,m,d),data:d}))||0===f)b+=f;return b+="</td>\n </tr>\n "},d),data:d}))||0===a)b+=a;a={hash:{},data:d};b=b+"\n <tr>\n <td><strong>"+(n((g=e.l10n||c.l10n,g?g.call(c,"presurvey.name",a):q.call(c,"l10n","presurvey.name",a)))+'</strong></td>\n <td><input type="text" name="name" size="50" value="');(a=e.name)?a=a.call(c,{hash:{},data:d}):(a=c.name,a=typeof a===l?a.apply(c):a);b+=n(a)+'" class="username" ';
|
||||
if((a=e.unless.call(c,c.canChangeName,{hash:{},inverse:p.noop,fn:p.program(17,function(){return'disabled="disabled"'},d),data:d}))||0===a)b+=a;b+="/></td>\n </tr>\n ";if((a=e["if"].call(c,c.showEmail,{hash:{},inverse:p.noop,fn:p.program(19,function(a,b){var d,c;d={hash:{},data:b};d="\n <tr>\n <td><strong>"+(n((c=e.l10n||a.l10n,c?c.call(a,"presurvey.mail",d):q.call(a,"l10n","presurvey.mail",d)))+'</strong></td>\n <td><input type="text" name="email" size="50" value="');
|
||||
(c=e.email)?c=c.call(a,{hash:{},data:b}):(c=a.email,c=typeof c===l?c.apply(a):c);return d+=n(c)+'" class="username"/></td>\n </tr>\n '},d),data:d}))||0===a)b+=a;b+="\n ";if((a=e["if"].call(c,c.showMessage,{hash:{},inverse:p.noop,fn:p.program(21,function(a,c){var d,b;d={hash:{},data:c};d="\n <tr>\n <td><strong>"+(n((b=e.l10n||a.l10n,b?b.call(a,"presurvey.question",d):q.call(a,"l10n","presurvey.question",d)))+'</strong></td>\n <td valign="top"><textarea name="message" tabindex="0" cols="45" rows="2">');
|
||||
(b=e.message)?b=b.call(a,{hash:{},data:c}):(b=a.message,b=typeof b===l?b.apply(a):b);return d+=n(b)+"</textarea></td>\n </tr>\n "},d),data:d}))||0===a)b+=a;b+='\n </table>\n <a href="javascript:void(0);" class="but" id="submit-survey">';a={hash:{},data:d};return b+=n((g=e.l10n||c.l10n,g?g.call(c,"presurvey.submit",a):q.call(c,"l10n","presurvey.submit",a)))+'</a>\n <div class="clear"> </div>\n</form>\n<div id="ajax-loader"><img src="'+n((g=(g=c.page,null==g||!1===g?g:g.tplRoot),
|
||||
typeof g===l?g.apply(c):g))+'/images/ajax-loader.gif" alt="Loading..." /></div>'});q.survey_layout=r(function(b,c,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,b.helpers);a=this.merge(a,b.partials);d=d||{};var f,k=e.helperMissing,j=this.escapeExpression;b="\n";if((a=this.invokePartial(a._logo,"_logo",c,e,a,d))||0===a)b+=a;f={hash:{},data:d};b=b+'\n\n\n<div id="headers">\n <div class="wndb"><div class="wndl"><div class="wndr"><div class="wndt"><div class="wndtl"><div class="wndtr"><div class="wndbl"><div class="wndbr">\n <div class="buttons">\n <a href="javascript:window.close();" title="'+
|
||||
(j((a=e.l10n||c.l10n,a?a.call(c,"leavemessage.close",f):k.call(c,"l10n","leavemessage.close",f)))+'"><img class="tpl-image iclosewin" src="'+j((a=(a=c.page,null==a||!1===a?a:a.tplRoot),"function"===typeof a?a.apply(c):a))+'/images/free.gif" alt="');f={hash:{},data:d};b+=j((a=e.l10n||c.l10n,a?a.call(c,"leavemessage.close",f):k.call(c,"l10n","leavemessage.close",f)))+'" /></a>\n </div>\n <div class="messagetxt">';f={hash:{},data:d};return b+=j((a=e.l10n||c.l10n,a?a.call(c,"presurvey.intro",
|
||||
f):k.call(c,"l10n","presurvey.intro",f)))+'</div>\n </div></div></div></div></div></div></div></div>\n</div>\n\n\n<div id="content-wrapper"></div>'})})();
|
||||
|
@ -0,0 +1 @@
|
||||
<strong>{{title}}</strong>
|
@ -0,0 +1,3 @@
|
||||
<span>{{formatTime created}}</span>
|
||||
{{#if name}}<span class='n{{kindName}}'>{{name}}</span>: {{/if}}
|
||||
<span class='m{{kindName}}'>{{#if allowFormatting}}{{apply message "urlReplace, nl2br, allowTags"}}{{else}}{{apply message "urlReplace, nl2br"}}{{/if}}</span><br/>
|
@ -4,7 +4,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="{{stylePath}}/chat_ie7.css" media="all" />
|
||||
<![endif]-->
|
||||
|
||||
{{additional_css}}
|
||||
{{{additional_css}}}
|
||||
|
||||
<!-- External libs -->
|
||||
<script type="text/javascript" src="{{mibewRoot}}/js/libs/jquery.min.js"></script>
|
||||
@ -25,7 +25,7 @@
|
||||
<!-- Add style scripts -->
|
||||
<script type="text/javascript" src="{{stylePath}}/js/compiled/scripts.js"></script>
|
||||
|
||||
{{additional_js}}
|
||||
{{{additional_js}}}
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
// Localized strings for the core
|
||||
@ -69,7 +69,7 @@
|
||||
'presurvey.intro': '{{#jsString}}{{l10n "presurvey.intro"}}{{/jsString}}'
|
||||
});
|
||||
// Plugins localization
|
||||
Mibew.Localization.set({{additional_localized_strings}});
|
||||
Mibew.Localization.set({{{additional_localized_strings}}});
|
||||
//--></script>
|
||||
|
||||
<!-- Run application -->
|
||||
|
@ -73,7 +73,7 @@
|
||||
'pending.errors.network': "{{#jsString}}{{l10n 'pending.errors.network'}}{{/jsString}}"
|
||||
});
|
||||
// Plugins localization
|
||||
Mibew.Localization.set({{additional_localized_strings}});
|
||||
Mibew.Localization.set({{{additional_localized_strings}}});
|
||||
//--></script>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
@ -109,7 +109,7 @@
|
||||
banWindowParams: "{{[coreStyles.banWindowParams]}}",
|
||||
inviteWindowParams: "{{[coreStyles.inviteWindowParams]}}"
|
||||
},
|
||||
plugins: {{js_plugin_options}}
|
||||
plugins: {{{js_plugin_options}}}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
|
@ -2,11 +2,16 @@
|
||||
|
||||
files=$1
|
||||
|
||||
if [ -e $files ]
|
||||
then
|
||||
cat /dev/null > $2
|
||||
for file in $files
|
||||
do
|
||||
# Make target file empty
|
||||
cat /dev/null > $2
|
||||
|
||||
# Attach each file from the specified mask to the target file
|
||||
for file in $files
|
||||
do
|
||||
# Process a file only if it exists
|
||||
if [ -e $file ]
|
||||
then
|
||||
# Append content of the current file to the target file
|
||||
cat $file >> $2
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user