Skip to content

Commit

Permalink
Merge pull request #2 from xpressengine/develop
Browse files Browse the repository at this point in the history
완료
  • Loading branch information
YJSoft committed Feb 18, 2015
2 parents 5b92669 + 469938d commit 5e6ea99
Show file tree
Hide file tree
Showing 14 changed files with 297 additions and 107 deletions.
13 changes: 10 additions & 3 deletions classes/context/Context.class.php
Expand Up @@ -367,6 +367,8 @@ function init()
$this->allow_rewrite = ($this->db_info->use_rewrite == 'Y' ? TRUE : FALSE);

// set locations for javascript use
$url = array();
$current_url = self::getRequestUri();
if($_SERVER['REQUEST_METHOD'] == 'GET')
{
if($this->get_vars)
Expand All @@ -386,17 +388,21 @@ function init()
$url[] = $key . '=' . urlencode($val);
}
}
$this->set('current_url', self::getRequestUri() . '?' . join('&', $url));

$current_url = self::getRequestUri();
if($url) $current_url .= '?' . join('&', $url);
}
else
{
$this->set('current_url', $this->getUrl());
$current_url = $this->getUrl();
}
}
else
{
$this->set('current_url', self::getRequestUri());
$current_url = self::getRequestUri();
}

$this->set('current_url', $current_url);
$this->set('request_uri', self::getRequestUri());
}

Expand Down Expand Up @@ -1157,6 +1163,7 @@ function _setRequestArgument()
{
continue;
}
$key = htmlentities($key);
$val = $this->_filterRequestVar($key, $val);

if($requestMethod == 'GET' && isset($_GET[$key]))
Expand Down
7 changes: 4 additions & 3 deletions common/tpl/redirect.html
Expand Up @@ -5,8 +5,9 @@
</head>
<body>
<script>
var idx = location.href.indexOf('?');
var url = parent.location.href;
var url = location.href;
var idx = url.indexOf('?');

if(idx > -1 ) {
var query_string = location.href.substr(idx+1, location.href.length);
var args = {};
Expand All @@ -23,4 +24,4 @@
}
</script>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion config/config.inc.php
Expand Up @@ -29,7 +29,7 @@
/**
* Display XE's full version.
*/
define('__XE_VERSION__', '1.7.10');
define('__XE_VERSION__', '1.7.11');
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));
Expand Down
9 changes: 9 additions & 0 deletions modules/board/board.view.php
Expand Up @@ -267,6 +267,15 @@ function dispBoardContentView(){
}
}

// if the document is TEMP saved, check Grant
if($oDocument->getStatus() == 'TEMP')
{
if(!$oDocument->isGranted())
{
$oDocument = $oDocumentModel->getDocument(0);
}
}

}
else
{
Expand Down
5 changes: 4 additions & 1 deletion modules/document/document.controller.php
Expand Up @@ -876,7 +876,10 @@ function updateReadedCount(&$oDocument)
}

// Register session
$_SESSION['readed_document'][$document_srl] = true;
if(!$_SESSION['banned_document'][$document_srl])
{
$_SESSION['readed_document'][$document_srl] = true;
}

