source: branches/version-2_5-dev/html/user_data/packages/admin/js/layout_design.js @ 19712

Revision 19712, 2.5 KB checked in by nanasess, 13 years ago (diff)
  • #628(未使用処理・定義などの削除)
    • html/misc 以下のファイル
    • キャンペーン関連の tpl ファイル
    • アンケート関連の tpl ファイル
    • shopping 以下の不要と思われるファイルを削除
  • #642(共通ロジックの機能向上)
    • フロント, 管理画面共通で使用する JavaScript? ファイルを html/js 以下へ移動
Line 
1/*
2 * This file is part of EC-CUBE
3 *
4 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
5 *
6 * http://www.lockon.co.jp/
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 */
22(function($){
23    var updateUpDown = function(sortable){
24        $('div:not(.ui-sortable-helper)', sortable)
25            .removeClass('first')
26            .filter(':first').addClass('first').end()
27            .children('input.target-id').val(sortable.id).end()
28            .each(function(){
29                var top = $(this).prevAll().length + 1;
30                $(this).children('input.top').val(top);
31            });
32    };
33   
34    var sortableUpdate = function(e, ui){
35        updateUpDown(this);
36        if(ui.sender)
37            updateUpDown(ui.sender[0]);
38    };
39   
40    $(document).ready(function(){
41        var els = ['#MainHead', '#MainFoot', '#LeftNavi', '#RightNavi', '#TopNavi', '#BottomNavi', '#HeadNavi', '#HeaderTopNavi', '#FooterBottomNavi', '#HeaderInternalNavi', '#Unused'];
42        var $els = $(els.toString());
43       
44        $els.each(function(){
45            updateUpDown(this);
46        });
47       
48        $els.sortable({
49            items: '> div',
50            //handle: 'dt',
51            cursor: 'move',
52            //cursorAt: { top: 2, left: 2 },
53            //opacity: 0.8,
54            //helper: 'clone',
55            appendTo: 'body',
56            placeholder: 'clone',
57            placeholder: 'placeholder',
58            connectWith: els,
59            start: function(e,ui) {
60                ui.helper.css("width", ui.item.width());
61            },
62            //change: sortableChange,
63            update: sortableUpdate
64        });
65    });
66   
67    $(window).bind('load',function(){
68        setTimeout(function(){
69            $('#overlay').fadeOut(function(){
70                $('body').css('overflow', 'auto');
71            });
72        }, 750);
73    });
74})(jQuery);
Note: See TracBrowser for help on using the repository browser.