{"action":"created","issue":{"url":"https://api.github.com/repos/OpenTouryoProject/OpenTouryo/issues/129","labels_url":"https://api.github.com/repos/OpenTouryoProject/OpenTouryo/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/OpenTouryoProject/OpenTouryo/issues/129/comments","events_url":"https://api.github.com/repos/OpenTouryoProject/OpenTouryo/issues/129/events","html_url":"https://github.com/OpenTouryoProject/OpenTouryo/issues/129","id":119909460,"number":129,"title":"Porting three functions of ASP.NET to ASP.NET MVC.","user":{"login":"daisukenishino","id":5975160,"avatar_url":"https://avatars.githubusercontent.com/u/5975160?v=3","gravatar_id":"","url":"https://api.github.com/users/daisukenishino","html_url":"https://github.com/daisukenishino","followers_url":"https://api.github.com/users/daisukenishino/followers","following_url":"https://api.github.com/users/daisukenishino/following{/other_user}","gists_url":"https://api.github.com/users/daisukenishino/gists{/gist_id}","starred_url":"https://api.github.com/users/daisukenishino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daisukenishino/subscriptions","organizations_url":"https://api.github.com/users/daisukenishino/orgs","repos_url":"https://api.github.com/users/daisukenishino/repos","events_url":"https://api.github.com/users/daisukenishino/events{/privacy}","received_events_url":"https://api.github.com/users/daisukenishino/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenTouryoProject/OpenTouryo/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-12-02T10:13:19Z","updated_at":"2016-01-18T12:06:31Z","closed_at":null,"body":"# Requirement\r\nPlease port several functions of ASP.NET to ASP.NET MVC.\r\n\r\nFor the realization of above requirements, please modify the program of root_VS2012.\r\n\r\n## (1) The function to prevent session timeout.\r\nI think that this function is able to be ported in ASP.NET MVC easily.\r\nThe original function is implemented in the following program.\r\n\r\n- common.js#L65  \r\nhttps://github.com/OpenTouryoProject/OpenTouryo/blob/develop/root/programs/C%23/Samples/WebApp_sample/ProjectX_sample/Framework/Js/common.js#L65\r\n\r\n## (2) The function to prevent double submission.\r\nSee the following issue.\r\nhttps://github.com/OpenTouryoProject/OpenTouryo/issues/112\r\n\r\nThe original function is implemented in the following program.\r\n\r\n- common.js#L179  \r\nhttps://github.com/OpenTouryoProject/OpenTouryo/blob/develop/root/programs/C%23/Samples/WebApp_sample/ProjectX_sample/Framework/Js/common.js#L179\r\n\r\nPlease consider the following points on realizing this function.\r\n\r\n### Multiple forms\r\nIn ASP.NET MVC, one page (View) may have plural forms. And, controller class can not control the attributes of the form in the page (View).\r\nTherefore, like the following samples, this function should be realized by using JavaScript.\r\n\r\n- 【ASP.NET】リンクボタンの二度押し防止 - QA@IT  \r\nhttp://qa.atmarkit.co.jp/q/1401\r\n- ASP.NET & JavaScriptでコード汚染をしないで2度押し防止 - 手抜きぷろぐらまのメモ帳\r\nhttp://d.hatena.ne.jp/itaosan/20061225/1167025092\r\n\r\nI think the there are two realization methods.\r\n\r\n- Search all forms in page and add \"onsubmit\" event handler in form tag.\r\n- Add event lisner in JavaScript file.\r\nLike the following sample.\r\n\r\n```js\r\n// In case of using JQuery\r\n$('form').submit(function() {\r\n    // function to prevent double submittion.\r\n});\r\n```\r\n\r\n### Ajax.BeginForm\r\nBecause original function supports the UpdatePanel of ASP.NET Ajax currently, I think that this function has to support Ajax.BeginForm. See https://github.com/OpenTouryoProject/OpenTouryo/issues/129#issuecomment-171613308.\r\n\r\n## (3) The function to show progress dialog.\r\nI think that this function is able to be ported in ASP.NET MVC easily.\r\nThe original function is implemented in the following program.\r\n\r\n- common.js#L413  \r\nhttps://github.com/OpenTouryoProject/OpenTouryo/blob/develop/root/programs/C%23/Samples/WebApp_sample/ProjectX_sample/Framework/Js/common.js#L413\r\n\r\nBecause original function does not support the UpdatePanel of ASP.NET Ajax currently, I think that this function does not have to support Ajax.BeginForm."},"comment":{"url":"https://api.github.com/repos/OpenTouryoProject/OpenTouryo/issues/comments/172511276","html_url":"https://github.com/OpenTouryoProject/OpenTouryo/issues/129#issuecomment-172511276","issue_url":"https://api.github.com/repos/OpenTouryoProject/OpenTouryo/issues/129","id":172511276,"user":{"login":"kishoreandukuri","id":7530499,"avatar_url":"https://avatars.githubusercontent.com/u/7530499?v=3","gravatar_id":"","url":"https://api.github.com/users/kishoreandukuri","html_url":"https://github.com/kishoreandukuri","followers_url":"https://api.github.com/users/kishoreandukuri/followers","following_url":"https://api.github.com/users/kishoreandukuri/following{/other_user}","gists_url":"https://api.github.com/users/kishoreandukuri/gists{/gist_id}","starred_url":"https://api.github.com/users/kishoreandukuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kishoreandukuri/subscriptions","organizations_url":"https://api.github.com/users/kishoreandukuri/orgs","repos_url":"https://api.github.com/users/kishoreandukuri/repos","events_url":"https://api.github.com/users/kishoreandukuri/events{/privacy}","received_events_url":"https://api.github.com/users/kishoreandukuri/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T12:06:31Z","updated_at":"2016-01-18T12:06:31Z","body":"@daisukenishino \r\n>Please tell me how to set the flag.\r\nWe will implement sample code and show it to you in tomorrow's meeting"}}