Ignore:
Timestamp:
Feb 9, 2017, 8:19:28 PM (7 years ago)
Author:
coas-nagasima
Message:

ソフトウェア情報を追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/webapp/webmrbc/MainMenuView.cs

    r270 r273  
    321321                }
    322322
     323                public void onInformationOpen()
     324                {
     325                        jQuery.Ajax(new AjaxOptions() {
     326                                Url = "/information.json",
     327                                DataType = "json",
     328                                Success = (data, textStatus, request) => {
     329                                        var items = (dynamic[])data;
     330
     331                                        var listview = jQuery.Select("#software-list");
     332                                        listview.Html("");
     333
     334                                        foreach (var item in items) {
     335                                                string title = item.title;
     336                                                string version = item.version;
     337                                                string link = item.link;
     338                                                string note = item.note;
     339
     340                                                var a = new jQuery("<a>").Attr("class", "list-group-item");
     341                                                a.Append(new jQuery("<h4>").Attr("class", "list-group-item-heading").Text(title));
     342                                                if (String.IsNullOrEmpty(link)) {
     343                                                        a.Attr("href", "#");
     344                                                }
     345                                                else {
     346                                                        a.Attr("href", link);
     347                                                        a.Attr("target", "_blank");
     348                                                }
     349                                                a.Append(new jQuery("<p>").Attr("class", "list-group-item-text").Text("Version " + version));
     350                                                if (!String.IsNullOrEmpty(note))
     351                                                        a.Append(new jQuery("<p>").Attr("class", "list-group-item-text").Text(note));
     352                                                listview.Append(a);
     353                                        }
     354
     355                                        var el = jQuery.Select("#information-modal");
     356                                        el.Modal(ModalOperation.Show);
     357                                },
     358                                Error = (request, textStatus, error) => {
     359                                },
     360                        });
     361                }
     362
     363                public void onInformationClose()
     364                {
     365                        var el = jQuery.Select("#information-modal");
     366                        el.Modal(ModalOperation.Hide);
     367                }
     368
    323369                private static void SelectBlockTab()
    324370                {
Note: See TracChangeset for help on using the changeset viewer.