mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Merge pull request #2 from xpressengine/develop
Develop merge from xpressengine:develop
This commit is contained in:
commit
c493dd6a98
72 changed files with 710 additions and 386 deletions
25
CONTRIBUTING.md
Normal file
25
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Contribution Guide
|
||||
|
||||
## Issue 작성
|
||||
Issue 작성 시 참고해주세요.
|
||||
|
||||
* 작성하려는 이슈가 이미 있는지 검색 후 등록해주세요. 비슷한 이슈가 있다면 댓글로 추가 내용을 덧붙일 수 있습니다.
|
||||
* 이슈에는 하나의 문제 또는 제안을 작성해주세요. 절대 하나의 이슈에 2개 이상의 내용을 적지마세요.
|
||||
* 이슈는 가능한 상세하고 간결하게 작성해주세요
|
||||
* 필요하다면 화면을 캡쳐하여 이미지를 업로드할 수 있습니다
|
||||
|
||||
## Pull request(PR)
|
||||
* `master` 브랜치의 코드는 수정하지마세요
|
||||
* PR은 `develop` 브랜치만 허용합니다.
|
||||
* `develop` 브랜치를 부모로한 토픽 브랜치를 활용하면 편리합니다.
|
||||
|
||||
|
||||
## Coding Guidelines
|
||||
코드를 기여할 때 Coding conventions을 따라야합니다.
|
||||
|
||||
* 모든 text 파일의 charset은 BOM이 없는 UTF-8입니다
|
||||
* newline은 UNIX type을 사용합니다. 일부 파일이 다른 type을 사용하더라도 절대 고치지 마세요!
|
||||
* 들여쓰기는 1개의 탭으로 합니다
|
||||
* class 선언과 function, if, foreach, for, while 등 중괄호의 `{}`는 다음 줄에 있어야 합니다
|
||||
* 마찬가지로 선언 다음에는 공백을 두지 않습니다. ex) CORRECT `if(...)`, INCORRECT `if (...)`
|
||||
* **Coding convention에 맞지 않는 코드를 발견 하더라도 목적과 관계 없는 코드는 절대 고치지 마세요**
|
||||
25
README.md
25
README.md
|
|
@ -1,12 +1,29 @@
|
|||
# XpressEngine
|
||||
XpressEngine
|
||||
============
|
||||
|
||||
[](https://travis-ci.org/xpressengine/xe-core)
|
||||
[](http://www.gnu.org/licenses/gpl.html)
|
||||
[](https://github.com/xpressengine/xe-core/releases)
|
||||
|
||||
XpressEngine(XE)은 PHP로 작성한 설치형 CMS(Content Management System)입니다.
|
||||
오픈소스 라이선스로 누구나 사용 또는 개작할 수 있으며, 개방형 프로젝트로서 누구나 개발에 참여할 수 있습니다.
|
||||
|
||||
## Support
|
||||
* Official sitie (Korean) : http://www.xpressengine.com/
|
||||
|
||||
## Maintainers
|
||||
@akasima @bnu @jhyeon1010 @khongchi @ngleader
|
||||
|
||||
## Authors
|
||||
adrian.vasile.constantin, aerofleet, @akasima, @andreimarin, araste, @bnu, bradly1, buffkj, c2joy, @canto, cbrghost, @ccata17, @ChanMyeong, chinaskyking, chschy, clench, @devjin, @dionisrom, @dorami, @dragan-dan, ducduydaovn, duvent, @Eundong, @florinutz, @flourscent, @flyskyko, @ForPeople, FruitsHake, guny, @haneul, hankm2004, haojilin, heemin, ikko, johnsonshu, juanlee0, k10206, kagami, @khongchi, @lansi951, @largeden, liahona, lickawtl, mayoojin, mglclub, @misol, mmx900, mooo, mosmartin, @nagoon97, @ngleader, nicetwo, ovclas, risapapa, rokmcssu, royallin, rubyeye, ryin005, sanghunjun, @sejin7940, @SMaker, sspa3141, @stellar12, supershop, @taggon, @ucorina, unryong, venister, wdlee91, welcomeju, @YJSoft, ysnglee2000, zero
|
||||
adrian.vasile.constantin, aerofleet, @akasima, @andreimarin, araste, @bnu, @bongkeun, bradly1, buffkj, c2joy, @canto, cbrghost, @ccata17, @ChanMyeong, chinaskyking, chschy, clench, @cometdev, @devdho, @devjin, @dionisrom, @dorami, @dragan-dan, ducduydaovn, duvent, @Eundong, @florinutz, @flourscent, @flyskyko, @ForPeople, FruitsHake, guny, @haneul, hankm2004, @hansim, haojilin, heemin, @hyeon0142, ikko, @izuzero, johnsonshu, juanlee0, k10206, kagami, @khongchi, @lansi951, @largeden, liahona, lickawtl, @mAKEkr, mayoojin, mglclub, @misol, mmx900, @mog422, mooo, mosmartin, @nagoon97, @ngleader, nicetwo, ovclas, @qw5414, @Rayyin, risapapa, rokmcssu, royallin, rubyeye, ryin005, @samswnlee, sanghunjun, @sejin7940, @smaker, @solidh, sspa3141, @stellar12, supershop, @taggon, @ucorina, unryong, venister, wdlee91, welcomeju, @YJSoft, ysnglee2000, zero
|
||||
|
||||
## Contribution Guide
|
||||
`CONTRIBUTING.md`파일을 참고하세요.
|
||||
|
||||
## License
|
||||
Copyright (C) NAVER <http://www.navercorp.com>
|
||||
Copyright 2014 NAVER Corp. <http://www.navercorp.com>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
|
|
|||
|
|
@ -12,8 +12,11 @@ if(!defined("__XE__")) exit();
|
|||
if(!class_exists('AddonCaptcha', false))
|
||||
{
|
||||
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
|
||||
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
|
||||
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
|
||||
if(Mobile::isFromMobilePhone())
|
||||
{
|
||||
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
|
||||
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
|
||||
}
|
||||
|
||||
class AddonCaptcha
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,8 +12,11 @@ if(!defined("__XE__")) exit();
|
|||
if(!class_exists('AddonMemberCaptcha', false))
|
||||
{
|
||||
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
|
||||
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
|
||||
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
|
||||
if(Mobile::isFromMobilePhone())
|
||||
{
|
||||
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
|
||||
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
|
||||
}
|
||||
|
||||
class AddonMemberCaptcha
|
||||
{
|
||||
|
|
|
|||
|
|
@ -205,6 +205,9 @@ class Context
|
|||
$this->context->lang = &$GLOBALS['lang'];
|
||||
$this->context->_COOKIE = $_COOKIE;
|
||||
|
||||
// 20140429 editor/image_link
|
||||
$this->_checkGlobalVars();
|
||||
|
||||
$this->setRequestMethod('');
|
||||
|
||||
$this->_setXmlRpcArgument();
|
||||
|
|
@ -1115,6 +1118,16 @@ class Context
|
|||
($self->request_method = $_SERVER['REQUEST_METHOD']);
|
||||
}
|
||||
|
||||
/**
|
||||
* handle global arguments
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function _checkGlobalVars()
|
||||
{
|
||||
$this->_recursiveCheckVar($_SERVER['HTTP_HOST']);
|
||||
}
|
||||
|
||||
/**
|
||||
* handle request areguments for GET/POST
|
||||
*
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class HTMLDisplayHandler
|
|||
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this, '_moveMetaToHeader'), $output);
|
||||
|
||||
// change a meta fine(widget often put the tag like <!--Meta:path--> to the content because of caching)
|
||||
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\/\.\@]+)-->/is', array($this, '_transMeta'), $output);
|
||||
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@]+)-->/is', array($this, '_transMeta'), $output);
|
||||
|
||||
// handles a relative path generated by using the rewrite module
|
||||
if(Context::isAllowRewrite())
|
||||
|
|
@ -394,7 +394,7 @@ class HTMLDisplayHandler
|
|||
$lang_type = Context::getLangType();
|
||||
|
||||
// add common JS/CSS files
|
||||
if(__DEBUG__)
|
||||
if(__DEBUG__ || !__XE_VERSION_STABLE__)
|
||||
{
|
||||
$oContext->loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -111000), true);
|
||||
$oContext->loadFile(array('./common/js/jquery.js', 'head', 'gte IE 9', -110000), true);
|
||||
|
|
@ -417,7 +417,7 @@ class HTMLDisplayHandler
|
|||
// for admin page, add admin css
|
||||
if(Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
|
||||
{
|
||||
if(__DEBUG__)
|
||||
if(__DEBUG__ || !__XE_VERSION_STABLE__)
|
||||
{
|
||||
$oContext->loadFile(array('./modules/admin/tpl/css/admin.css', '', '', 10), true);
|
||||
$oContext->loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
|
||||
|
|
@ -449,7 +449,7 @@ class HTMLDisplayHandler
|
|||
$lang_type = Context::getLangType();
|
||||
|
||||
// add common JS/CSS files
|
||||
if(__DEBUG__)
|
||||
if(__DEBUG__ || !__XE_VERSION_STABLE__)
|
||||
{
|
||||
$oContext->loadFile(array('./common/css/mobile.css', '', '', -1000000), true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ class ExtraItem
|
|||
|
||||
for($i = 0, $c = count($values); $i < $c; $i++)
|
||||
{
|
||||
$values[$i] = htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
$values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
|
||||
}
|
||||
|
||||
return $values;
|
||||
|
|
@ -302,21 +302,15 @@ class ExtraItem
|
|||
case 'textarea' :
|
||||
return nl2br($value);
|
||||
|
||||
case 'checkbox' :
|
||||
if(is_array($value))
|
||||
{
|
||||
return implode(', ', $value);
|
||||
}
|
||||
return $value;
|
||||
|
||||
case 'date' :
|
||||
return zdate($value, "Y-m-d");
|
||||
|
||||
case 'checkbox' :
|
||||
case 'select' :
|
||||
case 'radio' :
|
||||
if(is_array($value))
|
||||
{
|
||||
return implode(', ', $value);
|
||||
return implode(',', $value);
|
||||
}
|
||||
return $value;
|
||||
|
||||
|
|
@ -426,7 +420,8 @@ class ExtraItem
|
|||
Context::loadJavascriptPlugin('ui.datepicker');
|
||||
|
||||
$buff[] = '<input type="hidden" name="' . $column_name . '" value="' . $value . '" />';
|
||||
$buff[] = '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" /> <input type="button" value="' . Context::getLang('cmd_delete') . '" id="dateRemover_' . $column_name . '" />';
|
||||
$buff[] = '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" />';
|
||||
$buff[] = '<input type="button" value="' . Context::getLang('cmd_delete') . '" class="btn" id="dateRemover_' . $column_name . '" />';
|
||||
$buff[] = '<script type="text/javascript">';
|
||||
$buff[] = '//<![CDATA[';
|
||||
$buff[] = '(function($){';
|
||||
|
|
@ -458,6 +453,8 @@ class ExtraItem
|
|||
}
|
||||
if($this->desc)
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->replaceDefinedLangCode($this->desc);
|
||||
$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class FrontEndFileHandler extends Handler
|
|||
|
||||
if(strpos($file->filePath, '://') === FALSE)
|
||||
{
|
||||
if(!__DEBUG__)
|
||||
if(!__DEBUG__ && __XE_VERSION_STABLE__)
|
||||
{
|
||||
// if no debug mode, load minifed file
|
||||
$minifiedFileName = implode('.', array($file->fileNameNoExt, 'min', $file->fileExtension));
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@
|
|||
<pattern>http://api.v.daum.net/</pattern>
|
||||
<pattern>http://tvpot.daum.net/playlist/playlist.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.mncast.com" desc="엠엔캐스트">
|
||||
<pattern>http://dory.mncast.com/mncHMovie.swf</pattern>
|
||||
<pattern>http://dory.mncast.com/mncastPlayer.swf</pattern>
|
||||
</domain>
|
||||
<domain name="http://www.youtube.com" desc="Youtube">
|
||||
<pattern>http://www.youtube.com/v/</pattern>
|
||||
<pattern>http://www.youtube-nocookie.com/</pattern>
|
||||
|
|
|
|||
2
common/css/xe.min.css
vendored
2
common/css/xe.min.css
vendored
File diff suppressed because one or more lines are too long
2
common/js/x.min.js
vendored
2
common/js/x.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -29,7 +29,11 @@ define('__ZBXE__', __XE__);
|
|||
/**
|
||||
* Display XE's full version.
|
||||
*/
|
||||
define('__XE_VERSION__', '1.7.5-beta1');
|
||||
define('__XE_VERSION__', '1.7.5');
|
||||
define('__XE_VERSION_ALPHA__', (stripos(__XE_VERSION__, 'alpha') !== false));
|
||||
define('__XE_VERSION_BETA__', (stripos(__XE_VERSION__, 'beta') !== false));
|
||||
define('__XE_VERSION_RC__', (stripos(__XE_VERSION__, 'rc') !== false));
|
||||
define('__XE_VERSION_STABLE__', (!__XE_VERSION_ALPHA__ && !__XE_VERSION_BETA__ && !__XE_VERSION_RC__));
|
||||
|
||||
/**
|
||||
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.
|
||||
|
|
|
|||
|
|
@ -236,7 +236,46 @@ function executeQueryArray($query_id, $args = NULL, $arg_columns = NULL)
|
|||
function getNextSequence()
|
||||
{
|
||||
$oDB = DB::getInstance();
|
||||
return $oDB->getNextSequence();
|
||||
$seq = $oDB->getNextSequence();
|
||||
setUserSequence($seq);
|
||||
return $seq;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Sequence number to session
|
||||
*
|
||||
* @param int $seq sequence number
|
||||
* @return void
|
||||
*/
|
||||
function setUserSequence($seq)
|
||||
{
|
||||
$arr_seq = array();
|
||||
if(isset($_SESSION['seq']))
|
||||
{
|
||||
$arr_seq = $_SESSION['seq'];
|
||||
}
|
||||
$arr_seq[] = $seq;
|
||||
$_SESSION['seq'] = $arr_seq;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Sequence number grant
|
||||
*
|
||||
* @param int $seq sequence number
|
||||
* @return boolean
|
||||
*/
|
||||
function checkUserSequence($seq)
|
||||
{
|
||||
if(!isset($_SESSION['seq']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(!in_array($seq, $_SESSION['seq']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ require dirname(__FILE__) . '/config/config.inc.php';
|
|||
* @brief Initialize by creating Context object
|
||||
* Set all Request Argument/Environment variables
|
||||
**/
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext = Context::getInstance();
|
||||
$oContext->init();
|
||||
|
||||
/**
|
||||
|
|
@ -59,8 +59,7 @@ if($oContext->checkSSO())
|
|||
{
|
||||
if($oModuleHandler->init())
|
||||
{
|
||||
$oModule = &$oModuleHandler->procModule();
|
||||
$oModuleHandler->displayContent($oModule);
|
||||
$oModuleHandler->displayContent($oModuleHandler->procModule());
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ class addon extends ModuleObject
|
|||
$oAddonController = getAdminController('addon');
|
||||
$oAddonController->doInsert('autolink', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('blogapi');
|
||||
$oAddonController->doInsert('counter', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('member_communication', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('member_extra_info', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('mobile', 0, 'site', 'Y');
|
||||
|
|
|
|||
|
|
@ -100,13 +100,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</block>
|
||||
</section>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</section>
|
||||
</form>
|
||||
<script>
|
||||
(function($){
|
||||
|
|
|
|||
|
|
@ -348,11 +348,26 @@ class adminAdminView extends admin
|
|||
}
|
||||
}
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$oAddonAdminModel = getAdminModel('addon');
|
||||
$counterAddonActivated = $oAddonAdminModel->isActivatedAddon('counter', $site_module_info->site_srl );
|
||||
if(!$counterAddonActivated)
|
||||
{
|
||||
$columnList = array('member_srl', 'nick_name', 'user_name', 'user_id', 'email_address');
|
||||
$args = new stdClass;
|
||||
$args->page = 1;
|
||||
$args->list_count = 5;
|
||||
$output = executeQuery('member.getMemberList', $args, $columnList);
|
||||
Context::set('latestMemberList', $output->data);
|
||||
unset($args, $output, $columnList);
|
||||
}
|
||||
|
||||
Context::set('module_list', $module_list);
|
||||
Context::set('needUpdate', $isUpdated);
|
||||
Context::set('addTables', $addTables);
|
||||
Context::set('needUpdate', $needUpdate);
|
||||
Context::set('newVersionList', $needUpdateList);
|
||||
Context::set('counterAddonActivated', $counterAddonActivated);
|
||||
|
||||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('module_list..', 'module_list..author..', 'newVersionList..');
|
||||
|
|
|
|||
169
modules/admin/tpl/_dashboard_counter.html
Normal file
169
modules/admin/tpl/_dashboard_counter.html
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
<div>
|
||||
<section class="status">
|
||||
<h2>{$lang->uv}</h2>
|
||||
<div style="margin:10px 15px;height:142px" id="visitors"></div>
|
||||
<div class="more">
|
||||
<dl>
|
||||
<dt>{$lang->menu_gnb['user']}: </dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}">{number_format($status->member->totalCount)} (<!--@if($status->member->todayCount > 0)-->+<!--@end-->{number_format($status->member->todayCount)})</a></dd>
|
||||
</dl>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCounterAdminIndex')}"><i>›</i> {$lang->details}</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="status">
|
||||
<h2>{$lang->pv}</h2>
|
||||
<div style="margin:10px 15px;height:142px" id="page_views"></div>
|
||||
<div class="more">
|
||||
<dl>
|
||||
<dt>{$lang->menu_gnb_sub['document']}: </dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">{number_format($status->document->totalCount)} (<!--@if($status->document->todayCount > 0)-->+<!--@end-->{number_format($status->document->todayCount)})</a></dd>
|
||||
</dl>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCounterAdminIndex')}"><i>›</i> {$lang->details}</a>
|
||||
</div>
|
||||
</section>
|
||||
<style scoped>.jqplot-table-legend{background:#fff;top:13px!important}</style>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<section class="document">
|
||||
<h2>{$lang->latest_documents}</h2>
|
||||
<ul>
|
||||
<li loop="$latestDocumentList => $key,$value">
|
||||
{@$document = $value->variables}
|
||||
<a href="{getUrl('', 'document_srl', $document['document_srl'])}" target="_blank"><!--@if(trim($value->getTitle()))-->{$value->getTitle()}<!--@else--><strong>{$lang->no_title_document}</strong><!--@end--></a>
|
||||
<span class="side">{$value->getNickName()}</span>
|
||||
<form class="action" method="POST">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
||||
<input type="hidden" name="cart[]" value="{$document['document_srl']}" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
|
||||
<button type="submit" name="type" value="trash" class="x_icon-trash">{$lang->cmd_trash}</button>
|
||||
<button type="submit" name="type" value="delete" class="x_icon-remove">{$lang->cmd_delete}</button>
|
||||
</form>
|
||||
</li>
|
||||
<li cond="!is_array($latestDocumentList) || count($latestDocumentList) < 1">{$lang->no_data}</li>
|
||||
</ul>
|
||||
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
||||
</section>
|
||||
<section class="reply">
|
||||
<h2>{$lang->latest_comments}</h2>
|
||||
<ul>
|
||||
<li loop="$latestCommentList => $key,$value">
|
||||
<a href="{getUrl('', 'document_srl', $value->document_srl)}#comment_{$value->comment_srl}" target="_blank"><!--@if(trim($value->content))-->{$value->getSummary()}<!--@else--><strong>{$lang->no_text_comment}</strong><!--@end--></a>
|
||||
<span class="side">{$value->getNickName()}</span>
|
||||
<form class="action">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procCommentAdminDeleteChecked" />
|
||||
<input type="hidden" name="cart[]" value="{$value->comment_srl}" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
|
||||
<button type="submit" name="is_trash" value="true" class="x_icon-trash">{$lang->cmd_trash}</button>
|
||||
<button type="submit" name="is_trash" value="false" class="x_icon-remove">{$lang->cmd_delete}</button>
|
||||
</form>
|
||||
</li>
|
||||
<li cond="!is_array($latestCommentList) || count($latestCommentList) < 1">{$lang->no_data}</li>
|
||||
</ul>
|
||||
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
xe.lang.this_week = '{$lang->this_week}';
|
||||
xe.lang.last_week = '{$lang->last_week}';
|
||||
xe.lang.next_week = '{$lang->next_week}';
|
||||
xe.lang.mon = '{$lang->mon}';
|
||||
xe.lang.tue = '{$lang->tue}';
|
||||
xe.lang.wed = '{$lang->wed}';
|
||||
xe.lang.thu = '{$lang->thu}';
|
||||
xe.lang.fri = '{$lang->fri}';
|
||||
xe.lang.sat = '{$lang->sat}';
|
||||
xe.lang.sun = '{$lang->sun}';
|
||||
|
||||
jQuery(function($)
|
||||
{
|
||||
// Dashboard portlet UI
|
||||
$('.dashboard>div>section>ul>li')
|
||||
.bind('mouseenter focusin', function(){
|
||||
$(this).addClass('hover').find('>.action').show();
|
||||
})
|
||||
.bind('mouseleave focusout', function()
|
||||
{
|
||||
if(!$(this).find(':focus').length)
|
||||
{
|
||||
$(this).removeClass('hover').find('>.action').hide();
|
||||
}
|
||||
});
|
||||
|
||||
// check browser version
|
||||
if($.browser.msie == true ) {
|
||||
var arrBrowserVersion = $.browser.version.split('.');
|
||||
if(parseInt(arrBrowserVersion[0]) <= 8) {
|
||||
$('#checkBrowserMessage').show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function obj2Array(htObj)
|
||||
{
|
||||
var aRes = [];
|
||||
|
||||
for(var x in htObj)
|
||||
{
|
||||
if(!htObj.hasOwnProperty(x)) continue;
|
||||
aRes.push(htObj[x]);
|
||||
}
|
||||
|
||||
return aRes;
|
||||
}
|
||||
|
||||
jQuery(function ($)
|
||||
{
|
||||
$.exec_json("counter.getWeeklyUniqueVisitor", {}, function(htRes)
|
||||
{
|
||||
var aLastWeek = obj2Array(htRes.last_week.list);
|
||||
var aThisWeek = obj2Array(htRes.this_week.list);
|
||||
|
||||
drawChart("visitors", "Weekly Visitors", aLastWeek, aThisWeek);
|
||||
});
|
||||
|
||||
$.exec_json("counter.getWeeklyPageView", {}, function(htRes)
|
||||
{
|
||||
var aLastWeek = obj2Array(htRes.last_week.list);
|
||||
var aThisWeek = obj2Array(htRes.this_week.list);
|
||||
|
||||
drawChart("page_views", "Weekly Page Views", aLastWeek, aThisWeek);
|
||||
});
|
||||
});
|
||||
|
||||
function drawChart(sContainerId, sTitle, aLastWeek, aThisWeek)
|
||||
{
|
||||
$ = jQuery;
|
||||
|
||||
var s1 = aLastWeek;
|
||||
var s2 = aThisWeek;
|
||||
// Can specify a custom tick Array.
|
||||
// Ticks should match up one for each y value (category) in the series.
|
||||
var ticks = [xe.lang.sun,xe.lang.mon,xe.lang.tue,xe.lang.wed,xe.lang.thu,xe.lang.fri,xe.lang.sat];
|
||||
|
||||
var plot1 = $.jqplot(sContainerId, [s1, s2], {
|
||||
seriesDefaults:{
|
||||
renderer:$.jqplot.BarRenderer,
|
||||
rendererOptions: {fillToZero: true}
|
||||
},
|
||||
series:[
|
||||
{label: xe.lang.last_week},
|
||||
{label: xe.lang.this_week}
|
||||
],
|
||||
legend:
|
||||
{
|
||||
show: true,
|
||||
placement: 'outsideGrid'
|
||||
},
|
||||
axes: {
|
||||
xaxis: {
|
||||
renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks
|
||||
},
|
||||
yaxis: {
|
||||
min: 0, ticks: 1, pad: 1.05
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
66
modules/admin/tpl/_dashboard_default.html
Normal file
66
modules/admin/tpl/_dashboard_default.html
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<div>
|
||||
<section class="member">
|
||||
<h2>{$lang->member}</h2>
|
||||
<ul>
|
||||
<li loop="$latestMemberList => $key,$value">
|
||||
{@$document = $value->variables}
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert', 'member_srl', $value->member_srl)}" target="_blank">{$value->nick_name}</a>
|
||||
</li>
|
||||
<li cond="!is_array($latestMemberList) || count($latestMemberList) < 1">{$lang->no_data}</li>
|
||||
</ul>
|
||||
<div class="more">
|
||||
<dl>
|
||||
<dt>{$lang->menu_gnb['user']}: </dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}">{number_format($status->member->totalCount)} (<!--@if($status->member->todayCount > 0)-->+<!--@end-->{number_format($status->member->todayCount)})</a></dd>
|
||||
</dl>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}"><i>›</i> {$lang->more}</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<section class="document">
|
||||
<h2>{$lang->latest_documents}</h2>
|
||||
<ul>
|
||||
<li loop="$latestDocumentList => $key,$value">
|
||||
{@$document = $value->variables}
|
||||
<a href="{getUrl('', 'document_srl', $document['document_srl'])}" target="_blank"><!--@if(trim($value->getTitle()))-->{$value->getTitle()}<!--@else--><strong>{$lang->no_title_document}</strong><!--@end--></a>
|
||||
<span class="side">{$value->getNickName()}</span>
|
||||
<form class="action" method="POST">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
||||
<input type="hidden" name="cart[]" value="{$document['document_srl']}" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
|
||||
<button type="submit" name="type" value="trash" class="x_icon-trash">{$lang->cmd_trash}</button>
|
||||
<button type="submit" name="type" value="delete" class="x_icon-remove">{$lang->cmd_delete}</button>
|
||||
</form>
|
||||
</li>
|
||||
<li cond="!is_array($latestDocumentList) || count($latestDocumentList) < 1">{$lang->no_data}</li>
|
||||
</ul>
|
||||
<div class="more">
|
||||
<dl>
|
||||
<dt>{$lang->menu_gnb_sub['document']}: </dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">{number_format($status->document->totalCount)} (<!--@if($status->document->todayCount > 0)-->+<!--@end-->{number_format($status->document->todayCount)})</a></dd>
|
||||
</dl>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}"><i>›</i> {$lang->more}</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="reply">
|
||||
<h2>{$lang->latest_comments}</h2>
|
||||
<ul>
|
||||
<li loop="$latestCommentList => $key,$value">
|
||||
<a href="{getUrl('', 'document_srl', $value->document_srl)}#comment_{$value->comment_srl}" target="_blank"><!--@if(trim($value->content))-->{$value->getSummary()}<!--@else--><strong>{$lang->no_text_comment}</strong><!--@end--></a>
|
||||
<span class="side">{$value->getNickName()}</span>
|
||||
<form class="action">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procCommentAdminDeleteChecked" />
|
||||
<input type="hidden" name="cart[]" value="{$value->comment_srl}" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
|
||||
<button type="submit" name="is_trash" value="true" class="x_icon-trash">{$lang->cmd_trash}</button>
|
||||
<button type="submit" name="is_trash" value="false" class="x_icon-remove">{$lang->cmd_delete}</button>
|
||||
</form>
|
||||
</li>
|
||||
<li cond="!is_array($latestCommentList) || count($latestCommentList) < 1">{$lang->no_data}</li>
|
||||
</ul>
|
||||
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
|
@ -751,7 +751,7 @@
|
|||
.x [class^="x_icon-"],
|
||||
.x [class*=" x_icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}
|
||||
/* White icons with optional class, or on hover/active states of certain elements */
|
||||
.x .x_icon-white,
|
||||
#gnb.gnb.open .x_icon-white,
|
||||
.x .x_nav-pills>.x_active>a>[class^="x_icon-"],
|
||||
.x .x_nav-pills>.x_active>a>[class*=" x_icon-"],
|
||||
.x .x_nav-list>.x_active>a>[class^="x_icon-"],
|
||||
|
|
@ -1591,4 +1591,4 @@ to{background-position:0 0}
|
|||
.x .x_hide{display:none}
|
||||
.x .x_show{display:block}
|
||||
.x .x_invisible{visibility:hidden}
|
||||
.x .x_affix{position:fixed}
|
||||
.x .x_affix{position:fixed}
|
||||
|
|
|
|||
|
|
@ -358,6 +358,9 @@ body>.x,
|
|||
.x_modal-backdrop {
|
||||
display: none;
|
||||
}
|
||||
.x_modal {
|
||||
top: 30px;
|
||||
}
|
||||
.x_modal-backdrop {
|
||||
opacity: .6;
|
||||
filter: alpha(opacity=60);
|
||||
|
|
@ -410,7 +413,7 @@ body>.x,
|
|||
min-width: 220px;
|
||||
}
|
||||
.x .x_form-horizontal .x_control-group {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.x input[type="text"],
|
||||
.x input[type="password"],
|
||||
|
|
@ -1421,6 +1424,9 @@ body>.x,
|
|||
.x .dashboard>div>.status dl a {
|
||||
color: #767676;
|
||||
}
|
||||
.x .dashboard>div>.member>h2:before {
|
||||
background-position: -168px 0px;
|
||||
}
|
||||
.x .dashboard>div>.document>h2:before {
|
||||
background-position: -264px -48px;
|
||||
}
|
||||
|
|
@ -1439,6 +1445,32 @@ body>.x,
|
|||
.x .dashboard>div>section>.more i {
|
||||
font: 12px Tahoma, Geneva, sans-serif;
|
||||
}
|
||||
.x .dashboard>div>section>.more dl {
|
||||
color: #767676;
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
zoom: 1;
|
||||
margin: 0 8px 0 0;
|
||||
padding: 1px 8px 0;
|
||||
font: 11px/1 돋움, Dotum, Arial, Helvetica, sans-serif;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 3px #999 inset;
|
||||
border-radius: 3px;
|
||||
min-width: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
.x .dashboard>div>section>.more dt {
|
||||
display: inline;
|
||||
font-weight: normal;
|
||||
}
|
||||
.x .dashboard>div>section>.more dd {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
}
|
||||
.x .dashboard>div>section>.more dl a {
|
||||
color: #767676;
|
||||
}
|
||||
|
||||
.x .dashboard>div>section ul {
|
||||
list-style: none;
|
||||
margin: 10px;
|
||||
|
|
|
|||
2
modules/admin/tpl/css/admin.min.css
vendored
2
modules/admin/tpl/css/admin.min.css
vendored
File diff suppressed because one or more lines are too long
|
|
@ -48,173 +48,13 @@
|
|||
</div>
|
||||
|
||||
<div class="dashboard">
|
||||
<div>
|
||||
<section class="status">
|
||||
<h2>{$lang->uv}</h2>
|
||||
<div style="margin:10px 15px;height:142px" id="visitors"></div>
|
||||
<div class="more">
|
||||
<dl>
|
||||
<dt>{$lang->menu_gnb['user']}: </dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}">{number_format($status->member->totalCount)} (<!--@if($status->member->todayCount > 0)-->+<!--@end-->{number_format($status->member->todayCount)})</a></dd>
|
||||
</dl>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCounterAdminIndex')}"><i>›</i> {$lang->details}</a>
|
||||
</div>
|
||||
</section>
|
||||
<section class="status">
|
||||
<h2>{$lang->pv}</h2>
|
||||
<div style="margin:10px 15px;height:142px" id="page_views"></div>
|
||||
<div class="more">
|
||||
<dl>
|
||||
<dt>{$lang->menu_gnb_sub['document']}: </dt><dd><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">{number_format($status->document->totalCount)} (<!--@if($status->document->todayCount > 0)-->+<!--@end-->{number_format($status->document->todayCount)})</a></dd>
|
||||
</dl>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCounterAdminIndex')}"><i>›</i> {$lang->details}</a>
|
||||
</div>
|
||||
</section>
|
||||
<style scoped>.jqplot-table-legend{background:#fff;top:13px!important}</style>
|
||||
</div>
|
||||
<div>
|
||||
<section class="document">
|
||||
<h2>{$lang->latest_documents}</h2>
|
||||
<ul>
|
||||
<li loop="$latestDocumentList => $key,$value">
|
||||
{@$document = $value->variables}
|
||||
<a href="{getUrl('', 'document_srl', $document['document_srl'])}" target="_blank"><!--@if(trim($value->getTitle()))-->{$value->getTitle()}<!--@else--><strong>{$lang->no_title_document}</strong><!--@end--></a>
|
||||
<span class="side">{$value->getNickName()}</span>
|
||||
<form class="action" method="POST">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
||||
<input type="hidden" name="cart[]" value="{$document['document_srl']}" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
|
||||
<button type="submit" name="type" value="trash" class="x_icon-trash">{$lang->cmd_trash}</button>
|
||||
<button type="submit" name="type" value="delete" class="x_icon-remove">{$lang->cmd_delete}</button>
|
||||
</form>
|
||||
</li>
|
||||
<li cond="!is_array($latestDocumentList) || count($latestDocumentList) < 1">{$lang->no_data}</li>
|
||||
</ul>
|
||||
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
||||
</section>
|
||||
<section class="reply">
|
||||
<h2>{$lang->latest_comments}</h2>
|
||||
<ul>
|
||||
<li loop="$latestCommentList => $key,$value">
|
||||
<a href="{getUrl('', 'document_srl', $value->document_srl)}#comment_{$value->comment_srl}" target="_blank"><!--@if(trim($value->content))-->{$value->getSummary()}<!--@else--><strong>{$lang->no_text_comment}</strong><!--@end--></a>
|
||||
<span class="side">{$value->getNickName()}</span>
|
||||
<form class="action">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procCommentAdminDeleteChecked" />
|
||||
<input type="hidden" name="cart[]" value="{$value->comment_srl}" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin')}" />
|
||||
<button type="submit" name="is_trash" value="true" class="x_icon-trash">{$lang->cmd_trash}</button>
|
||||
<button type="submit" name="is_trash" value="false" class="x_icon-remove">{$lang->cmd_delete}</button>
|
||||
</form>
|
||||
</li>
|
||||
<li cond="!is_array($latestCommentList) || count($latestCommentList) < 1">{$lang->no_data}</li>
|
||||
</ul>
|
||||
<p class="more"><a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}"><i>›</i> {$lang->more}</a></p>
|
||||
</section>
|
||||
</div>
|
||||
<block cond="$counterAddonActivated">
|
||||
<include target="./_dashboard_counter.html" />
|
||||
</block>
|
||||
<block cond="!$counterAddonActivated">
|
||||
<include target="./_dashboard_default.html" />
|
||||
</block>
|
||||
</div>
|
||||
</div>
|
||||
<include target="./_footer.html" />
|
||||
<script>
|
||||
xe.lang.this_week = '{$lang->this_week}';
|
||||
xe.lang.last_week = '{$lang->last_week}';
|
||||
xe.lang.next_week = '{$lang->next_week}';
|
||||
xe.lang.mon = '{$lang->mon}';
|
||||
xe.lang.tue = '{$lang->tue}';
|
||||
xe.lang.wed = '{$lang->wed}';
|
||||
xe.lang.thu = '{$lang->thu}';
|
||||
xe.lang.fri = '{$lang->fri}';
|
||||
xe.lang.sat = '{$lang->sat}';
|
||||
xe.lang.sun = '{$lang->sun}';
|
||||
|
||||
jQuery(function($)
|
||||
{
|
||||
// Dashboard portlet UI
|
||||
$('.dashboard>div>section>ul>li')
|
||||
.bind('mouseenter focusin', function(){
|
||||
$(this).addClass('hover').find('>.action').show();
|
||||
})
|
||||
.bind('mouseleave focusout', function()
|
||||
{
|
||||
if(!$(this).find(':focus').length)
|
||||
{
|
||||
$(this).removeClass('hover').find('>.action').hide();
|
||||
}
|
||||
});
|
||||
|
||||
// check browser version
|
||||
if($.browser.msie == true ) {
|
||||
var arrBrowserVersion = $.browser.version.split('.');
|
||||
if(parseInt(arrBrowserVersion[0]) <= 8) {
|
||||
$('#checkBrowserMessage').show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function obj2Array(htObj)
|
||||
{
|
||||
var aRes = [];
|
||||
|
||||
for(var x in htObj)
|
||||
{
|
||||
if(!htObj.hasOwnProperty(x)) continue;
|
||||
aRes.push(htObj[x]);
|
||||
}
|
||||
|
||||
return aRes;
|
||||
}
|
||||
|
||||
jQuery(function ($)
|
||||
{
|
||||
$.exec_json("counter.getWeeklyUniqueVisitor", {}, function(htRes)
|
||||
{
|
||||
var aLastWeek = obj2Array(htRes.last_week.list);
|
||||
var aThisWeek = obj2Array(htRes.this_week.list);
|
||||
|
||||
drawChart("visitors", "Weekly Visitors", aLastWeek, aThisWeek);
|
||||
});
|
||||
|
||||
$.exec_json("counter.getWeeklyPageView", {}, function(htRes)
|
||||
{
|
||||
var aLastWeek = obj2Array(htRes.last_week.list);
|
||||
var aThisWeek = obj2Array(htRes.this_week.list);
|
||||
|
||||
drawChart("page_views", "Weekly Page Views", aLastWeek, aThisWeek);
|
||||
});
|
||||
});
|
||||
|
||||
function drawChart(sContainerId, sTitle, aLastWeek, aThisWeek)
|
||||
{
|
||||
$ = jQuery;
|
||||
|
||||
var s1 = aLastWeek;
|
||||
var s2 = aThisWeek;
|
||||
// Can specify a custom tick Array.
|
||||
// Ticks should match up one for each y value (category) in the series.
|
||||
var ticks = [xe.lang.sun,xe.lang.mon,xe.lang.tue,xe.lang.wed,xe.lang.thu,xe.lang.fri,xe.lang.sat];
|
||||
|
||||
var plot1 = $.jqplot(sContainerId, [s1, s2], {
|
||||
seriesDefaults:{
|
||||
renderer:$.jqplot.BarRenderer,
|
||||
rendererOptions: {fillToZero: true}
|
||||
},
|
||||
series:[
|
||||
{label: xe.lang.last_week},
|
||||
{label: xe.lang.this_week}
|
||||
],
|
||||
legend:
|
||||
{
|
||||
show: true,
|
||||
placement: 'outsideGrid'
|
||||
},
|
||||
axes: {
|
||||
xaxis: {
|
||||
renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks
|
||||
},
|
||||
yaxis: {
|
||||
min: 0, ticks: 1, pad: 1.05
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -422,6 +422,14 @@ jQuery(function($){
|
|||
var zIndex = xeModalInitailZIndex + ((xeModalStack.length - 1) * 2);
|
||||
|
||||
$xeModalBackdrop.css('z-index', zIndex).show();
|
||||
var xeModalBackdropHeight = $xeModalBackdrop.height();
|
||||
var modalBodyHeight = xeModalBackdropHeight;
|
||||
modalBodyHeight -= $modal.find('.x_modal-header:visible').height();
|
||||
modalBodyHeight -= $modal.find('.x_modal-footer:visible').height();
|
||||
modalBodyHeight -= 150;
|
||||
|
||||
$modal.find('.x_modal-body').css('height', modalBodyHeight);
|
||||
|
||||
$modal.css('z-index', zIndex + 1);
|
||||
})
|
||||
.bind('close.mw', function(){
|
||||
|
|
|
|||
4
modules/admin/tpl/js/admin.min.js
vendored
4
modules/admin/tpl/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -76,6 +76,15 @@ class boardController extends board
|
|||
$bAnonymous = false;
|
||||
}
|
||||
|
||||
if((!$obj->status && $obj->is_secret == 'Y') || strtoupper($obj->status == 'SECRET'))
|
||||
{
|
||||
$use_status = explode('|@|', $this->module_info->use_status);
|
||||
if(!is_array($use_status) || !in_array('SECRET', $use_status))
|
||||
{
|
||||
$obj->status = 'PUBLIC';
|
||||
}
|
||||
}
|
||||
|
||||
// update the document if it is existed
|
||||
if($oDocument->isExists() && $oDocument->document_srl == $obj->document_srl)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
<condition operation="like" column="mid" var="s_mid" pipe="or" />
|
||||
<condition operation="like" column="browser_title" var="s_browser_title" pipe="or" />
|
||||
<condition operation="like" column="comment" var="s_comment" pipe="or" />
|
||||
<condition operation="equal" column="module_category_srl" var="s_module_category_srl" pipe="or" />
|
||||
</group>
|
||||
<condition operation="equal" column="module_category_srl" var="s_module_category_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="module_srl" order="desc" />
|
||||
|
|
|
|||
|
|
@ -89,8 +89,9 @@
|
|||
<form action="" class="search x_input-append center" no-error-return-url="true">
|
||||
<input loop="$param => $key, $val" cond="!in_array($key, array('mid', 'vid', 'act', 'page', 'search_target', 'search_keyword'))" type="hidden" name="{$key}" value="{$val}" />
|
||||
<select cond="count($module_category)" name="module_category_srl" title="{$lang->module_category}" style="margin-right:4px">
|
||||
<option value="" selected="selected"|cond="!$module_category_srl">{$lang->all}</option>
|
||||
<option value="0" selected="selected"|cond="$module_category_srl==='0'">{$lang->not_exists}</option>
|
||||
<option value="{$key}" loop="$module_category => $key,$val" selected="selected"|cond="$module_category==$key">{$val->title}</option>
|
||||
<option value="{$key}" loop="$module_category => $key,$val" selected="selected"|cond="$module_category_srl==$key">{$val->title}</option>
|
||||
</select>
|
||||
<select name="search_target" title="{$lang->search_target}" style="margin-right:4px">
|
||||
<option value="mid" selected="selected"|cond="$search_target=='mid'">{$lang->mid}</option>
|
||||
|
|
@ -124,4 +125,4 @@ jQuery(function($){
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ class commentAdminController extends comment
|
|||
$obj->module_srl = $originObject->module_srl;
|
||||
|
||||
$oCommentController = getController('comment');
|
||||
$output = $oCommentController->insertComment($obj);
|
||||
$output = $oCommentController->insertComment($obj, true);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -300,6 +300,10 @@ class commentController extends comment
|
|||
{
|
||||
$obj->comment_srl = getNextSequence();
|
||||
}
|
||||
elseif(!$is_admin && !$manual_inserted && !checkUserSequence($obj->comment_srl))
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
// determine the order
|
||||
$obj->list_order = getNextSequence() * -1;
|
||||
|
|
@ -516,18 +520,22 @@ class commentController extends comment
|
|||
$oMail->setSender($obj->email_address, $obj->email_address);
|
||||
$mail_title = "[XE - " . Context::get('mid') . "] A new comment was posted on document: \"" . $oDocument->getTitleText() . "\"";
|
||||
$oMail->setTitle($mail_title);
|
||||
$url_comment = getFullUrl('','document_srl',$obj->document_srl).'#comment_'.$obj->comment_srl;
|
||||
if($using_validation)
|
||||
{
|
||||
$url_approve = getFullUrl('', 'module', 'comment', 'act', 'procCommentAdminChangePublishedStatusChecked', 'cart[]', $obj->comment_srl, 'will_publish', '1', 'search_target', 'is_published', 'search_keyword', 'N');
|
||||
$url_trash = getFullUrl('', 'module', 'comment', 'act', 'procCommentAdminDeleteChecked', 'cart[]', $obj->comment_srl, 'search_target', 'is_trash', 'search_keyword', 'true');
|
||||
$url_approve = getFullUrl('', 'module', 'admin', 'act', 'procCommentAdminChangePublishedStatusChecked', 'cart[]', $obj->comment_srl, 'will_publish', '1', 'search_target', 'is_published', 'search_keyword', 'N');
|
||||
$url_trash = getFullUrl('', 'module', 'admin', 'act', 'procCommentAdminDeleteChecked', 'cart[]', $obj->comment_srl, 'search_target', 'is_trash', 'search_keyword', 'true');
|
||||
$mail_content = "
|
||||
A new comment on the document \"" . $oDocument->getTitleText() . "\" is waiting for your approval.
|
||||
<br />
|
||||
<br />
|
||||
Author: " . $member_info->nick_name . "
|
||||
<br />Author e-mail: " . $member_info->email_address . "
|
||||
<br />From : <a href=\"" . $url_comment . "\">" . $url_comment . "</a>
|
||||
<br />Comment:
|
||||
<br />\"" . $obj->content . "\"
|
||||
<br />Document:
|
||||
<br />\"" . $oDocument->getContentText(). "\"
|
||||
<br />
|
||||
<br />
|
||||
Approve it: <a href=\"" . $url_approve . "\">" . $url_approve . "</a>
|
||||
|
|
@ -542,8 +550,11 @@ class commentController extends comment
|
|||
$mail_content = "
|
||||
Author: " . $member_info->nick_name . "
|
||||
<br />Author e-mail: " . $member_info->email_address . "
|
||||
<br />From : <a href=\"" . $url_comment . "\">" . $url_comment . "</a>
|
||||
<br />Comment:
|
||||
<br />\"" . $obj->content . "\"
|
||||
<br />Document:
|
||||
<br />\"" . $oDocument->getContentText(). "\"
|
||||
";
|
||||
$oMail->setContent($mail_content);
|
||||
|
||||
|
|
@ -1096,7 +1107,17 @@ class commentController extends comment
|
|||
$_SESSION['voted_comment'][$comment_srl] = TRUE;
|
||||
|
||||
// Return the result
|
||||
return new Object(0, $success_message);
|
||||
$output = new Object(0, $success_message);
|
||||
if($point > 0)
|
||||
{
|
||||
$output->add('voted_count', $obj->after_point);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->add('blamed_count', $obj->after_point);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -385,6 +385,7 @@ class commentModel extends comment
|
|||
$args->module_srl = $obj->module_srl;
|
||||
}
|
||||
|
||||
$args->document_srl = $obj->document_srl;
|
||||
$args->list_count = $obj->list_count;
|
||||
|
||||
if(strpos($args->module_srl, ",") === false)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<conditions>
|
||||
<condition operation="equal" column="status" var="status" pipe="and" />
|
||||
<condition operation="in" column="module_srl" var="module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
|
|
|
|||
|
|
@ -234,6 +234,7 @@ class documentController extends document
|
|||
if(!$output->toBool()) return $output;
|
||||
// Register it if no given document_srl exists
|
||||
if(!$obj->document_srl) $obj->document_srl = getNextSequence();
|
||||
elseif(!$manual_inserted && !$isRestore && !checkUserSequence($obj->document_srl)) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
// Set to 0 if the category_srl doesn't exist
|
||||
|
|
@ -518,7 +519,7 @@ class documentController extends document
|
|||
{
|
||||
foreach($extra_keys as $idx => $extra_item)
|
||||
{
|
||||
$value = '';
|
||||
$value = NULL;
|
||||
if(isset($obj->{'extra_vars'.$idx}))
|
||||
{
|
||||
$tmp = $obj->{'extra_vars'.$idx};
|
||||
|
|
@ -528,7 +529,7 @@ class documentController extends document
|
|||
$value = trim($tmp);
|
||||
}
|
||||
else if(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
|
||||
if(!isset($value)) continue;
|
||||
if($value == NULL) continue;
|
||||
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
|
||||
}
|
||||
}
|
||||
|
|
@ -1142,14 +1143,19 @@ class documentController extends document
|
|||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
|
||||
// Return result
|
||||
$output = new Object();
|
||||
if($point > 0)
|
||||
{
|
||||
return new Object(0, 'success_voted');
|
||||
$output->setMessage('success_voted');
|
||||
$output->add('voted_count', $obj->after_point);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Object(0, 'success_blamed');
|
||||
$output->setMessage('success_blamed');
|
||||
$output->add('blamed_count', $obj->after_point);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -24,8 +24,8 @@
|
|||
var align = (node.style.cssFloat) ? node.style.cssFloat : node.style.styleFloat;
|
||||
var margin = (node.style.margin) ? node.style.margin.match('[0-9]+') : node.getAttribute('margin');
|
||||
var alt = node.getAttribute('alt');
|
||||
var width = $(node).width();
|
||||
var height = $(node).height();
|
||||
var width = node.getAttribute('width');
|
||||
var height = node.getAttribute('height');
|
||||
var link_url = node.getAttribute('link_url');
|
||||
var open_window = node.getAttribute('open_window');
|
||||
|
||||
|
|
|
|||
|
|
@ -493,6 +493,8 @@ class editorModel extends editor
|
|||
$oEditorController->deleteSavedDoc(false);
|
||||
$oEditorController->doSaveDoc($saved_doc);
|
||||
|
||||
setUserSequence($saved_doc->document_srl);
|
||||
|
||||
return $saved_doc;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ function insertUploadedFile(editorSequence) {
|
|||
temp_code = '';
|
||||
temp_code += "<img src=\""+file.download_url+"\" alt=\""+file.source_filename+"\"";
|
||||
if(obj.complete === true) { temp_code += " width=\""+obj.width+"\" height=\""+obj.height+"\""; }
|
||||
temp_code += " />\r\n";
|
||||
temp_code += " />\r\n<p><br /></p>\r\n";
|
||||
text.push(temp_code);
|
||||
} else {
|
||||
// 이미지외의 경우는 multimedia_link 컴포넌트 연결
|
||||
|
|
|
|||
2
modules/editor/tpl/js/uploader.min.js
vendored
2
modules/editor/tpl/js/uploader.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -92,7 +92,7 @@ class fileAdminModel extends file
|
|||
if($_SESSION['file_management'][$file->file_srl]) $file->isCarted = true;
|
||||
else $file->isCarted = false;
|
||||
|
||||
$file->download_url = $oFileModel->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$file->download_url = $oFileModel->getDownloadUrl($file->file_srl, $file->sid, $file->module_srl);
|
||||
$output->data[$key] = $file;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,8 @@ class fileController extends file
|
|||
{
|
||||
$oFileModel = getModel('file');
|
||||
|
||||
if(isset($this->grant->access) && $this->grant->access !== true) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$file_srl = Context::get('file_srl');
|
||||
$sid = Context::get('sid');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class fileModel extends file
|
|||
$obj->source_filename = $file_info->source_filename;
|
||||
$obj->file_size = $file_info->file_size;
|
||||
$obj->disp_file_size = FileHandler::filesize($file_info->file_size);
|
||||
if($file_info->direct_download=='N') $obj->download_url = $this->getDownloadUrl($file_info->file_srl, $file_info->sid);
|
||||
if($file_info->direct_download=='N') $obj->download_url = $this->getDownloadUrl($file_info->file_srl, $file_info->sid, $file_info->module_srl);
|
||||
else $obj->download_url = str_replace('./', '', $file_info->uploaded_filename);
|
||||
$obj->direct_download = $file_info->direct_download;
|
||||
$files[] = $obj;
|
||||
|
|
@ -95,9 +95,9 @@ class fileModel extends file
|
|||
* @param string $sid
|
||||
* @return string Returns a url
|
||||
*/
|
||||
function getDownloadUrl($file_srl, $sid)
|
||||
function getDownloadUrl($file_srl, $sid, $module_srl="")
|
||||
{
|
||||
return sprintf('?module=%s&act=%s&file_srl=%s&sid=%s', 'file', 'procFileDownload', $file_srl, $sid);
|
||||
return sprintf('?module=%s&act=%s&file_srl=%s&sid=%s&module_srl=%s', 'file', 'procFileDownload', $file_srl, $sid, $module_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -164,7 +164,7 @@ class fileModel extends file
|
|||
if(count($output->data) == 1)
|
||||
{
|
||||
$file = $output->data[0];
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid, $file->module_srl);
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ class fileModel extends file
|
|||
foreach($output->data as $key=>$value)
|
||||
{
|
||||
$file = $value;
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid, $file->module_srl);
|
||||
$fileList[] = $file;
|
||||
}
|
||||
}
|
||||
|
|
@ -211,7 +211,7 @@ class fileModel extends file
|
|||
{
|
||||
$file = $file_list[$i];
|
||||
$file->source_filename = stripslashes($file->source_filename);
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid, $file->module_srl);
|
||||
$file_list[$i] = $file;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1009,6 +1009,7 @@ class importerAdminController extends importer
|
|||
$started = false;
|
||||
$buff = null;
|
||||
|
||||
$file_obj = new stdClass;
|
||||
while(!feof($fp))
|
||||
{
|
||||
$str = trim(fgets($fp, 1024));
|
||||
|
|
@ -1017,7 +1018,6 @@ class importerAdminController extends importer
|
|||
// If it starts with <attach>, collect attachments
|
||||
if(trim($str) == '<attach>')
|
||||
{
|
||||
$file_obj = new stdClass;
|
||||
$file_obj->file_srl = getNextSequence();
|
||||
$file_obj->upload_target_srl = $upload_target_srl;
|
||||
$file_obj->module_srl = $module_srl;
|
||||
|
|
|
|||
|
|
@ -335,8 +335,8 @@ class installAdminController extends install
|
|||
list($width, $height, $type_no, $attrs) = @getimagesize($target_file);
|
||||
if($iconname == 'favicon.ico')
|
||||
{
|
||||
if(!preg_match('/^.*(icon).*$/',$type)) {
|
||||
Context::set('msg', '*.icon '.Context::getLang('msg_possible_only_file'));
|
||||
if(!preg_match('/^.*\.ico$/i',$type)) {
|
||||
Context::set('msg', '*.ico '.Context::getLang('msg_possible_only_file'));
|
||||
return;
|
||||
}
|
||||
if($width && $height && ($width != '16' || $height != '16')) {
|
||||
|
|
@ -346,7 +346,7 @@ class installAdminController extends install
|
|||
}
|
||||
else if($iconname == 'mobicon.png')
|
||||
{
|
||||
if(!preg_match('/^.*(png).*$/',$type)) {
|
||||
if(!preg_match('/^.*\.png$/i',$type)) {
|
||||
Context::set('msg', '*.png '.Context::getLang('msg_possible_only_file'));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,9 +167,14 @@ class installController extends install
|
|||
if(!$oDB->isConnected()) return $oDB->getError();
|
||||
|
||||
// Install all the modules
|
||||
$oDB->begin();
|
||||
$this->installDownloadedModule();
|
||||
$oDB->commit();
|
||||
try {
|
||||
$oDB->begin();
|
||||
$this->installDownloadedModule();
|
||||
$oDB->commit();
|
||||
} catch(Exception $e) {
|
||||
$oDB->rollback();
|
||||
return new Object(-1, $e->getMessage());
|
||||
}
|
||||
|
||||
// Create a config file
|
||||
if(!$this->makeConfigFile()) return new Object(-1, 'msg_install_failed');
|
||||
|
|
@ -515,6 +520,8 @@ class installController extends install
|
|||
$file = trim($schema_files[$i]);
|
||||
if(!$file || substr($file,-4)!='.xml') continue;
|
||||
$output = $oDB->createTableByXmlFile($file);
|
||||
if($output === false)
|
||||
throw new Exception('msg_create_table_failed');
|
||||
}
|
||||
// Create a table and module instance and then execute install() method
|
||||
unset($oModule);
|
||||
|
|
|
|||
|
|
@ -808,6 +808,10 @@
|
|||
<value xml:lang="tr"><![CDATA[Kurulum dosyası oluşturulurken bir hata oluştu.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Đã có lỗi xảy ra khi tạo File cài đặt.]]></value>
|
||||
</item>
|
||||
<item name="msg_create_table_failed">
|
||||
<value xml:lang="ko"><![CDATA[DB 테이블 생성에 실패했습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Failed to create database tables.]]></value>
|
||||
</item>
|
||||
<item name="ftp_get_list">
|
||||
<value xml:lang="ko"><![CDATA[목록 가져오기]]></value>
|
||||
<value xml:lang="en"><![CDATA[Get List]]></value>
|
||||
|
|
|
|||
|
|
@ -509,6 +509,12 @@
|
|||
<value xml:lang="tr"><![CDATA[Geçici Zaman Sınırı]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Hạn sử dụng]]></value>
|
||||
</item>
|
||||
<item name="limit_day_description">
|
||||
<value xml:lang="ko"><![CDATA[임시 제한 일자 설명]]></value>
|
||||
<value xml:lang="en"><![CDATA[Description for Temporary Limit Date]]></value>
|
||||
<value xml:lang="jp"><![CDATA[一時的な期限日の説明]]></value>
|
||||
</item>
|
||||
|
||||
<item name="limit_date">
|
||||
<value xml:lang="ko"><![CDATA[제한일]]></value>
|
||||
<value xml:lang="en"><![CDATA[Limit Date]]></value>
|
||||
|
|
@ -2335,6 +2341,10 @@
|
|||
<value xml:lang="zh-CN"><![CDATA[可设定密码更新周期,将会定期通知更换密码。 (设为零则不适用)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Eğer buna bir değer biçerseniz, şifrenizi belirli aralıklarla değiştirmeniz konusunda bildirim alacaksanız (eğer 0 olarak ayarlandıysa, devredışıdır)]]></value>
|
||||
</item>
|
||||
<item name="msg_change_password_date">
|
||||
<value xml:lang="ko"><![CDATA[%s일 동안 비밀번호를 변경하지 않았습니다. 개인정보 보호를 위하여 비밀번호를 변경해야 합니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You have not changed the password during %s days. For personal information protection, you need to change the password.]]></value>
|
||||
</item>
|
||||
<item name="login_trial_limit1">
|
||||
<value xml:lang="ko"><![CDATA[로그인 시도 횟수 제한 횟수]]></value>
|
||||
<value xml:lang="en"><![CDATA[Sign in trial limit]]></value>
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ class memberAdminController extends member
|
|||
|
||||
$args = Context::gets(
|
||||
'limit_day',
|
||||
'limit_day_description',
|
||||
'agreement',
|
||||
'redirect_url',
|
||||
'profile_image', 'profile_image_max_width', 'profile_image_max_height',
|
||||
|
|
@ -474,7 +475,7 @@ class memberAdminController extends member
|
|||
}
|
||||
else if($formInfo->name == 'password')
|
||||
{
|
||||
$fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="6:20" /></field>';
|
||||
$fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="4:20" /></field>';
|
||||
$fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>';
|
||||
}
|
||||
else if($formInfo->name == 'find_account_question')
|
||||
|
|
@ -830,7 +831,6 @@ class memberAdminController extends member
|
|||
{
|
||||
$args->denied = $var->denied;
|
||||
$output = executeQuery('member.updateMemberDeniedInfo', $args);
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
|
|
@ -852,6 +852,7 @@ class memberAdminController extends member
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
}
|
||||
$oMemberController->_clearMemberCache($args->member_srl);
|
||||
}
|
||||
|
||||
$message = $var->message;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class memberAdminView extends member
|
|||
}
|
||||
}
|
||||
$config = $this->memberConfig;
|
||||
$memberIdentifiers = array('user_id'=>'user_id', 'user_name'=>'user_name', 'nick_name'=>'nick_name');
|
||||
$memberIdentifiers = array('email_address'=>'email_address', 'user_id'=>'user_id', 'user_name'=>'user_name', 'nick_name'=>'nick_name');
|
||||
$usedIdentifiers = array();
|
||||
|
||||
if(is_array($config->signupForm))
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ class memberController extends member
|
|||
$oMemberModel = getModel('member');
|
||||
if($this->memberInfo->change_password_date < date ('YmdHis', strtotime ('-' . $limit_date . ' day')))
|
||||
{
|
||||
$this->setRedirectUrl(getNotEncodedUrl('','vid',Context::get('vid'),'mid',Context::get('mid'),'act','dispMemberModifyPassword'));
|
||||
return;
|
||||
$msg = sprintf(Context::getLang('msg_change_password_date'), $limit_date);
|
||||
return $this->setRedirectUrl(getNotEncodedUrl('','vid',Context::get('vid'),'mid',Context::get('mid'),'act','dispMemberModifyPassword'), new Object(-1, $msg));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -370,11 +370,16 @@ class memberController extends member
|
|||
{
|
||||
if($config->identifier == 'email_address')
|
||||
{
|
||||
$this->doLogin($args->email_address);
|
||||
$output = $this->doLogin($args->email_address);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->doLogin($args->user_id);
|
||||
$output = $this->doLogin($args->user_id);
|
||||
}
|
||||
if(!$output->toBool()) {
|
||||
if($output->error == -9)
|
||||
$output->error = -11;
|
||||
return $this->setRedirectUrl(getUrl('', 'act', 'dispMemberLoginForm'), $output);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -385,6 +390,7 @@ class memberController extends member
|
|||
{
|
||||
$msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $args->email_address);
|
||||
$this->setMessage($msg);
|
||||
return $this->setRedirectUrl(getUrl('', 'act', 'dispMemberLoginForm'), new Object(-12, $msg));
|
||||
}
|
||||
else $this->setMessage('success_registed');
|
||||
// Call a trigger (after)
|
||||
|
|
@ -408,7 +414,7 @@ class memberController extends member
|
|||
}
|
||||
}
|
||||
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
$this->_clearMemberCache($args->member_srl, $site_module_info->site_srl);
|
||||
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
|
@ -557,7 +563,6 @@ class memberController extends member
|
|||
// Get user_id information
|
||||
$this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
|
||||
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
|
||||
// Call a trigger after successfully log-in (after)
|
||||
$trigger_output = ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo);
|
||||
|
|
@ -568,7 +573,8 @@ class memberController extends member
|
|||
$this->add('member_srl', $args->member_srl);
|
||||
$this->setMessage('success_updated');
|
||||
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$this->_clearMemberCache($args->member_srl, $site_module_info->site_srl);
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispMemberInfo');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
|
|
@ -646,8 +652,6 @@ class memberController extends member
|
|||
// Return success message
|
||||
$this->setMessage('success_leaved');
|
||||
|
||||
$this->_clearMemberCache($member_srl);
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
|
@ -1100,7 +1104,8 @@ class memberController extends member
|
|||
if(!$output->toBool()) return $this->stop($output->getMessage());
|
||||
// Remove all values having the member_srl from authentication table
|
||||
executeQuery('member.deleteAuthMail',$args);
|
||||
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
|
||||
// Notify the result
|
||||
|
|
@ -1301,7 +1306,6 @@ class memberController extends member
|
|||
list($args->email_id, $args->email_host) = explode('@', $newEmail);
|
||||
|
||||
$output = executeQuery('member.updateMemberEmailAddress', $args);
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $this->stop($output->getMessage());
|
||||
|
|
@ -1420,7 +1424,7 @@ class memberController extends member
|
|||
$output = executeQuery('member.deleteMembersGroup', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$this->setMessage('success_deleted');
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
$this->_clearMemberCache($args->member_srl, $site_module_info->site_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1515,7 +1519,7 @@ class memberController extends member
|
|||
$output = executeQuery('member.addMemberToGroup',$args);
|
||||
$output2 = ModuleHandler::triggerCall('member.addMemberToGroup', 'after', $args);
|
||||
|
||||
$this->_clearMemberCache($member_srl);
|
||||
$this->_clearMemberCache($member_srl, $site_srl);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -1555,7 +1559,7 @@ class memberController extends member
|
|||
$output = executeQuery('member.addMemberToGroup', $obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->_clearMemberCache($obj->member_srl);
|
||||
$this->_clearMemberCache($obj->member_srl, $args->site_srl);
|
||||
}
|
||||
|
||||
return new Object();
|
||||
|
|
@ -1729,12 +1733,13 @@ class memberController extends member
|
|||
return new Object(-1,'msg_user_denied');
|
||||
}
|
||||
// Notify if denied_date is less than the current time
|
||||
if($this->memberInfo->limit_date && substr($this->memberInfo->limit_date,0,8) >= date("Ymd")) return new Object(-1,sprintf(Context::getLang('msg_user_limited'),zdate($this->memberInfo->limit_date,"Y-m-d")));
|
||||
if($this->memberInfo->limit_date && substr($this->memberInfo->limit_date,0,8) >= date("Ymd")) return new Object(-9,sprintf(Context::getLang('msg_user_limited'),zdate($this->memberInfo->limit_date,"Y-m-d")));
|
||||
// Update the latest login time
|
||||
$args->member_srl = $this->memberInfo->member_srl;
|
||||
$output = executeQuery('member.updateLastLogin', $args);
|
||||
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$this->_clearMemberCache($args->member_srl, $site_module_info->site_srl);
|
||||
|
||||
// Check if there is recoding table.
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -2199,7 +2204,7 @@ class memberController extends member
|
|||
$oDB->commit();
|
||||
|
||||
//remove from cache
|
||||
$this->_clearMemberCache($args->member_srl);
|
||||
$this->_clearMemberCache($args->member_srl, $args->site_srl);
|
||||
|
||||
// Save Session
|
||||
if(!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
|
||||
|
|
@ -2693,6 +2698,13 @@ class memberController extends member
|
|||
$object_key = 'member_groups:' . getNumberingPath($member_srl) . $member_srl . '_' . $site_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
|
||||
if($site_srl !== 0)
|
||||
{
|
||||
$object_key = 'member_groups:' . getNumberingPath($member_srl) . $member_srl . '_0';
|
||||
$cache_key = $oCacheHandler->getGroupKey('member', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
|
|
|
|||
|
|
@ -415,8 +415,17 @@ class memberView extends member
|
|||
$config = $this->member_config;
|
||||
Context::set('identifier', $config->identifier);
|
||||
|
||||
$XE_VALIDATOR_MESSAGE = Context::get('XE_VALIDATOR_MESSAGE');
|
||||
$XE_VALIDATOR_ERROR = Context::get('XE_VALIDATOR_ERROR');
|
||||
if($XE_VALIDATOR_ERROR == -11)
|
||||
Context::set('XE_VALIDATOR_MESSAGE', $XE_VALIDATOR_MESSAGE . $config->limit_day_description);
|
||||
|
||||
if($XE_VALIDATOR_ERROR < -10 && $XE_VALIDATOR_ERROR > -21)
|
||||
Context::set('referer_url', '/');
|
||||
else
|
||||
Context::set('referer_url', htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
|
||||
|
||||
// Set a template file
|
||||
Context::set('referer_url', htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
|
||||
$this->setTemplateFile('login_form');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/default/find_member_account/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form action="/" method="get" ruleset="findAccount">
|
||||
<form action="{getUrl('')}" method="get" ruleset="findAccount">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="procMemberFindAccount" />
|
||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
<h1><i class="icon-user"></i> {$lang->cmd_login}</h1>
|
||||
</div>
|
||||
<div class="login-body">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/default/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="@login" action="./" method="post" id="fo_member_login">
|
||||
<form ruleset="@login" action="{getUrl('')}" method="post" id="fo_member_login">
|
||||
<input type="hidden" name="success_return_url" value="{$referer_url}" />
|
||||
<input type="hidden" name="act" value="procMemberLogin" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/skin/default/1" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/skins" />
|
||||
<fieldset>
|
||||
<div class="control-group">
|
||||
<input type="text" cond="$identifier == 'user_id'" name="user_id" id="uid" required placeholder="{$lang->user_id}" title="{$lang->user_id}" />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<include target="./common_header.html" />
|
||||
<h1>{$member_title = $lang->cmd_modify_member_password}</h1>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins/default/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="modifyPassword" id="fo_insert_member" action="./" method="post">
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
<!--%load_js_plugin("ui.datepicker")-->
|
||||
<include target="./common_header.html" />
|
||||
<h1 style="border-bottom:1px solid #ccc">{$lang->cmd_signup}</h1>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins/default/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skins'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="@insertMember" id="fo_insert_member" action="./" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
<input type="hidden" name="act" value="procMemberInsert" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/skins/default/1" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/member/skins" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('act','dispMemberInfo')}" />
|
||||
<div class="agreement" cond="$member_config->agreement">
|
||||
<div class="text">
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
<!--@end-->
|
||||
</select>
|
||||
<select name="search_target" style="margin-right:4px" title="{$lang->search_target}">
|
||||
{@$lang->search_target_list = array_merge($lang->search_target_list, $usedIdentifiers)}
|
||||
{@$lang->search_target_list = array_merge($usedIdentifiers, $lang->search_target_list)}
|
||||
<option value="{$key}" loop="$lang->search_target_list=>$key,$val" selected="selected"|cond="$search_target==$key">{$val}</option>
|
||||
</select>
|
||||
<input type="search" name="search_keyword" value="{htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" style="width:140px">
|
||||
|
|
@ -154,7 +154,12 @@
|
|||
<h3>{$lang->member_group}</h3>
|
||||
<label loop="$group_list => $key,$val" for="g{$val->group_srl}" class="x_inline"><input type="checkbox" name="groups[]" id="g{$val->group_srl}" value="{$val->group_srl}"/> {$val->title}</label>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-group _moveTarget" hidden>
|
||||
<h3>{$lang->denied}</h3>
|
||||
<label class="x_inline" for="appoval"><input type="radio" name="denied" id="appoval" value="N" /> {$lang->approval}</label>
|
||||
<label class="x_inline" for="deny"><input type="radio" name="denied" id="deny" value="Y" /> {$lang->denied}</label>
|
||||
</div>
|
||||
<div class="x_control-group _moveTarget" hidden>
|
||||
<h3>{$lang->about_send_message}</h3>
|
||||
<textarea rows="5" cols="42" id="message" style="width:98%" name="message" title="{$lang->about_send_message}"></textarea>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<div class="x_controls">
|
||||
<input type="number" min="0" id="limit_day" name="limit_day" value="{$config->limit_day}" /> {$lang->unit_day}
|
||||
<p class="x_help-block">{$lang->about_limit_day}</p>
|
||||
<input type="text" name="limit_day_description" value="{$config->limit_day_description}" placeholder="{$lang->limit_day_description}" style="width:90%" class="lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
|
|||
|
|
@ -1877,11 +1877,9 @@ class menuAdminController extends menu
|
|||
$url = str_replace(array('&','"','<','>'),array('&','"','<','>'),$node->url);
|
||||
if(preg_match('/^([0-9a-zA-Z\_\-]+)$/', $node->url))
|
||||
{
|
||||
$href = getSiteUrl($domain, '','mid',$node->url);
|
||||
$pos = strpos($href, $_SERVER['HTTP_HOST']);
|
||||
if($pos !== false) $href = substr($href, $pos+strlen($_SERVER['HTTP_HOST']));
|
||||
$href = "getSiteUrl('$domain', '','mid','$node->url')";
|
||||
}
|
||||
else $href = $url;
|
||||
else $href = sprintf('"%s"', $url);
|
||||
$is_shortcut = $node->is_shortcut;
|
||||
$open_window = $node->open_window;
|
||||
$expand = $node->expand;
|
||||
|
|
@ -1912,7 +1910,7 @@ class menuAdminController extends menu
|
|||
if($group_srls)$group_check_code = sprintf('($is_admin==true||(is_array($group_srls)&&count(array_intersect($group_srls, array(%s))))||($is_logged&&%s))',$group_srls,$group_srls == -1?1:0);
|
||||
else $group_check_code = "true";
|
||||
$attribute = sprintf(
|
||||
'node_srl="%s" parent_srl="%s" menu_name_key=\'%s\' text="<?php if(%s) { %s }?>" url="<?php print(%s?"%s":"")?>" href="<?php print(%s?"%s":"")?>" is_shortcut="%s" open_window="%s" expand="%s" normal_btn="%s" hover_btn="%s" active_btn="%s" link="<?php if(%s) {?>%s<?php }?>"',
|
||||
'node_srl="%s" parent_srl="%s" menu_name_key=\'%s\' text="<?php if(%s) { %s }?>" url="<?php print(%s?"%s":"")?>" href="<?php print(%s?%s:"")?>" is_shortcut="%s" open_window="%s" expand="%s" normal_btn="%s" hover_btn="%s" active_btn="%s" link="<?php if(%s) {?>%s<?php }?>"',
|
||||
$menu_item_srl,
|
||||
$node->parent_srl,
|
||||
addslashes($node->name),
|
||||
|
|
@ -1980,11 +1978,9 @@ class menuAdminController extends menu
|
|||
$url = str_replace(array('&','"','<','>'),array('&','"','<','>'),$node->url);
|
||||
if(preg_match('/^([0-9a-zA-Z\_\-]+)$/i', $node->url))
|
||||
{
|
||||
$href = getSiteUrl($domain, '','mid',$node->url);
|
||||
$pos = strpos($href, $_SERVER['HTTP_HOST']);
|
||||
if($pos !== false) $href = substr($href, $pos+strlen($_SERVER['HTTP_HOST']));
|
||||
$href = "getSiteUrl('$domain', '','mid','$node->url')";
|
||||
}
|
||||
else $href = $url;
|
||||
else $href = sprintf('"%s"', $url);
|
||||
$is_shortcut = $node->is_shortcut;
|
||||
$open_window = $node->open_window;
|
||||
$normal_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$node->normal_btn);
|
||||
|
|
@ -2029,7 +2025,7 @@ class menuAdminController extends menu
|
|||
}
|
||||
// Create properties (check if it belongs to the menu node by url_list. It looks a trick but fast and powerful)
|
||||
$attribute = sprintf(
|
||||
'"node_srl"=>"%s","parent_srl"=>"%s","menu_name_key"=>\'%s\',"isShow"=>(%s?true:false),"text"=>(%s?$_menu_names[%d][$lang_type]:""),"href"=>(%s?"%s":""),"url"=>(%s?"%s":""),"is_shortcut"=>"%s","open_window"=>"%s","normal_btn"=>"%s","hover_btn"=>"%s","active_btn"=>"%s","selected"=>(array(%s)&&in_array(Context::get("mid"),array(%s))?1:0),"expand"=>"%s", "list"=>array(%s), "link"=>(%s? ( array(%s)&&in_array(Context::get("mid"),array(%s)) ?%s:%s):""),',
|
||||
'"node_srl"=>"%s","parent_srl"=>"%s","menu_name_key"=>\'%s\',"isShow"=>(%s?true:false),"text"=>(%s?$_menu_names[%d][$lang_type]:""),"href"=>(%s?%s:""),"url"=>(%s?"%s":""),"is_shortcut"=>"%s","open_window"=>"%s","normal_btn"=>"%s","hover_btn"=>"%s","active_btn"=>"%s","selected"=>(array(%s)&&in_array(Context::get("mid"),array(%s))?1:0),"expand"=>"%s", "list"=>array(%s), "link"=>(%s? ( array(%s)&&in_array(Context::get("mid"),array(%s)) ?%s:%s):""),',
|
||||
$node->menu_item_srl,
|
||||
$node->parent_srl,
|
||||
addslashes($node->name),
|
||||
|
|
|
|||
|
|
@ -349,6 +349,7 @@ class menuAdminModel extends menu
|
|||
foreach($_allModules as $module_name)
|
||||
{
|
||||
$module = $oModuleModel->getModuleInfoXml($module_name);
|
||||
if(!isset($module)) continue;
|
||||
$defaultSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'P');
|
||||
$defaultMobileSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'M');
|
||||
$skinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultSkin);
|
||||
|
|
|
|||
|
|
@ -785,6 +785,7 @@ class moduleModel extends module
|
|||
if(!$module_info->category) $module_info->category = 'service';
|
||||
sscanf($xml_obj->author->attrs->date, '%d. %d. %d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$module_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$author_obj = new stdClass();
|
||||
$author_obj->name = $xml_obj->author->name->body;
|
||||
$author_obj->email_address = $xml_obj->author->attrs->email_address;
|
||||
$author_obj->homepage = $xml_obj->author->attrs->link;
|
||||
|
|
@ -1501,6 +1502,7 @@ class moduleModel extends module
|
|||
$info = $this->getModuleInfoXml($module_name);
|
||||
unset($obj);
|
||||
|
||||
if(!isset($info)) continue;
|
||||
$info->module = $module_name;
|
||||
$info->created_table_count = $created_table_count;
|
||||
$info->table_count = $table_count;
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ class pointController extends point
|
|||
// If there are comment points, attempt to deduct
|
||||
if($comment_point>0) return new Object();
|
||||
// Get all the comments related to this post
|
||||
$cp_args = new stdClass();
|
||||
$cp_args->document_srl = $document_srl;
|
||||
$output = executeQueryArray('point.getCommentUsers', $cp_args);
|
||||
// Return if there is no object
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
<rule name="number_with_plus_minus" type="regex" test="/^(\+|-)?[1-9][0-9]*$/" />
|
||||
<rule name="number_with_plus_minus" type="regex" test="/^(\+|-)?[0-9][0-9]*$/" />
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="member_srl" required="true" rule="number" />
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@
|
|||
<option value="Y" selected="selected"|cond="$is_admin=='Y'">{$lang->is_admin}</option>
|
||||
</select>
|
||||
<select name="selected_group_srl" style="width:auto;margin:0" title="{$lang->member_group}">
|
||||
<option value="0">{$lang->member_group}</option>
|
||||
<option loop="$group_list => $key,$val" value="{$val->group_srl}" selected="selected"|cond="$selected_group_srl==$val->group_srl">{$val->title}</option>
|
||||
</select>
|
||||
<select name="search_target" style="width:auto;margin:0" title="{$lang->search_target}">
|
||||
|
|
|
|||
2
modules/widget/tpl/css/widget.min.css
vendored
2
modules/widget/tpl/css/widget.min.css
vendored
|
|
@ -1 +1 @@
|
|||
@charset "utf-8";.widget_title{margin:10px 5px 5px 0;padding:3px;border:1px solid #ddd}.widget_mid_list{margin:0 0 5px 10px}.widget_description{margin:5px 0 0;padding:5px 0 0;border-top:1px dotted #eee;color:#aaa}#colorset_area{margin-top:.5em}#colorset_area .header{float:left;margin-right:.5em;padding-top:.2em}#colorset_area .footer{float:left}#zonePageContent{overflow:hidden;margin:0!important;padding:0!important;width:100%}.pageAddContent{width:700px}.widgetOutput{float:left;z-index:998;position:relative;overflow:hidden;width:100%;min-height:24px;cursor:move}.widgetOutput .widgetBorder,.widgetOutput .widgetBoxBorder{z-index:999;box-sizing:border-box;height:100%;min-height:24px;border:1px dashed #ccc}.widgetOutput .widgetResize{z-index:1000;position:absolute;bottom:1px;right:1px;width:12px;height:12px;border:0;cursor:pointer;background:transparent url(../images/btn_resize.gif) no-repeat left bottom}.widgetOutput .widgetResizeLeft{height:12px;bottom:1px;position:absolute;border:0;width:12px;z-index:1000;left:1px;cursor:pointer;background:transparent url(../images/btn_resize_left.gif) no-repeat left bottom}.widgetOutput .widgetBoxResize{z-index:1000;position:absolute;right:1px;bottom:1px;width:12px;height:12px;border:0;cursor:pointer;background:transparent url(../images/btn_resize.gif) no-repeat left bottom}.widgetOutput .widgetBoxResizeLeft{z-index:1000;position:absolute;left:1px;bottom:0;width:12px;height:12px;border:0;cursor:pointer;background:transparent url(../images/btn_resize_left.gif) no-repeat left bottom}.widgetButtons{float:left;z-index:1000;visibility:hidden;position:absolute;top:0;overflow:hidden;padding:0 10px;line-height:24px;box-shadow:0 0 3px #333 inset;*zoom:1}.widgetButtons#widgetButton{left:0;background-color:#C7DBE9}.widgetButtons#widgetBoxButton{right:0;background-color:#D2E9C7}.widgetButtons>button{z-index:99;padding:14px 0 0;overflow:hidden;width:14px;height:14px;border:0;cursor:pointer;background:transparent url(../../../admin/tpl/img/glyphicons-halflings.png) no-repeat}.widgetButtons .widgetSetup{background-position:-432px 0}.widgetButtons .widgetBoxSize,.widgetButtons .widgetSize{background-position:-96px -120px}.widgetButtons .widgetStyle{background-position:-456px -144px}.widgetButtons .widgetBoxCopy,.widgetButtons .widgetCopy{background-position:0 -96px}.widgetButtons .widgetBoxRemove,.widgetButtons .widgetRemove{background-position:-456px 0}.help{padding:5px 0;border-top:1px solid #ccc;background-color:#EFEFEF}ul.midCommand{float:left;margin:0 0 0 10px;padding:0;*zoom:1}ul.midCommand li{display:block;margin-bottom:5px;list-style:none}a.widgetStyle{display:inline-block;position:relative;margin:0 10px 10px 0;overflow:hidden;width:96px;height:96px;border:1px solid #fff;text-decoration:none;*zoom:1}a.widgetStyle:hover{border:1px dashed #ccc}a.widgetStyle:hover span{display:none}a.widgetStyle.selected{border:1px dashed #999}a.widgetStyle img{margin:1px;width:96px;height:96px}a.widgetStyle span{display:block;position:absolute;left:0;bottom:0;width:96px;padding:4px 3px 3px;text-align:center;font-family:tahoma;color:#fff;filter:alpha(opacity=80);opacity:.8;background-color:#888}#zonePageContent .widgetContainer{min-height:20px}
|
||||
@charset "utf-8";.widget_title{margin:10px 5px 5px 0;padding:3px;border:1px solid #ddd}.widget_mid_list{margin:0 0 5px 10px}.widget_description{margin:5px 0 0;padding:5px 0 0;border-top:1px dotted #eee;color:#aaa}#colorset_area{margin-top:.5em}#colorset_area .header{float:left;margin-right:.5em;padding-top:.2em}#colorset_area .footer{float:left}#zonePageContent{overflow:hidden;margin:0!important;padding:0!important;width:100%}.pageAddContent{width:700px}.widgetOutput{float:left;z-index:998;position:relative;overflow:hidden;width:100%;min-height:24px;cursor:move}.widgetOutput .widgetBorder,.widgetOutput .widgetBoxBorder{z-index:999;box-sizing:border-box;height:100%;min-height:24px;border:1px dashed #ccc}.widgetOutput .widgetResize{z-index:1000;position:absolute;bottom:1px;right:1px;width:12px;height:12px;border:0;cursor:pointer;background:transparent url(../images/btn_resize.gif) no-repeat left bottom}.widgetOutput .widgetResizeLeft{height:12px;bottom:1px;position:absolute;border:0;width:12px;z-index:1000;left:1px;cursor:pointer;background:transparent url(../images/btn_resize_left.gif) no-repeat left bottom}.widgetOutput .widgetBoxResize{z-index:1000;position:absolute;right:1px;bottom:1px;width:12px;height:12px;border:0;cursor:pointer;background:transparent url(../images/btn_resize.gif) no-repeat left bottom}.widgetOutput .widgetBoxResizeLeft{z-index:1000;position:absolute;left:1px;bottom:0;width:12px;height:12px;border:0;cursor:pointer;background:transparent url(../images/btn_resize_left.gif) no-repeat left bottom}.widgetButtons{float:left;z-index:1000;visibility:hidden;position:absolute;top:0;overflow:hidden;padding:0 10px;line-height:24px;box-shadow:0 0 3px #333 inset;*zoom:1}.widgetButtons#widgetButton{left:0;background-color:#C7DBE9}.widgetButtons#widgetBoxButton{right:0;background-color:#D2E9C7}.widgetButtons>button{z-index:99;padding:14px 0 0;overflow:hidden;width:14px;height:14px;border:0;cursor:pointer;vertical-align:middle;background:transparent url(../../../admin/tpl/img/glyphicons-halflings.png) no-repeat}.widgetButtons .widgetSetup{background-position:-432px 0}.widgetButtons .widgetBoxSize,.widgetButtons .widgetSize{background-position:-96px -120px}.widgetButtons .widgetStyle{background-position:-456px -144px}.widgetButtons .widgetBoxCopy,.widgetButtons .widgetCopy{background-position:0 -96px}.widgetButtons .widgetBoxRemove,.widgetButtons .widgetRemove{background-position:-456px 0}.help{padding:5px 0;border-top:1px solid #ccc;background-color:#EFEFEF}ul.midCommand{float:left;margin:0 0 0 10px;padding:0;*zoom:1}ul.midCommand li{display:block;margin-bottom:5px;list-style:none}a.widgetStyle{display:inline-block;position:relative;margin:0 10px 10px 0;overflow:hidden;width:96px;height:96px;border:1px solid #fff;text-decoration:none;*zoom:1}a.widgetStyle:hover{border:1px dashed #ccc}a.widgetStyle:hover span{display:none}a.widgetStyle.selected{border:1px dashed #999}a.widgetStyle img{margin:1px;width:96px;height:96px}a.widgetStyle span{display:block;position:absolute;left:0;bottom:0;width:96px;padding:4px 3px 3px;text-align:center;font-family:tahoma;color:#fff;filter:alpha(opacity=80);opacity:.8;background-color:#888}#zonePageContent .widgetContainer{min-height:20px}
|
||||
|
|
@ -51,9 +51,10 @@ function doStartPageModify(zoneID, module_srl) {
|
|||
.submit(function(){ doApplyWidgetSize(this); return false; });
|
||||
|
||||
// 드래그와 리사이즈와 관련된 이벤트 리스너 생성
|
||||
xAddEventListener(document.getElementById('zonePageContent'), "click",doCheckWidget);
|
||||
xAddEventListener(document.getElementById('zonePageContent'), "mousedown",doCheckWidgetDrag);
|
||||
xAddEventListener(document.getElementById('zonePageContent'), 'mouseover',widgetSetup);
|
||||
jQuery('#zonePageContent')
|
||||
.on('click', doCheckWidget)
|
||||
.on('mousedown', doCheckWidgetDrag)
|
||||
.on('mouseover', widgetSetup);
|
||||
}
|
||||
|
||||
// 내용 모두 삭제
|
||||
|
|
@ -410,18 +411,12 @@ function doAddWidgetCode(widget_code) {
|
|||
|
||||
// 클릭 이벤트시 위젯의 수정/제거/이벤트 무효화 처리
|
||||
function doCheckWidget(e) {
|
||||
var evt = new xEvent(e); if(!evt.target) return;
|
||||
var obj = evt.target;
|
||||
if(!e.target) return;
|
||||
var obj = e.target;
|
||||
var $obj = jQuery(obj);
|
||||
|
||||
selectedWidget = null;
|
||||
|
||||
var pObj = obj.parentNode;
|
||||
while(pObj) {
|
||||
if(pObj.id == "pageSizeLayer") return;
|
||||
pObj = pObj.parentNode;
|
||||
}
|
||||
|
||||
doHideWidgetSizeSetup();
|
||||
// 위젯 설정
|
||||
if($obj.hasClass('widgetSetup')) {
|
||||
|
|
@ -451,7 +446,7 @@ function doCheckWidget(e) {
|
|||
restoreWidgetButtons();
|
||||
|
||||
if(p_obj.getAttribute('widget')=='widgetContent' && p_obj.getAttribute('document_srl') ) {
|
||||
var response_tags = new Array('error','message','document_srl');
|
||||
var response_tags = ['error','message','document_srl'];
|
||||
var params = [];
|
||||
params.document_srl =p_obj.getAttribute('document_srl');
|
||||
exec_xml('widget','procWidgetCopyDocument', params, completeCopyWidgetContent, response_tags, params, p_obj);
|
||||
|
|
@ -461,7 +456,7 @@ function doCheckWidget(e) {
|
|||
xInnerHtml(dummy,xInnerHtml(p_obj));
|
||||
|
||||
dummy.widget_sequence = '';
|
||||
jQuery(dummy).hasClass("widgetOutput");
|
||||
dummy.className = "widgetOutput";
|
||||
for(var i=0;i<p_obj.attributes.length;i++) {
|
||||
if(!p_obj.attributes[i].nodeName || !p_obj.attributes[i].nodeValue) continue;
|
||||
var name = p_obj.attributes[i].nodeName.toLowerCase();
|
||||
|
|
@ -485,7 +480,7 @@ function doCheckWidget(e) {
|
|||
var widget = p_obj.getAttribute("widget");
|
||||
if(!widget) return;
|
||||
selectedWidget = p_obj;
|
||||
doShowWidgetSizeSetup(evt.pageX, evt.pageY, selectedWidget);
|
||||
doShowWidgetSizeSetup(e.pageX, e.pageY, selectedWidget);
|
||||
return;
|
||||
|
||||
// 위젯 제거
|
||||
|
|
@ -503,10 +498,10 @@ function doCheckWidget(e) {
|
|||
var p_obj = obj;
|
||||
while(p_obj) {
|
||||
if(jQuery(p_obj).hasClass('widgetOutput')) {
|
||||
evt.cancelBubble = true;
|
||||
evt.returnValue = false;
|
||||
xPreventDefault(e);
|
||||
xStopPropagation(e);
|
||||
e.cancelBubble = true;
|
||||
e.returnValue = false;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
break;
|
||||
}
|
||||
p_obj = p_obj.parentNode;
|
||||
|
|
@ -521,7 +516,7 @@ function completeCopyWidgetContent(ret_obj, response_tags, params, p_obj) {
|
|||
|
||||
|
||||
dummy.widget_sequence = '';
|
||||
jQuery(dummy).hasClass("widgetOutput");
|
||||
dummy.className = "widgetOutput";
|
||||
for(var i=0;i<p_obj.attributes.length;i++) {
|
||||
if(!p_obj.attributes[i].nodeName || !p_obj.attributes[i].nodeValue) continue;
|
||||
var name = p_obj.attributes[i].nodeName.toLowerCase();
|
||||
|
|
@ -548,19 +543,19 @@ function completeDeleteWidgetContent(ret_obj, response_tags, params, p_obj) {
|
|||
|
||||
// 마우스 다운 이벤트 발생시 위젯의 이동을 처리
|
||||
function doCheckWidgetDrag(e) {
|
||||
var evt = new xEvent(e); if(!evt.target) return;
|
||||
var obj = evt.target;
|
||||
if(!e.target) return;
|
||||
var obj = e.target;
|
||||
var $obj = jQuery(obj);
|
||||
|
||||
if(jQuery(obj).parents('#pageSizeLayer').size() > 0) return;
|
||||
if($obj.parents('#pageSizeLayer').size() > 0) return;
|
||||
|
||||
doHideWidgetSizeSetup();
|
||||
|
||||
if($obj.hasClass('widgetSetup') || $obj.hasClass('widgetStyle') || $obj.hasClass('widgetCopy') || $obj.hasClass('widgetBoxCopy') || $obj.hasClass('widgetSize') || $obj.hasClass('widgetBoxSize') || $obj.hasClass('widgetRemove') || $obj.hasClass('widgetBoxRemove')) return;
|
||||
|
||||
p_obj = obj;
|
||||
var $p_obj = jQuery(obj);
|
||||
while(p_obj) {
|
||||
var $p_obj = jQuery(p_obj);
|
||||
if($p_obj.hasClass('widgetOutput') || $p_obj.hasClass('widgetResize') || $p_obj.hasClass('widgetResizeLeft') || $p_obj.hasClass('widgetBoxResize') || $p_obj.hasClass('widgetBoxResizeLeft')) {
|
||||
widgetDragEnable(p_obj, widgetDragStart, widgetDrag, widgetDragEnd);
|
||||
widgetMouseDown(e);
|
||||
|
|
@ -583,57 +578,56 @@ function doShowWidgetSizeSetup(px, py, obj) {
|
|||
/*jshint -W004*/
|
||||
var layer = jQuery('#pageSizeLayer');
|
||||
var form = layer.find('>form:first');
|
||||
var obj = jQuery(obj);
|
||||
|
||||
var $obj = jQuery(obj);
|
||||
if (!form.length) return;
|
||||
|
||||
selectedSizeWidget = obj[0];
|
||||
selectedSizeWidget = obj;
|
||||
var $selectedSizeWidget = jQuery(selectedSizeWidget);
|
||||
|
||||
var opts = {
|
||||
widget_align : obj.css('float'),
|
||||
widget_align : $obj.css('float'),
|
||||
|
||||
css_class : ($selectedSizeWidget.attr('css_class')) ? $selectedSizeWidget.attr('css_class') : '',
|
||||
width : obj[0].style.width,
|
||||
height : obj[0].style.height,
|
||||
width : $obj[0].style.width,
|
||||
height : $obj[0].style.height,
|
||||
|
||||
padding_left : _getInt(obj.attr('widget_padding_left')),
|
||||
padding_right : _getInt(obj.attr('widget_padding_right')),
|
||||
padding_top : _getInt(obj.attr('widget_padding_top')),
|
||||
padding_bottom : _getInt(obj.attr('widget_padding_bottom')),
|
||||
padding_left : _getInt($obj.attr('widget_padding_left')),
|
||||
padding_right : _getInt($obj.attr('widget_padding_right')),
|
||||
padding_top : _getInt($obj.attr('widget_padding_top')),
|
||||
padding_bottom : _getInt($obj.attr('widget_padding_bottom')),
|
||||
|
||||
margin_left : _getInt(obj[0].style.marginLeft),
|
||||
margin_right : _getInt(obj[0].style.marginRight),
|
||||
margin_top : _getInt(obj[0].style.marginTop),
|
||||
margin_bottom : _getInt(obj[0].style.marginBottom),
|
||||
margin_left : _getInt($obj.css('marginLeft')),
|
||||
margin_right : _getInt($obj.css('marginRight')),
|
||||
margin_top : _getInt($obj.css('marginTop')),
|
||||
margin_bottom : _getInt($obj.css('marginBottom')),
|
||||
|
||||
border_top_color : transRGB2Hex(obj[0].style.borderTopColor),
|
||||
border_top_thick : obj[0].style.borderTopWidth.replace(/px$/i, ''),
|
||||
border_top_type : obj[0].style.borderTopStyle,
|
||||
border_top_color : transRGB2Hex($obj.css('borderTopColor')),
|
||||
border_top_thick : $obj.css('borderTopWidth').replace(/px$/i, ''),
|
||||
border_top_type : $obj.css('borderTopStyle'),
|
||||
|
||||
border_bottom_color : transRGB2Hex(obj[0].style.borderBottomColor),
|
||||
border_bottom_thick : obj[0].style.borderBottomWidth.replace(/px$/i, ''),
|
||||
border_bottom_type : obj[0].style.borderBottomStyle,
|
||||
border_bottom_color : transRGB2Hex($obj.css('borderBottomColor')),
|
||||
border_bottom_thick : $obj.css('borderBottomWidth').replace(/px$/i, ''),
|
||||
border_bottom_type : $obj.css('borderBottomStyle'),
|
||||
|
||||
border_right_color : transRGB2Hex(obj[0].style.borderRightColor),
|
||||
border_right_thick : obj[0].style.borderRightWidth.replace(/px$/i, ''),
|
||||
border_right_type : obj[0].style.borderRightStyle,
|
||||
border_right_color : transRGB2Hex($obj.css('borderRightColor')),
|
||||
border_right_thick : $obj.css('borderRightWidth').replace(/px$/i, ''),
|
||||
border_right_type : $obj.css('borderRightStyle'),
|
||||
|
||||
border_left_color : transRGB2Hex(obj[0].style.borderLeftColor),
|
||||
border_left_thick : obj[0].style.borderLeftWidth.replace(/px$/i, ''),
|
||||
border_left_type : obj[0].style.borderLeftStyle,
|
||||
border_left_color : transRGB2Hex($obj.css('borderLeftColor')),
|
||||
border_left_thick : $obj.css('borderLeftWidth').replace(/px$/i, ''),
|
||||
border_left_type : $obj.css('borderLeftStyle'),
|
||||
|
||||
background_color : transRGB2Hex(obj[0].style.backgroundColor),
|
||||
background_image_url : obj[0].style.backgroundImage.replace(/^url\(/i,'').replace(/\)$/i,''),
|
||||
background_color : transRGB2Hex($obj.css('backgroundColor')),
|
||||
background_image_url : $obj.css('backgroundImage').replace(/^url\(/i,'').replace(/\)$/i,''),
|
||||
|
||||
background_x : 0,
|
||||
background_y : 0,
|
||||
|
||||
background_repeat : obj[0].style.backgroundRepeat
|
||||
background_repeat : $obj.css('backgroundRepeat')
|
||||
};
|
||||
|
||||
// background position
|
||||
var pos = obj[0].style.backgroundPosition;
|
||||
var pos = $obj.css('backgroundPosition');
|
||||
if(pos) {
|
||||
pos = pos.split(' ');
|
||||
if(pos.length == 2) {
|
||||
|
|
@ -670,16 +664,20 @@ function doShowWidgetSizeSetup(px, py, obj) {
|
|||
|
||||
jQuery.each(opts, function(key, val){
|
||||
var el = form[0].elements[key];
|
||||
if (el)
|
||||
{
|
||||
el.value = val;
|
||||
if(el.className.match(/\bcolor-indicator\b/))
|
||||
{
|
||||
el.style.background = el.value = '#'+el.value;
|
||||
var $el = jQuery(el);
|
||||
if(el) {
|
||||
$el.val(val);
|
||||
|
||||
if($el.hasClass('color-indicator')) {
|
||||
if(val != 'transparent') {
|
||||
val = val.toUpperCase();
|
||||
$el.css('background', '#' + val);
|
||||
$el.val('#' + val);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (el.tagName.toLowerCase() == "select")
|
||||
{
|
||||
|
||||
if(el.tagName.toLowerCase() == "select") {
|
||||
if(el.selectedIndex == -1) {
|
||||
el.selectedIndex = 0;
|
||||
}
|
||||
|
|
@ -792,8 +790,8 @@ function doApplyWidgetSize(fo_obj) {
|
|||
selectedSizeWidget.style.backgroundPosition = fo_obj.background_x.value+' '+fo_obj.background_y.value;
|
||||
|
||||
var borderObj = selectedSizeWidget.firstChild;
|
||||
var $borderObj = jQuery(selectedSizeWidget.firstChild);
|
||||
while(borderObj) {
|
||||
var $borderObj = jQuery(borderObj);
|
||||
if(borderObj.nodeName == "DIV" && ($borderObj.hasClass("widgetBorder") || $borderObj.hasClass("widgetBoxBorder"))) {
|
||||
var contentObj = borderObj.firstChild;
|
||||
while(contentObj) {
|
||||
|
|
@ -895,8 +893,7 @@ function showWidgetButton(name, obj) {
|
|||
obj.insertBefore(widgetButton, obj.firstChild);
|
||||
}
|
||||
|
||||
function widgetSetup(evt) {
|
||||
var e = new xEvent(evt);
|
||||
function widgetSetup(e) {
|
||||
var obj = e.target;
|
||||
|
||||
if(jQuery(obj).is('.widgetButtons') || jQuery(obj).parents('.widgetButtons').size() > 0) return;
|
||||
|
|
@ -970,7 +967,6 @@ function widgetGetTmpObject(obj) {
|
|||
|
||||
// 메뉴에 마우스 클릭이 일어난 시점에 드래그를 위한 제일 첫 동작 (해당 object에 각종 함수나 상태변수 설정)
|
||||
function widgetDragEnable(obj, funcDragStart, funcDrag, funcDragEnd) {
|
||||
|
||||
// 상위 object에 드래그 가능하다는 상태와 각 드래그 관련 함수를 설정
|
||||
obj.draggable = true;
|
||||
obj.dragStart = funcDragStart;
|
||||
|
|
@ -980,7 +976,7 @@ function widgetDragEnable(obj, funcDragStart, funcDrag, funcDragEnd) {
|
|||
// 드래그 가능하지 않다면 드래그 가능하도록 상태 지정하고 mousemove이벤트 등록
|
||||
if (!widgetDragManager.isDrag) {
|
||||
widgetDragManager.isDrag = true;
|
||||
xAddEventListener(document, 'mousemove', widgetDragMouseMove, false);
|
||||
jQuery(document).on('mousemove', widgetDragMouseMove);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1002,6 +998,7 @@ function widgetDragStart(tobj, px, py) {
|
|||
|
||||
// 드래그 시작후 마우스를 이동할때 발생되는 이벤트에 의해 실행되는 함수
|
||||
function widgetDrag(tobj, dx, dy) {
|
||||
var $tobj = jQuery(tobj);
|
||||
var minWidth = 40;
|
||||
var minHeight = 10;
|
||||
|
||||
|
|
@ -1021,7 +1018,7 @@ function widgetDrag(tobj, dx, dy) {
|
|||
if(!cssFloat) cssFloat = 'left';
|
||||
|
||||
// 위젯 리사이즈 (우측)
|
||||
if(tobj.className == 'widgetResize' || tobj.className == 'widgetBoxResize') {
|
||||
if($tobj.hasClass('widgetResize') || $tobj.hasClass('widgetBoxResize')) {
|
||||
if(nx < sx+minWidth) nx = sx+minWidth;
|
||||
if(nx > zoneRight) nx = zoneRight;
|
||||
if(cssFloat == 'right') nx = sx + pWidth;
|
||||
|
|
@ -1037,7 +1034,7 @@ function widgetDrag(tobj, dx, dy) {
|
|||
xHeight(tobj.parentNode, new_height);
|
||||
|
||||
// 위젯 리사이즈 (좌측)
|
||||
} else if(tobj.className == 'widgetResizeLeft' || tobj.className == 'widgetBoxResizeLeft') {
|
||||
} else if($tobj.hasClass('widgetResizeLeft') || $tobj.hasClass('widgetBoxResizeLeft')) {
|
||||
/*jshint -W004*/
|
||||
if(nx < zoneLeft) nx = zoneLeft;
|
||||
if(cssFloat == 'left') nx = sx;
|
||||
|
|
@ -1109,6 +1106,7 @@ function widgetDrag(tobj, dx, dy) {
|
|||
var boxList = xGetElementsByClassName("nullWidget", zonePageObj);
|
||||
for(var i=0;i<boxList.length;i++) {
|
||||
var target_obj = boxList[i];
|
||||
var $target_obj = jQuery(target_obj);
|
||||
|
||||
xHeight(target_obj, xHeight(target_obj.parentNode));
|
||||
xWidth(target_obj, xWidth(target_obj.parentNode));
|
||||
|
|
@ -1120,9 +1118,9 @@ function widgetDrag(tobj, dx, dy) {
|
|||
if( tobj.xDPX >= l && tobj.xDPX <= ll && tobj.xDPY >= t && tobj.xDPY <= tt) {
|
||||
|
||||
//박스 위젯이다
|
||||
if(target_obj.className == "nullWidget") {
|
||||
if($target_obj.hasClass("nullWidget")) {
|
||||
|
||||
var wb_ws = jQuery('div.widget_inner',jQuery(target_obj));
|
||||
var wb_ws = jQuery('div.widget_inner', $target_obj);
|
||||
|
||||
//박스 위젯에 위젯스타일이 적용 안된경우
|
||||
if(wb_ws.size() === 0){
|
||||
|
|
@ -1190,7 +1188,7 @@ function widgetDragEnd(tobj, px, py) {
|
|||
function widgetDisapearObject(obj, tobj) {
|
||||
xInnerHtml(tobj,xInnerHtml(obj));
|
||||
xInnerHtml(obj,'');
|
||||
xDisplay(obj, 'none');
|
||||
jQuery(obj).hide();
|
||||
obj.parentNode.removeChild(obj);
|
||||
widgetTmpObject[tobj.id] = null;
|
||||
return;
|
||||
|
|
@ -1198,31 +1196,29 @@ function widgetDisapearObject(obj, tobj) {
|
|||
|
||||
// 마우스다운 이벤트 발생시 호출됨
|
||||
function widgetMouseDown(e) {
|
||||
var evt = new xEvent(e);
|
||||
var obj = evt.target;
|
||||
var obj = e.target;
|
||||
|
||||
while(obj && !obj.draggable) {
|
||||
obj = xParent(obj, true);
|
||||
}
|
||||
if(obj) {
|
||||
xPreventDefault(e);
|
||||
obj.xDPX = evt.pageX;
|
||||
obj.xDPY = evt.pageY;
|
||||
e.preventDefault();
|
||||
obj.xDPX = e.pageX;
|
||||
obj.xDPY = e.pageY;
|
||||
widgetDragManager.obj = obj;
|
||||
xAddEventListener(document, 'mouseup', widgetMouseUp, false);
|
||||
if (obj.dragStart) obj.dragStart(obj, evt.pageX, evt.pageY);
|
||||
jQuery(document).on('mouseup', widgetMouseUp);
|
||||
if (obj.dragStart) obj.dragStart(obj, e.pageX, e.pageY);
|
||||
}
|
||||
}
|
||||
|
||||
// 마우스 버튼을 놓았을때 동작될 함수 (각종 이벤트 해제 및 변수 설정 초기화)
|
||||
function widgetMouseUp(e) {
|
||||
if (widgetDragManager.obj) {
|
||||
xPreventDefault(e);
|
||||
xRemoveEventListener(document, 'mouseup', widgetMouseUp, false);
|
||||
e.preventDefault();
|
||||
jQuery(document).off('mouseup', widgetMouseUp);
|
||||
|
||||
if (widgetDragManager.obj.dragEnd) {
|
||||
var evt = new xEvent(e);
|
||||
widgetDragManager.obj.dragEnd(widgetDragManager.obj, evt.pageX, evt.pageY);
|
||||
widgetDragManager.obj.dragEnd(widgetDragManager.obj, e.pageX, e.pageY);
|
||||
}
|
||||
|
||||
widgetDragManager.obj = null;
|
||||
|
|
@ -1232,16 +1228,15 @@ function widgetMouseUp(e) {
|
|||
|
||||
// 드래그할때의 object이동등을 담당
|
||||
function widgetDragMouseMove(e) {
|
||||
var evt = new xEvent(e);
|
||||
if(widgetDragManager.obj) {
|
||||
xPreventDefault(e);
|
||||
e.preventDefault();
|
||||
|
||||
var obj = widgetDragManager.obj;
|
||||
var dx = evt.pageX - obj.xDPX;
|
||||
var dy = evt.pageY - obj.xDPY;
|
||||
var dx = e.pageX - obj.xDPX;
|
||||
var dy = e.pageY - obj.xDPY;
|
||||
|
||||
obj.xDPX = evt.pageX;
|
||||
obj.xDPY = evt.pageY;
|
||||
obj.xDPX = e.pageX;
|
||||
obj.xDPY = e.pageY;
|
||||
|
||||
if (obj.drag) {
|
||||
obj.drag(obj, dx, dy);
|
||||
|
|
@ -1259,7 +1254,7 @@ function widgetDragDisable(id) {
|
|||
obj.dragStart = null;
|
||||
obj.drag = null;
|
||||
obj.dragEnd = null;
|
||||
xRemoveEventListener(obj, 'mousedown', widgetMouseDown, false);
|
||||
jQuery(obj).off('mousedown', widgetMouseDown);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1268,8 +1263,8 @@ function widgetManualEnd() {
|
|||
var tobj = widgetDragManager.obj;
|
||||
if(!tobj) return;
|
||||
|
||||
xRemoveEventListener(document, 'mouseup', widgetMouseUp, false);
|
||||
xAddEventListener(document, 'mousemove', widgetDragMouseMove, false);
|
||||
jQuery(document).off('mouseup', widgetMouseUp);
|
||||
jQuery(document).on('mousemove', widgetDragMouseMove);
|
||||
|
||||
var obj = widgetGetTmpObject(tobj);
|
||||
widgetDisapear = widgetDisapearObject(obj, tobj);
|
||||
|
|
|
|||
2
modules/widget/tpl/js/widget.min.js
vendored
2
modules/widget/tpl/js/widget.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -62,7 +62,7 @@
|
|||
<option value="solid">{$lang->cmd_widget_border_solid}</option>
|
||||
<option value="dotted">{$lang->cmd_widget_border_dotted}</option>
|
||||
</select>
|
||||
<input type="text" name="border_top_color" value="" class="color_input color-indicator" maxlength="6"/>
|
||||
<input type="text" name="border_top_color" value="" class="color_input color-indicator" maxlength="7"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
<option value="solid">{$lang->cmd_widget_border_solid}</option>
|
||||
<option value="dotted">{$lang->cmd_widget_border_dotted}</option>
|
||||
</select>
|
||||
<input type="text" name="border_left_color" value="" class="color_input color-indicator" maxlength="6"/>
|
||||
<input type="text" name="border_left_color" value="" class="color_input color-indicator" maxlength="7"/>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<input type="number" name="border_right_thick" value="" class="small_input" /> px
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<option value="solid">{$lang->cmd_widget_border_solid}</option>
|
||||
<option value="dotted">{$lang->cmd_widget_border_dotted}</option>
|
||||
</select>
|
||||
<input type="text" name="border_right_color" value="" class="color_input color-indicator" maxlength="6"/>
|
||||
<input type="text" name="border_right_color" value="" class="color_input color-indicator" maxlength="7"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
<option value="solid">{$lang->cmd_widget_border_solid}</option>
|
||||
<option value="dotted">{$lang->cmd_widget_border_dotted}</option>
|
||||
</select>
|
||||
<input type="text" name="border_bottom_color" value="" class="color_input color-indicator" maxlength="6"/>
|
||||
<input type="text" name="border_bottom_color" value="" class="color_input color-indicator" maxlength="7"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
<style scoped>
|
||||
.wgs{margin:0;width:700px}
|
||||
.wgs select{margin:0;width:auto}
|
||||
.wgs input{margin:0!important;width:50px}
|
||||
.wgs input{margin:0!important;width:60px}
|
||||
</style>
|
||||
</section>
|
||||
<!--%load_js_plugin("ui.colorpicker")-->
|
||||
|
|
|
|||
|
|
@ -376,6 +376,10 @@
|
|||
<name xml:lang="zh-CN">内容摘要字数</name>
|
||||
<name xml:lang="zh-TW">內容字數</name>
|
||||
<name xml:lang="tr">İçerik Uzunluğu</name>
|
||||
</var>
|
||||
<var id="nickname_cut_size" type="text">
|
||||
<name xml:lang="ko">닉네임 글자수</name>
|
||||
<name xml:lang="en">Length of Nickname</name>
|
||||
</var>
|
||||
<var id="new_window" type="select">
|
||||
<name xml:lang="ko">링크</name>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ class content extends WidgetHandler
|
|||
if(!$args->subject_cut_size) $args->subject_cut_size = 0;
|
||||
// Cut the length of contents
|
||||
if(!$args->content_cut_size) $args->content_cut_size = 100;
|
||||
// Cut the length of nickname
|
||||
if(!$args->nickname_cut_size) $args->nickname_cut_size = 0;
|
||||
// Display time of the latest post
|
||||
if(!$args->duration_new) $args->duration_new = 12;
|
||||
// How to create thumbnails
|
||||
|
|
@ -715,6 +717,7 @@ class content extends WidgetHandler
|
|||
$widget_info->page_count = $args->page_count;
|
||||
$widget_info->subject_cut_size = $args->subject_cut_size;
|
||||
$widget_info->content_cut_size = $args->content_cut_size;
|
||||
$widget_info->nickname_cut_size = $args->nickname_cut_size;
|
||||
$widget_info->new_window = $args->new_window;
|
||||
|
||||
$widget_info->duration_new = $args->duration_new * 60*60;
|
||||
|
|
@ -743,6 +746,7 @@ class content extends WidgetHandler
|
|||
if(!is_array($content_items[$module_srl]) || !count($content_items[$module_srl])) continue;
|
||||
|
||||
unset($tab_item);
|
||||
$tab_item = new stdClass();
|
||||
$tab_item->title = $content_items[$module_srl][0]->getBrowserTitle();
|
||||
$tab_item->content_items = $content_items[$module_srl];
|
||||
$tab_item->domain = $content_items[$module_srl][0]->getDomain();
|
||||
|
|
@ -887,9 +891,12 @@ class contentItem extends Object
|
|||
{
|
||||
return $this->get('category');
|
||||
}
|
||||
function getNickName()
|
||||
function getNickName($cut_size = 0, $tail='...')
|
||||
{
|
||||
return $this->get('nick_name');
|
||||
if($cut_size) $nick_name = cut_str($this->get('nick_name'), $cut_size, $tail);
|
||||
else $nick_name = $this->get('nick_name');
|
||||
|
||||
return $nick_name;
|
||||
}
|
||||
function getAuthorSite()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<!--@end-->
|
||||
|
||||
<!--@else if($v=='nickname')-->
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName()}</a>
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName($widget_info->nickname_cut_size)}</a>
|
||||
<!--@else if($v=='regdate')-->
|
||||
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<span class="icon">{$item->printExtraImages()}</span>
|
||||
<!--@end-->
|
||||
<!--@else if($v=='nickname')-->
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName()}</a>
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName($widget_info->nickname_cut_size)}</a>
|
||||
<!--@else if($v=='regdate')-->
|
||||
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
|
||||
<!--@end-->
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
<!--@end-->
|
||||
</td>
|
||||
<!--@else if($v=='nickname')-->
|
||||
<td><a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName()}</a></td>
|
||||
<td><a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName($widget_info->nickname_cut_size)}</a></td>
|
||||
<!--@else if($v=='regdate')-->
|
||||
<td class="time"><span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span></td>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
<!--@else if($widget_info->option_view_arr[$j]=='nickname')-->
|
||||
<p class="authorArea" style="margin-left:{$widget_info->thumbnail_width+20}px;">
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}" target="_blank"|cond="$widget_info->new_window">{$item->getNickName()}</a>
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}" target="_blank"|cond="$widget_info->new_window">{$item->getNickName($widget_info->nickname_cut_size)}</a>
|
||||
<!--@if($widget_info->option_view_arr[$j+1]=='regdate')-->
|
||||
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<!--@end-->
|
||||
|
||||
<!--@else if($v=='nickname')-->
|
||||
<a <!--@if($item->getMemberSrl())-->href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}"<!--@elseif($item->getAuthorSite())-->href="{$item->getAuthorSite()}" onclick="window.open(this.href); return false;" class="author member"<!--@else-->href="#" onclick="return false;" class="author member"<!--@end--> >{$item->getNickName()}</a>
|
||||
<a <!--@if($item->getMemberSrl())-->href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}"<!--@elseif($item->getAuthorSite())-->href="{$item->getAuthorSite()}" onclick="window.open(this.href); return false;" class="author member"<!--@else-->href="#" onclick="return false;" class="author member"<!--@end--> >{$item->getNickName($widget_info->nickname_cut_size)}</a>
|
||||
|
||||
<!--@else if($v=='regdate')-->
|
||||
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<!--@end-->
|
||||
</td>
|
||||
<!--@else if($v=='nickname')-->
|
||||
<td><a <!--@if($item->getMemberSrl())-->href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}"<!--@elseif($item->getAuthorSite())-->href="{$item->getAuthorSite()}" onclick="window.open(this.href); return false;" class="author member"<!--@else-->href="#" onclick="return false;" class="author member"<!--@end--> >{$item->getNickName()}</a></td>
|
||||
<td><a <!--@if($item->getMemberSrl())-->href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}"<!--@elseif($item->getAuthorSite())-->href="{$item->getAuthorSite()}" onclick="window.open(this.href); return false;" class="author member"<!--@else-->href="#" onclick="return false;" class="author member"<!--@end--> >{$item->getNickName($widget_info->nickname_cut_size)}</a></td>
|
||||
<!--@else if($v=='regdate')-->
|
||||
<td class="time"><span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span></td>
|
||||
<!--@end-->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue