Created
August 3, 2010 07:24
-
-
Save kawahara/505989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/apps/pc_frontend/modules/member/templates/homeSuccess.php b/apps/pc_frontend/modules/member/templates/homeSuccess.php | |
index 43f5e3d..977ecf1 100644 | |
--- a/apps/pc_frontend/modules/member/templates/homeSuccess.php | |
+++ b/apps/pc_frontend/modules/member/templates/homeSuccess.php | |
@@ -1,5 +1,21 @@ | |
<?php use_helper('Javascript') ?> | |
+<?php $sortable_params = array( | |
+ 'tag' => 'div', | |
+ 'handle' => 'partsHeading', | |
+ 'onChange' => 'function(obj){storeSort(obj)}', | |
+ 'dropOnEmpty' => true, | |
+ 'constraint' => false, | |
+ 'containment' => array() | |
+); | |
+ | |
+if (isset($topGadgets)) $sortable_params['containment'][] = 'Top'; | |
+if (isset($sideMenuGadgets)) $sortable_params['containment'][] = 'Left'; | |
+if (isset($contentsGadgets)) $sortable_params['containment'][] = 'Center'; | |
+if (isset($bottomGadgets)) $sortable_params['containment'][] = 'Bottom'; | |
+ | |
+?> | |
+ | |
<?php if (isset($topGadgets)): ?> | |
<?php slot('op_top') ?> | |
<?php foreach ($topGadgets as $gadget): ?> | |
@@ -8,7 +24,7 @@ | |
<?php endif; ?> | |
<?php endforeach; ?> | |
<?php end_slot() ?> | |
-<?php echo sortable_element('Top', array('tag' => 'div', 'handle' => 'partsHeading', 'onChange' => 'function(obj){storeSort(obj)}')) ?> | |
+<?php echo sortable_element('Top', $sortable_params) ?> | |
<?php endif; ?> | |
<?php if (isset($sideMenuGadgets)): ?> | |
@@ -19,7 +35,7 @@ | |
<?php endif; ?> | |
<?php endforeach; ?> | |
<?php end_slot() ?> | |
-<?php echo sortable_element('Left', array('tag' => 'div', 'handle' => 'partsHeading', 'onChange' => 'function(obj){storeSort(obj)}')) ?> | |
+<?php echo sortable_element('Left', $sortable_params) ?> | |
<?php endif; ?> | |
<?php if (isset($contentsGadgets)): ?> | |
@@ -28,7 +44,7 @@ | |
<?php include_component($gadget->getComponentModule(), $gadget->getComponentAction(), array('gadget' => $gadget)); ?> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
-<?php echo sortable_element('Center', array('tag' => 'div', 'handle' => 'partsHeading', 'onChange' => 'function(obj){storeSort(obj)}')) ?> | |
+<?php echo sortable_element('Center', $sortable_params) ?> | |
<?php endif; ?> | |
<?php if (isset($bottomGadgets)): ?> | |
@@ -39,7 +55,7 @@ | |
<?php endif; ?> | |
<?php endforeach; ?> | |
<?php end_slot() ?> | |
-<?php echo sortable_element('Bottom', array('tag' => 'div', 'handle' => 'partsHeading')) ?> | |
+<?php echo sortable_element('Bottom', $sortable_params) ?> | |
<?php endif; ?> | |
<?php echo javascript_tag(' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
俺メモ
現状いろいろ難有り
例えば
改善できしだい本線に入れるけどね。
(このパッチは、こんな試みをしてみたいと思いますよ的な意思表明的なパッチであります)