source: branches/comu/data/Smarty/templates/campaign/index.tpl @ 12119

Revision 12119, 2.1 KB checked in by nanasess, 17 years ago (diff)

モバイル正式対応

Line 
1<!--{*ヘッダー読込*}-->
2<!--{include file=`$tpl_dir_name`/header.tpl}-->
3
4<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/site.js"></script>
5<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/navi.js"></script>
6<script type="text/javascript">
7<!--
8<!--{$tpl_javascript}-->
9
10// セレクトボックスに項目を割り当てる。
11function lnSetSelect(name1, name2, id, val) {
12    sele1 = document.form1[name1];
13    sele2 = document.form1[name2];
14    lists = eval('lists' + id);
15    vals = eval('vals' + id);
16   
17    if(sele1 && sele2) {
18        index = sele1.selectedIndex;
19       
20        // セレクトボックスのクリア
21        count = sele2.options.length;
22        for(i = count; i >= 0; i--) {
23            sele2.options[i] = null;
24        }
25       
26        // セレクトボックスに値を割り当てる
27        len = lists[index].length;
28        for(i = 0; i < len; i++) {
29            sele2.options[i] = new Option(lists[index][i], vals[index][i]);
30            if(val != "" && vals[index][i] == val) {
31                sele2.options[i].selected = true;
32            }
33        }
34    }
35}
36
37// 全商品IDを取得する
38function fnGetIds() {
39    var change_tag = document.getElementsByTagName("div");
40    var ids = "";
41    var count = 0;
42
43    for (var i = 0; i < change_tag.length; i++) {
44        str = change_tag.item(i).id;
45        if (str.match('cart_tag_*')) {
46            var nama_id = change_tag.item(i).id;
47            arrIds =  nama_id.split("_");
48
49            if (count > 0) ids += '-';         
50            ids += arrIds[2];
51            count ++;
52        }
53    }
54   
55    return ids;
56}
57
58// 読込後に実行する(on_load)
59function init() {
60    if(<!--{$tpl_init}-->) {
61        var ids = fnGetIds();
62        location.href = './index.php?init=1&ids=' + ids;
63    } else {
64        <!--{$tpl_onload}-->
65    }
66}
67
68window.onload = init;
69
70//-->
71</script>
72<form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->">
73<input type="hidden" name="mode" value="cart">
74<input type="hidden" name="product_id" value="">
75<input type="hidden" name="cp" value="true">
76
77<!--{*コンテンツ読込*}-->
78<!--{include file=`$tpl_dir_name`/contents.tpl}-->
79
80</form>
81
82<!--{*フッター読込*}-->
83<!--{include file=`$tpl_dir_name`/footer.tpl}-->
Note: See TracBrowser for help on using the repository browser.