OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / widgets / s / slide_menu / include / template / index.tmpl.html
1 /**\r
2  * 表示データ作成用テンプレート(patTemplate)\r
3  *\r
4  * LICENSE: This source file is licensed under the terms of the GNU General Public License.\r
5  *\r
6  * @package    Magic3 Framework\r
7  * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>\r
8  * @copyright  Copyright 2006-2012 Magic3 Project.\r
9  * @license    http://www.gnu.org/copyleft/gpl.html  GPL License\r
10  * @version    SVN: $Id: index.tmpl.html 4947 2012-06-08 02:15:04Z fishbone $\r
11  * @link       http://www.magic3.org\r
12  */\r
13 <patTemplate:tmpl name="_widget">\r
14 <ul id="{CSS_ID}" class="{MENU_CLASS}{MENU_OPTION}">\r
15 {MENU_HTML}\r
16 </ul>\r
17 <script type="text/javascript">\r
18 //<![CDATA[\r
19 $(function(){\r
20         $.each($('ul.{MENU_CLASS}'), function(){\r
21                 $('#' + this.id + ' ul.expand').show();\r
22         });\r
23         $('ul.{MENU_CLASS} li a').click(\r
24                 function(){\r
25                         var nextItem = $(this).next();\r
26                         var parent = this.parentNode.parentNode.id;\r
27 \r
28                         if ($('#' + parent).hasClass('noaccordion')){\r
29                                 $(this).next().slideToggle('{MENU_SPEED}');\r
30                                 return false;\r
31                         }\r
32                         if ((nextItem.is('ul')) && (nextItem.is(':visible'))){\r
33                                 if($('#' + parent).hasClass('collapsible')) {\r
34                                         $('#' + parent + ' ul:visible').slideUp('{MENU_SPEED}');\r
35                                 }\r
36                                 return false;\r
37                         }\r
38                         if ((nextItem.is('ul')) && (!nextItem.is(':visible'))){\r
39                                 $('#' + parent + ' ul:visible').slideUp('{MENU_SPEED}');\r
40                                 nextItem.slideDown('{MENU_SPEED}');\r
41                                 return false;\r
42                         }\r
43                 }\r
44         );\r
45 });\r
46 //]]>\r
47 </script>\r
48 </patTemplate:tmpl>\r