Skip to content

Commit

Permalink
refs #514 : merge test with 2.0 tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
inureyes committed Feb 22, 2011
2 parents cee793d + 4f33b29 commit fe7ebbe
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion interface/common/owner/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
}
if (file_exists(ROOT . $context->getProperty('panel.skin')."/custom.js")) {
?>
<script type="text/javascript" src="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/custom.js" />
<script type="text/javascript" src="<?php echo $context->getProperty('service.path').$context->getProperty('panel.skin');?>/custom.js"></script>
<?php
}
if($service['interface'] == 'simple') {
Expand Down
4 changes: 2 additions & 2 deletions interface/owner/entry/category/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function validateText(str) {
?>
<dd>
<div class="field-box">
<input type="text" id="newCategory" class="input-text" name="newCategory" onkeyup="if (event.keyCode == 13 &amp;&amp; validateText(this.value)) {addCategory()}" />
<input type="text" id="newCategory" class="input-text" name="newCategory" onkeyup="if (event.keyCode == 13 &amp;&amp; validateText(this.value)) {addCategory();return false;}" />
<input type="button" class="add-button input-button" value="<?php echo _t('추가하기');?>" onclick="addCategory(); return false;" />
</div>
<p>
Expand Down Expand Up @@ -272,7 +272,7 @@ function validateText(str) {
} else {
?>
<div class="field-box">
<input type="button" class="remove-button input-button" value="<?php echo _t('삭제하기');?>" onclick="removeCategory();" />
<input type="button" class="remove-button input-button" value="<?php echo _t('삭제하기');?>" onclick="removeCategory();return false;" />
</div>
<?php
}
Expand Down
2 changes: 1 addition & 1 deletion interface/owner/entry/edit/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ function EntryManager() {
if(originalPermalink == changedPermalink) {
returnURI = "<?php echo escapeJSInCData($_GET['returnURL']);?>";
} else {
returnURI = "<?php echo escapeJSInCData("$context->getProperty('uri.blog')/" . $entry['id']);?>";
returnURI = "<?php echo escapeJSInCData($context->getProperty('uri.blog')) ."/" . $entry['id'];?>";
}
<?php
}
Expand Down
5 changes: 2 additions & 3 deletions library/model/blog.category.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function getNumberChildCategory($id = null) {
$pool = DBModel::getInstance();
$pool->reset('Categories');
$pool->setQualifier('blogid','eq',getBlogId());
$pool->serQualifier('parent','eq',($id === null ? NULL : $id));
$pool->setQualifier('parent','eq',($id === null ? NULL : $id));
return $pool->getCount();
}

Expand All @@ -207,13 +207,12 @@ function getNumberEntryInCategories($id) {
$pool->reset('Entries');
$pool->setQualifier('blogid','eq',getBlogId());
$pool->setQualifier('draft','eq',0);
$pool->serQualifier('category','eq',($id === null ? NULL : $id));
$pool->setQualifier('category','eq',($id === null ? NULL : $id));
return $pool->getCount();
}

function addCategory($blogid, $parent, $name, $id = null, $priority = null) {
$pool = DBModel::getInstance();

if (empty($name))
return false;
if (!is_null($parent) && !Validator::id($parent))
Expand Down
30 changes: 16 additions & 14 deletions skin/admin/frame/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,45 @@
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)

//<![CDATA[
jQuery(function($){
jQuery(document).ready(function(jQuery){
// Side Menu
var sMenu = $('#main-menu');
var sMenu = jQuery('#main-menu');
var sItem = sMenu.find('>li');
var ssItem = sMenu.find('>li>ul>li');
var lastEvent = null;

function sMenuToggle(event){
var t = $(this);
var mainmenuItem = jQuery(this);

if (this == lastEvent) return false;
lastEvent = this;
setTimeout(function(){ lastEvent=null }, 200);

if (t.next('ul').is(':hidden')) {
if (mainmenuItem.next('ul').is(':hidden')) {
sItem.find('>ul').slideUp(100);
t.next('ul').slideDown(100);
} else if(!t.next('ul').length) {
mainmenuItem.next('ul').slideDown(100);
} else if(!mainmenuItem.next('ul').length) {
sItem.find('>ul').slideUp(100);
} else {
t.next('ul').slideUp(100);
mainmenuItem.next('ul').slideUp(100);
}

if (t.parent('li').hasClass('selected')){
t.parent('li').removeClass('selected');
if (mainmenuItem.parent('li').hasClass('selected')){
mainmenuItem.parent('li').removeClass('selected');
} else {
sItem.removeClass('selected');
t.parent('li').addClass('selected');
mainmenuItem.parent('li').addClass('selected');
}
return false;
}
sItem.find('>a').click(sMenuToggle).focus(sMenuToggle);
sItem.find('>a').attr ('href', '#');

function subMenuActive(){
ssItem.removeClass('selected');
$(this).parent(ssItem).addClass('selected');
jQuery(this).parent(ssItem).addClass('selected');
return true;
};
sItem.find('>a').click(sMenuToggle).focus(sMenuToggle);
sItem.find('>a').attr('href', '#');
ssItem.find('>a').click(subMenuActive).focus(subMenuActive);
});
//]]>
//]]>

0 comments on commit fe7ebbe

Please sign in to comment.