return TRUE;
}
Expand Down
3 changes: 3 additions & 0 deletions modules/menu/tpl/css/sitemap.css
Expand Up @@ -46,6 +46,9 @@ body>.x{max-width:none !important}
.col>*>h1>a[target="_blank"]:after{vertical-align:middle;opacity:.75;filter:alpha(opacity=75)}
.col>*>h1>a:hover,
.col>*>h1>a:focus{color:#06C}
.col #menu_find{height:32px}
.col #menu_find input[type="text"]{margin-bottom: 0}
.col #menu_find button[type="button"]{visibility: hidden}
.col>.x_close{position:absolute;top:0;right:0;width:30px;height:30px;color:#666;font-size:17px;opacity:.75;filter:alpha(opacity=75)}
.col input[type="checkbox"],
.col input[type="radio"]{margin:0}
Expand Down
77 changes: 75 additions & 2 deletions modules/menu/tpl/sitemap.html
Expand Up @@ -22,6 +22,11 @@
<!--@if($act == 'dispMenuAdminSiteMap')-->
<div class="col map" id="site_map">
<h1>{$lang->menu_gnb_sub['siteMap']} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_site_menu" target="_blank">{$lang->help}</a></h1>
<form id="menu_find">
<input name="keyword" type="text"></input>
<button class="x_btn x_btn-inverse btn-find">{$lang->cmd_find}</button>
<button class="x_btn x_btn-inverse btn-next" type="button">{$lang->cmd_next}</button>
</form>
<div class="cnt">
<section class="mapi" id="siteMapTree">
<script id="tmpl_menuTree" type="text/x-jquery-tmpl">
Expand Down Expand Up @@ -798,7 +803,12 @@ <h1>{$lang->full_settings}</h1>
// it makes sense to configure a plugin only if overriding the defaults
})
.bind("loaded.jstree", function (event, data) {
data.inst.open_all();
//data.inst.open_all();
data.inst.get_container_ul().find("li.jstree-closed").each(function () {
if(issetJSTreeOpenIds(this.id) == true){
$(this).removeClass("jstree-closed").addClass("jstree-open");
}
});

var sRenameId = $._xeAdminVar.sRenameOnload;
$._xeAdminVar.sRenameOnload = null;
Expand All @@ -823,6 +833,12 @@ <h1>{$lang->full_settings}</h1>
}

})
.bind("open_node.jstree", function(event, data){
setJSTreeOpenIds();
})
.bind("close_node.jstree", function(event, data){
setJSTreeOpenIds();
})
.bind("rename.jstree", function(event, data){
$("#siteMapTree").removeClass("_node_renaming");
})
Expand All @@ -839,6 +855,12 @@ <h1>{$lang->full_settings}</h1>

})
.bind("select_node.jstree", function(event, data){
// move scroll
var ul = $($("#siteMapTree").jstree("get_container")[0]);
ul.parent("div.cnt").stop().animate({
scrollTop: data.rslt.obj.offset().top - ul.offset().top
}, 800);

$("#siteMapTree input").blur();
//console.log($("#siteMapTree input"));

Expand Down Expand Up @@ -965,6 +987,24 @@ <h1>{$lang->full_settings}</h1>
$('#site_map').nextAll().hide();
}

function setJSTreeOpenIds(){
var jstree_open_srls = [];
jQuery("#siteMapTree").find("li.jstree-open").each(function() {
jstree_open_srls.push(this.id);
});
setCookie("__xe_admin_jstree_open_srls", jstree_open_srls.join(","));
}

function issetJSTreeOpenIds(id) {
var jstree_open_srls = getCookie("__xe_admin_jstree_open_srls").split(",");
for (var i=0; i< jstree_open_srls.length; i++) {
if(jstree_open_srls[i] == id) {
return true;
}
}
return false;
}

var htNodeInfo = {};
// return html
function createTreeMarkup(aNode, sParentSrl, sMenuTree, sMenuTreeNode){
Expand Down Expand Up @@ -1201,6 +1241,37 @@ <h1>{$lang->full_settings}</h1>
setItemTypes(htData.menu_types);
setAllModules(htData.all_modules);
});

var find_ids = [];
var find_index = 0;
$("#menu_find").submit(function(){
find_ids = [];
find_index = 0;
$('#menu_find').find('[type="button"]').css("visibility", "hidden");

var keyword = $('[name="keyword"]').val();
$("#siteMapTree").find("li").each(function(){
var pattern = new RegExp(keyword);
if(pattern.test($(this).find("a:first").text())){
find_ids.push(this.id);
}
});

if (find_ids.length>1) {
$('#menu_find').find('[type="button"]').css("visibility", "visible");
}

$("#siteMapTree").jstree("deselect_all").jstree("select_node", "#"+find_ids[find_index]);
return false;
});
$("#menu_find").find('[type="button"]').click(function(){
find_index++;
if (find_ids.length <= find_index){
find_index = 0;
}

$("#siteMapTree").jstree("deselect_all").jstree("select_node", "#"+find_ids[find_index]);
});
<!--@end-->

<!--@if($act == 'dispMenuAdminSiteDesign')-->
Expand Down Expand Up @@ -3918,15 +3989,17 @@ <h1>{$lang->full_settings}</h1>
<!--@else-->
$(window).resize(function(){
var wHeigh = $(window).height();

$('#site').height(wHeigh - 147).find('>.col').height(wHeigh - 185).find('.cnt').height(wHeigh - 252);
$('#properties, #propertiesRoot, #imgbtn, #layoutSetup, #layoutMarkupSetup, #skinSetup').find('.cnt').height(wHeigh - 222);

<!--@if($act == 'dispMenuAdminSiteMap')-->
// minus height 40px for find-form display
$('#site').find('.cnt:first').height(wHeigh - 252 - 40);
$('#design').find('.cnt').height(wHeigh - 222);
<!--@end-->

<!--@if($act == 'dispMenuAdminSiteDesign')-->

$('#layout, #skin').find('.cnt').height(wHeigh - 222);
<!--@end-->
}).resize();
Expand Down
25 changes: 25 additions & 0 deletions modules/module/module.controller.php
Expand Up @@ -119,6 +119,31 @@ function deleteTrigger($trigger_name, $module, $type, $called_method, $called_po
return $output;
}

