Close Connection when there is no connection value.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13161 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2013-09-25 15:29:32 +00:00
parent 034a5c0288
commit f70ce644ce
1410 changed files with 7188 additions and 53541 deletions

View file

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<module>
<grants />
<permissions />
<actions>
<action name="dispMessage" type="view" standalone="true" index="true" />
<action name="dispMessageAdminConfig" type="view" standalone="true" admin_index="true" />
<action name="procMessageAdminInsertConfig" type="controller" standalone="true" />
</actions>
<grants />
<permissions />
<actions>
<action name="dispMessage" type="view" index="true" />
<action name="dispMessageAdminConfig" type="view" admin_index="true" />
<action name="procMessageAdminInsertConfig" type="controller" />
<action name="getMessageAdminColorset" type="model" />
</actions>
</module>

File diff suppressed because one or more lines are too long

View file

@ -58,5 +58,5 @@ input[type=radio]{width:13px;height:13px;margin:0;padding:0}
.bn[type=submit],
.bn[type=button]{height:28px}
.bn[href]{height:26px}
.bn.dark{border-color:#666;background:#777 -webkit-gradient(linear,0% 0%,0% 100%,from(#7e7c78),to(#5c5b58));background:#777 -moz-linear-gradient(top,#7e7c78,#5c5b58);background-color:#777;color:#fff;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset}
.bn.white{border-color:#b5b5b5;background:#1b1b1b -webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#f6f6f6),color-stop(0.5,#f0f0f0),color-stop(0.5,#e4e4e4));background:#1b1b1b -moz-linear-gradient(top,#fff,#e4e4e4);background-color:#fff;color:#000}
.bn.dark{border-color:#666;background:-webkit-linear-gradient(top,#7e7c78,#5c5b58);background:-moz-linear-gradient(top,#7e7c78,#5c5b58);background:-o-linear-gradient(top,#7e7c78,#5c5b58);background:-ms-linear-gradient(top,#7e7c78,#5c5b58);background:linear-gradient(top,#7e7c78,#5c5b58);background-color:#777;color:#fff;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset}
.bn.white{border-color:#b5b5b5;background:-webkit-linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6);background:-moz-linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6);background:-o-linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6);background:-ms-linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6);background:linear-gradient(top,#fff,#f0f0f0 50%,#e4e4e4 50%,#f6f6f6);background-color:#fff;color:#000}

View file

@ -3,7 +3,7 @@
<div class="hx h2">
<h2>{$system_message}</h2>
</div>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/message/m.skin/default/system_message/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<div class="co">
@ -19,6 +19,7 @@
<form action="{getUrl('','act','procMemberLogin')}" method="post" ruleset="@login" class="ff">
<input type="hidden" name="module" value="member" />
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
<input type="hidden" name="xe_validator_id" value="modules/message/m.skin/default/system_message/1" />
<fieldset>
<ul>
<li cond="$member_config->identifier == 'user_id'"><label for="uid">{$lang->user_id}</label><input type="text" name="user_id" id="uid" required autofocus /></li>

View file

@ -19,8 +19,8 @@ class messageAdminController extends message
function procMessageAdminInsertConfig()
{
// Get information
$args = Context::gets('skin', 'mskin');
// Create a module Controller object
$args = Context::gets('skin', 'mskin', 'colorset', 'mcolorset');
// Create a module Controller object
$oModuleController = &getController('module');
$output = $oModuleController->insertModuleConfig('message',$args);
if(!$output->toBool()) return $output;

View file

@ -0,0 +1,29 @@
<?php
class messageAdminModel extends message{
public function getMessageAdminColorset()
{
$skin = Context::get('skin');
$type = Context::get('type') == 'M' ? 'M' : 'P';
Context::set('type', $type);
$dir = $type == 'P' ? 'skins' : 'm.skins';
if(!$skin)
{
$tpl = '';
}
else
{
$oModuleModel = getModel('module'); /* @var $oModuleModel moduleModel */
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin, $dir);
Context::set('skin_info', $skin_info);
$config = $oModuleModel->getModuleConfig('message');
Context::set('config', $config);
$oTemplate = TemplateHandler::getInstance();
$tpl = $oTemplate->compile($this->module_path.'tpl', 'colorset_list');
}
$this->add('tpl', $tpl);
}
}

File diff suppressed because one or more lines are too long

View file

@ -6,7 +6,6 @@ body, #access table, #access input, #access textarea, #access select, #access bu
body, #access table, #access input, #access textarea, #access select, #access button, #access label{font-family:,Dotum,Arial,Helvetica,sans-serif}
}
#access{width:400px;margin:30px auto;background-color:#ffffff;border:1px solid #999;border-radius:6px;box-shadow:0 3px 7px #ccc;box-sizing:border-box}
#access .btn{text-decoration:none}
#access>.login-header{padding:9px 15px;border-bottom:1px solid #eee}
#access>.login-header>h1{margin:0;font-size:16px;line-height:1.4;font-weight:600;color:#666}
#access>.login-header>h1>i{opacity:.5;filter:alpha(opacity=50);margin:2px 0 0 0}
@ -24,10 +23,11 @@ body, #access table, #access input, #access textarea, #access select, #access bu
#access input[type="email"],
#access input[type="password"]{width:100%}
#access input[type="checkbox"]{margin:0}
#access .btn{border-radius:2px;overflow:visible;font-size:14px;line-height:18px;padding:3px 9px}
#access .btn{border-radius:2px;overflow:visible;font-size:14px;line-height:18px;height:auto;padding:3px 9px;text-decoration:none}
#access .submit{position:absolute;top:0;right:0}
#access p{margin:10px 0}
#access #warning{margin-right:-14px}
#access a{color: #0088cc;text-decoration: none;}
@media all and (max-width:480px){
#access{position:static;margin:0;width:100%}
}
}

View file

@ -1,6 +1,8 @@
<load target="../../../../common/js/jquery.min.js" usecdn="true" index="-1000000" />
<load target="./filter/openid_login.xml" />
<block cond="!$is_logged && $module == 'admin'">
<load target="../../../../common/css/bootstrap.min.css" index="1" />
</block>
<load target="./filter/openid_login.xml" />
<load target="./message.css" index="2" />
<load target="./message.js" />
<div id="access">
@ -8,13 +10,14 @@
<h1><i class="icon-user"></i> {$system_message}</h1>
</div>
<div class="login-body">
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/message/skins/default/system_message/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form cond="!$is_logged && $module == 'admin'" ruleset="@login" action="{getUrl('','act','procMemberLogin')}" method="post">
<input type="hidden" name="module" value="member" />
<input type="hidden" name="act" value="procMemberLogin" />
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
<input type="hidden" name="xe_validator_id" value="modules/message/skins/default/system_message/1" />
<fieldset>
<div class="control-group">
<input type="text" name="user_id" id="uid" title="{$lang->user_id}" placeholder="{$lang->user_id}" required autofocus cond="$member_config->identifier != 'email_address'" />

View file

@ -0,0 +1,16 @@
<!--@foreach($skin_info->colorset as $key => $val)-->
<!--@if($val->screenshot)-->
{@ $_img_info = getImageSize($val->screenshot); $_height =
$_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; }
<!--@else-->
{@ $_width = 200; $_height = 20; $_talign = "left"; }
<!--@end-->
<div style="display: inline-block; *display: inline; *zoom: 1; text-align: {$_talign}">
<label for="<!--@if($type == 'M')-->m<!--@end-->colorset_{$key}" class="x_inline">
<input type="radio" name="<!--@if($type == 'M')-->m<!--@end-->colorset" value="{$val->name}" id="<!--@if($type == 'M')-->m<!--@end-->colorset_{$key}" <!--@if(($type == 'M' && $config->mcolorset==$val->name) || ($type == 'P' && $config->colorset==$val->name))-->checked="checked"<!--@end-->/>{$val->title}
</label>
<!--@if($val->screenshot)-->
<br /> <img src="../../../{$val->screenshot}" alt="{$val->title}" style="border: 1px solid #888888; padding: 2px; margin: 2px;" />
<!--@end-->
</div>
<!--@end-->

View file

@ -1,3 +1,4 @@
<load target="js/config.js" />
<div class="x_page-header">
<h1>
{$lang->message}
@ -6,30 +7,43 @@
</div>
<p class="x_alert x_alert-info" id="aboutSkin" hidden>{$lang->about_skin}</p>
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/message/tpl/config/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form action="./" method="post" class="x_form-horizontal">
<input type="hidden" name="module" value="message" />
<input type="hidden" name="act" value="procMessageAdminInsertConfig" />
<input type="hidden" name="xe_validator_id" value="modules/message/tpl/config/1" />
<div class="x_control-group">
<label for="skin" class="x_control-label">{$lang->skin}</label>
<div class="x_controls">
<select name="skin" id="skin" style="width:auto">
<select name="skin" id="skin" style="width:auto" onchange="doGetSkinColorset(this.options[this.selectedIndex].value)">
<option loop="$skin_list => $key, $val" value="{$key}" selected="selected"|cond="$key == $config->skin">{$val->title}</option>
</select>
</div>
</div>
<div id="colorset" class="x_control-group" style="display:none">
<label class="x_control-label" for="message_colorset">{$lang->colorset}</label>
<div class="x_controls">
<div id="message_colorset"></div>
</div>
</div>
<div class="x_control-group">
<label for="mskin" class="x_control-label">{$lang->mobile_skin}</label>
<div class="x_controls">
<select name="mskin" id="mskin" style="width:auto">
<select name="mskin" id="mskin" style="width:auto" onchange="doGetSkinColorset(this.options[this.selectedIndex].value, 'M')">
<option loop="$mskin_list => $key, $val" value="{$key}" selected="selected"|cond="$key == $config->mskin">{$val->title}</option>
</select>
</div>
</div>
<div id="mcolorset" class="x_control-group" style="display:none">
<label class="x_control-label" for="message_mcolorset">{$lang->colorset}</label>
<div class="x_controls">
<div id="message_mcolorset"></div>
</div>
</div>
<div class="btnArea">
<button class="x_btn x_btn-primary" type="submit">{$lang->cmd_registration}</button>
</div>

View file

@ -0,0 +1,45 @@
function doGetSkinColorset(skin, type) {
type = type == 'M' ? 'M' : 'P';
var params = {
'skin' : skin,
'type': type,
};
var response_tags = [ 'error', 'message', 'tpl' ];
function on_complete(ret) {
var $container = jQuery('#colorset');
if(type == 'M'){
$container = jQuery('#mcolorset');
}
var old_h = $container.is(':visible') ? $container.outerHeight() : 0;
if(ret.tpl == ''){
$container.hide();
}else{
$container.show();
var $colorset = jQuery('#message_colorset');
if(type == 'M'){
$colorset = jQuery('#message_mcolorset');
}
$colorset.html(ret.tpl);
}
var new_h = $container.is(':visible') ? $container.outerHeight() : 0;
try {
fixAdminLayoutFooter(new_h - old_h)
} catch (e) {};
}
exec_xml('message', 'getMessageAdminColorset', params, on_complete, response_tags);
}
jQuery(function($){
doGetSkinColorset($('#skin').val());
doGetSkinColorset($('#mskin').val(), 'M');
});