Changeset 16878


Ignore:
Timestamp:
2007/12/03 22:05:04 (16 years ago)
Author:
adachi
Message:

ダウンロード後のボタン表示変更処理追加

Location:
branches/feature-module-update
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/Smarty/templates/default/admin/ownersstore/products_list.tpl

    r16875 r16878  
    3030         
    3131        <td align="center"> 
     32            <div id="ownersstore_download"> 
    3233            <!--{* インストール済み かつ 新バージョンが公開している場合 はアップデートボタン表示 *}--> 
    3334            <!--{if $product.installed_flg && $product.version_up_flg}--> 
     
    4344                -- 
    4445            <!--{/if}--> 
     46            </div> 
    4547        </td> 
    4648             
     
    5456                </span> 
    5557            <!--{else}--> 
    56                 -- 
     58                <div id='ownersstore_settings' style="display:none"> 
     59                <span class="icon_confirm"> 
     60                <a href="" onclick="win02('../load_module_config.php?module_id=<!--{$product.product_id}-->', 'load', 600, 400);return false;"> 
     61                   設定 
     62                </a> 
     63                </span> 
     64                </div> 
     65                <div id='ownersstore_settings_default' style="display:bloc">--</div> 
    5766            <!--{/if}--> 
    5867        </td> 
  • branches/feature-module-update/html/user_data/packages/default/js/ownersstore.js.php

    r16842 r16878  
    9090        $('#TB_load').show(); 
    9191    }, 
     92 
    9293    // show results 
    93     show_result: function(resp, status) { 
    94         var title    = resp.status; 
    95         var contents = resp.msg; 
    96         var errcode  = resp.errcode || '1000'; 
     94    show_result: function(resp, status, product_id) { 
     95        var title    = resp.status || 'ERROR'; 
     96        var contents = resp.msg || ''; 
    9797 
    9898        var TB_WIDTH = 400; 
     
    115115            $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; 
    116116            $("#TB_ajaxContent")[0].scrollTop = 0; 
    117  
    118117        } 
    119118 
     
    129128        $("#TB_ajaxContent").html(contents); 
    130129        $("#TB_window").css({display:"block"}); 
     130 
     131        // DL成功時に設定ボタンを表示 
     132        if (resp.status == 'SUCCESS' && product_id) { 
     133            $('#ownersstore_settings_default').hide(); // --を非表示 
     134            $('#ownersstore_settings').show();         // 設定ボタン表示 
     135            $('#ownersstore_download').html('--');     // インストール/アップロードボタンを--へ変換 
     136        } 
    131137    }, 
    132138 
     
    134140    download: function(product_id) { 
    135141        this.show_loading(); 
     142        var show = this.show_result; 
    136143        $.post( 
    137144            upgrade_url, 
    138145            {mode: 'download', product_id: product_id}, 
    139             this.show_result, 
     146            function(resp, status) { 
     147                show(resp, status, product_id); 
     148            }, 
    140149            'json' 
    141150        ) 
    142151    }, 
     152 
    143153    // get products list 
    144154    products_list: function() { 
     
    148158        $().ajaxError(this.show_result); 
    149159        $.post( 
    150            upgrade_url, 
     160            upgrade_url, 
    151161            {mode: 'products_list'}, 
    152162            function(resp, status) { 
Note: See TracChangeset for help on using the changeset viewer.