/**
* @brief Delete module trigger
*
*/
function deleteModuleTriggers($module)
{
$args = new stdClass();
$args->module = $module;

$output = executeQuery('module.deleteModuleTriggers', $args);
if($output->toBool())
{
//remove from cache
$GLOBALS['__triggers__'] = NULL;
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
if($oCacheHandler->isSupport())
{
$cache_key = 'triggers';
$oCacheHandler->delete($cache_key);
}
}

return $output;
}

/**
* @brief Add module extend
*
Expand Down
8 changes: 8 additions & 0 deletions modules/module/queries/deleteModuleTriggers.xml
@@ -0,0 +1,8 @@
<query id="deleteModuleTriggers" action="delete">
<tables>
<table name="module_trigger" />
</tables>
<conditions>
<condition operation="equal" column="module" var="module" notnull="notnull" />
</conditions>
</query>
22 changes: 22 additions & 0 deletions modules/point/lang/lang.xml
Expand Up @@ -47,6 +47,28 @@
<value xml:lang="tr"><![CDATA[Pano/blog gibi her modülün, "yazma/silme/yorum ekleme/yorum silme gibi kendi eylemleri bulunmaktadır. ".<br />Pano/blog harici, puan sistemli link modüllerine davranış değerleri ekleyebilirsiniz.<br />Virgül(,) çoklu değerleri ayıracaktır.]]></value>
<value xml:lang="vi"><![CDATA[Mỗi Module, Board hay Blog có một mức cho điểm khác nhau khi "gửi bài, xóa bài, thêm bài, gửi bình luận, xóa bình luận".<br />Bạn có thể chỉ thêm những giá trị liên kết với hệ thống điểm vào mỗi Module Blog, Board.<br />Để thêm nhiều giá trị bằng cách sử dụng dấu (,) giữa các giá trị.]]></value>
</item>
<item name="point_io">
<value xml:lang="ko"><![CDATA[포인트 모듈 켜기]]></value>
<value xml:lang="en"><![CDATA[Point module On]]></value>
<value xml:lang="jp"><![CDATA[Point module On]]></value>
<value xml:lang="zh-CN"><![CDATA[Point module On]]></value>
<value xml:lang="zh-TW"><![CDATA[Point module On]]></value>
<value xml:lang="ru"><![CDATA[Point module On]]></value>
<value xml:lang="es"><![CDATA[Point module On]]></value>
<value xml:lang="tr"><![CDATA[Point module On]]></value>
<value xml:lang="vi"><![CDATA[Point module On]]></value>
</item>
<item name="about_point_io">
<value xml:lang="ko"><![CDATA[체크 하면 포인트 모듈 기능을 켤 수 있습니다. 포인트 모듈 기능을 끌 경우, 포인트 모듈의 모든 트리거가 삭제됩니다. 포인트 기록은 유지되지만 새로 기록 되지는 않습니다.]]></value>
<value xml:lang="en"><![CDATA[Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Point record would be preserved.]]></value>
<value xml:lang="jp"><![CDATA[Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Point record would be preserved.]]></value>
<value xml:lang="zh-CN"><![CDATA[Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Point record would be preserved.]]></value>
<value xml:lang="zh-TW"><![CDATA[Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Point record would be preserved.]]></value>
<value xml:lang="ru"><![CDATA[Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Point record would be preserved.]]></value>
<value xml:lang="es"><![CDATA[Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Point record would be preserved.]]></value>
<value xml:lang="tr"><![CDATA[Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Point record would be preserved.]]></value>
<value xml:lang="vi"><![CDATA[Point module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Point record would be preserved.]]></value>
</item>
<item name="max_level">
<value xml:lang="ko"><![CDATA[최고 레벨]]></value>
<value xml:lang="en"><![CDATA[Max Level]]></value>
Expand Down

0 comments on commit 5e6ea99

Please sign in to comment.