Skip to content

Commit

Permalink
refs #896 : Added : Migrate from mootools-related fx to jQuery.
Browse files Browse the repository at this point in the history
 refs #1269 : Added : jQuery-related menu expanding/shrinking
  • Loading branch information
inureyes committed Mar 7, 2011
1 parent 867a96c commit 18b6797
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 38 deletions.
2 changes: 1 addition & 1 deletion framework/id/textcube/config.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
$service['flashclipboardpoter'] = true;
$service['allowBlogVisibilitySetting'] = true;
$service['disableEolinSuggestion'] = false;
$service['interface'] = 'simple'; // 'simple' or 'detail'. Default is 'detail'
$service['interface'] = 'simple'; // 'simple' or 'detail'. Default is 'simple' from 2.0
$service['pagecache'] = true;
$service['codecache'] = false;
$service['skincache'] = true;
Expand Down
7 changes: 0 additions & 7 deletions interface/common/control/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,6 @@
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/common2.js"></script>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/owner.js"></script>
<?php
if($context->getProperty('service.interface') == 'simple') {
if(!in_array($blogMenu['contentMenu'],array('post','edit'))) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/mootools.js"></script>
<?php
}
}
if( $context->getProperty('service.admin_script') !== null) {
if( is_array($context->getProperty('service.admin_script')) ) {
foreach( $context->getProperty('service.admin_script') as $src ) {
Expand Down
7 changes: 0 additions & 7 deletions interface/common/owner/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,6 @@
<script type="text/javascript" src="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/custom.js"></script>
<?php
}
if($service['interface'] == 'simple') {
if(!in_array($blogMenu['contentMenu'],array('post','edit'))) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path');?>/resources/script/mootools.js"></script>
<?php
}
}
if( isset($service['admin_script']) ) {
if( is_array($service['admin_script']) ) {
foreach( $service['admin_script'] as $src ) {
Expand Down
10 changes: 4 additions & 6 deletions interface/owner/setting/blog/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,8 @@ function setIcons() {
var useFeedViewOnCategory = "<?php echo $blog['useFeedViewOnCategory'];?>";
var entriesOnRSS = "<?php echo $blog['entriesOnRSS'];?>";
var publishWholeOnRSS = "<?php echo $blog['publishWholeOnRSS'];?>";
var allowCommentGuestbook = <?php echo $blog['allowWriteDblCommentOnGuestbook'];?>;
var blogVisibility = <?php echo $blog['visibility'];?>;
var frontPage = <?php echo $blog['frontpage'];?>;

var allowCommentGuestbook = <?php echo $context->getProperty('blog.allowWriteDblCommentOnGuestbook');?>;
var blogVisibility = <?php echo $context->getProperty('blog.visibility');?>;

function setFrontpage() {
var frontPage;
Expand Down Expand Up @@ -830,9 +828,9 @@ function setLocale() {
<hr class="hidden" />

<div id="part-setting-language" class="part">
<h2 class="caption"><span class="main-text"><?php echo setDetailPanel('language_setting','link',_t('언어, 시간대를 설정합니다'));?></span></h2>
<h2 class="caption"><span class="main-text"><?php echo setDetailPanel('language-setting','link',_t('언어, 시간대를 설정합니다'));?></span></h2>
<form id="language-form" class="data-inbox" method="post" action="<?php echo parseURL($context->getProperty('uri.blog').'/owner/setting/blog/language');?>">
<div id="language_setting" class="section folding">
<div id="language-setting" class="section folding">
<fieldset class="container">
<legend><?php echo _t('언어 및 시간대');?></legend>

Expand Down
36 changes: 21 additions & 15 deletions library/model/blog.fx.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,29 @@

$fxList = array();
function setDetailPanel($id,$type = 'section',$string = '') {
global $fxList, $service;
global $fxList;
$context = Model_Context::getInstance();
// if(in_array($fxList,$id)) return '';
array_push($fxList, $id);
$hrefVal = '';
switch($type) {
case 'button':
if($service['interface'] == 'simple') {
if($context->getProperty('service.interface') == 'simple') {
$hrefVal = TAB.TAB.TAB.TAB.TAB.TAB.TAB.'<dl class="line">'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'<dt class="hidden">'._t('패널 보기 설정').'</dt>'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'<dd><span class="input-button"><a id="toggle'.$id.'" href="#">'._t('자세한 설정 보기').'</a></span></dd>'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'</dl>'.CRLF;
}
break;
case 'link':
if($service['interface'] == 'simple') {
if($context->getProperty('service.interface') == 'simple') {
$hrefVal = '<a id="toggle'.$id.'" href="#">'.$string.'</a>';
} else {
$hrefVal = $string;
}
break;
case 'sectionButton': default:
if($service['interface'] == 'simple') {
if($context->getProperty('service.interface')== 'simple') {
$hrefVal = TAB.TAB.TAB.TAB.TAB.TAB.TAB.'<dl class="panel-setting">'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'<dt>'._t('패널 보기 설정').'</dt>'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'<dd><a id="toggle'.$id.'" href="#">'._t('패널 열기').'</a></dd>'.CRLF
Expand All @@ -38,19 +39,24 @@ function setDetailPanel($id,$type = 'section',$string = '') {
}

function activateDetailPanelJS() {
global $fxList, $service;
global $fxList;
$context = Model_Context::getInstance();
$jsVal = '';
if(!empty($fxList) && ($service['interface'] == 'simple')) {
if(!empty($fxList) && ($context->getProperty('service.interface') == 'simple')) {
$jsVal = "jQuery(document).ready(function(jQuery) {".CRLF;
foreach($fxList as $fxItem) {
$jsVal .= "var ".$fxItem." = new Fx.Slide('".$fxItem."');".CRLF
."$('toggle".$fxItem."').addEvent('click', function(e){".CRLF
."e = new Event(e);".CRLF
.$fxItem.".slideIn();".CRLF
."e.stop();".CRLF
."});".CRLF
.$fxItem.".hide();".CRLF;
}
$jsVal .= TAB.TAB.TAB.TAB.TAB.TAB.TAB.'jQuery("#toggle'.$fxItem.'").click( function() {'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'if (jQuery("#'.$fxItem.'").is(":hidden")) {'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.' jQuery("#'.$fxItem.'").slideDown(150);'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'} else {'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.' jQuery("#'.$fxItem.'").slideUp(150);'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'}'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'return false;'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'});'.CRLF
.TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'jQuery("#'.$fxItem.'").css("display","none");'.CRLF;
}
$jsVal .= TAB.TAB.TAB.TAB.TAB.TAB.TAB."});".CRLF;
}
return $jsVal;
}
?>
?>
2 changes: 1 addition & 1 deletion skin/admin/frame/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -559,4 +559,4 @@ input.input-text
color : #000 !important;
filter : alpha(opacity=90);
opacity : .90;
}
}
5 changes: 4 additions & 1 deletion skin/admin/frame/setting.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
@charset "utf-8";

/* Common *****************************************************************************************/

h2.caption {
display : block;
font-size : 1.1em;
}
fieldset
{
background-image : none;
Expand Down

0 comments on commit 18b6797

Please sign in to comment.