From 18b6797daec245750326962a5a0c07d4214bb840 Mon Sep 17 00:00:00 2001 From: inureyes Date: Sun, 6 Mar 2011 21:40:18 -0500 Subject: [PATCH] refs #896 : Added : Migrate from mootools-related fx to jQuery. refs #1269 : Added : jQuery-related menu expanding/shrinking --- framework/id/textcube/config.default.php | 2 +- interface/common/control/header.php | 7 ----- interface/common/owner/header.php | 7 ----- interface/owner/setting/blog/index.php | 10 +++---- library/model/blog.fx.php | 36 ++++++++++++++---------- skin/admin/frame/basic.css | 2 +- skin/admin/frame/setting.css | 5 +++- 7 files changed, 31 insertions(+), 38 deletions(-) diff --git a/framework/id/textcube/config.default.php b/framework/id/textcube/config.default.php index 6cf88f2ba..453a5083b 100644 --- a/framework/id/textcube/config.default.php +++ b/framework/id/textcube/config.default.php @@ -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; diff --git a/interface/common/control/header.php b/interface/common/control/header.php index de66bd2da..7b82e68fe 100644 --- a/interface/common/control/header.php +++ b/interface/common/control/header.php @@ -359,13 +359,6 @@ getProperty('service.interface') == 'simple') { - if(!in_array($blogMenu['contentMenu'],array('post','edit'))) { -?> - -getProperty('service.admin_script') !== null) { if( is_array($context->getProperty('service.admin_script')) ) { foreach( $context->getProperty('service.admin_script') as $src ) { diff --git a/interface/common/owner/header.php b/interface/common/owner/header.php index 1f61541d5..9e053e2ac 100644 --- a/interface/common/owner/header.php +++ b/interface/common/owner/header.php @@ -383,13 +383,6 @@ - -"; var entriesOnRSS = ""; var publishWholeOnRSS = ""; - var allowCommentGuestbook = ; - var blogVisibility = ; - var frontPage = ; - + var allowCommentGuestbook = getProperty('blog.allowWriteDblCommentOnGuestbook');?>; + var blogVisibility = getProperty('blog.visibility');?>; function setFrontpage() { var frontPage; @@ -830,9 +828,9 @@ function setLocale() {
-

+

-
+
diff --git a/library/model/blog.fx.php b/library/model/blog.fx.php index 68b80e139..bfae4ed64 100644 --- a/library/model/blog.fx.php +++ b/library/model/blog.fx.php @@ -5,13 +5,14 @@ $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.'
'.CRLF .TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.''.CRLF .TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'
'._t('자세한 설정 보기').'
'.CRLF @@ -19,14 +20,14 @@ function setDetailPanel($id,$type = 'section',$string = '') { } break; case 'link': - if($service['interface'] == 'simple') { + if($context->getProperty('service.interface') == 'simple') { $hrefVal = ''.$string.''; } 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.'
'.CRLF .TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'
'._t('패널 보기 설정').'
'.CRLF .TAB.TAB.TAB.TAB.TAB.TAB.TAB.TAB.'
'._t('패널 열기').'
'.CRLF @@ -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; } -?> +?> \ No newline at end of file diff --git a/skin/admin/frame/basic.css b/skin/admin/frame/basic.css index 5f9fd5b1c..097fcfb19 100644 --- a/skin/admin/frame/basic.css +++ b/skin/admin/frame/basic.css @@ -559,4 +559,4 @@ input.input-text color : #000 !important; filter : alpha(opacity=90); opacity : .90; -} \ No newline at end of file +} diff --git a/skin/admin/frame/setting.css b/skin/admin/frame/setting.css index 5b50deeb8..9b6e26f08 100644 --- a/skin/admin/frame/setting.css +++ b/skin/admin/frame/setting.css @@ -1,7 +1,10 @@ @charset "utf-8"; /* Common *****************************************************************************************/ - +h2.caption { + display : block; + font-size : 1.1em; +} fieldset { background-image : none;