Tipo Music UI 規劃原則
By Jax
原則
• 只要是 button 就要有包含 Icon
• 所有 User 操作的 Ajax 都要 Handle 等待、成功、失敗
StatusMsg
var StatusMsg = { 
clear: function () { }, 
alert: function (str) { }, 
error: function (str) { }, 
wait: functi...
ltcAjax
$.ltcAjax({
url: this.href,
waitMsg: ' 刪除中 ...',
button: this,
success: function (msg) {
StatusMsg.alert(msg);
$(t...
Message to Ajax
try
{
_useListRepo.DeleteSong(useListSongSN);
return Content(" 刪除成功 !!");
}
catch (Exception ex)
{
_log.Er...
Message to View
try
{
// ...
TempData["StatusSuccess"] = " 匯入成功 !!";                 
return RedirectToAction("AnalysisMus...
Message to View
try
{
// ...
TempData["StatusSuccess"] = " 匯入成功 !!";                 
return RedirectToAction("AnalysisMus...
Tipo music-ui-規劃原則
Tipo music-ui-規劃原則
Tipo music-ui-規劃原則
Upcoming SlideShare
Loading in...5
×

Tipo music-ui-規劃原則

276

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
276
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Tipo music-ui-規劃原則

  1. 1. Tipo Music UI 規劃原則 By Jax
  2. 2. 原則 • 只要是 button 就要有包含 Icon • 所有 User 操作的 Ajax 都要 Handle 等待、成功、失敗
  3. 3. StatusMsg var StatusMsg = {  clear: function () { },  alert: function (str) { },  error: function (str) { },  wait: function (str) { }  }; 
  4. 4. ltcAjax $.ltcAjax({ url: this.href, waitMsg: ' 刪除中 ...', button: this, success: function (msg) { StatusMsg.alert(msg); $(this.button).closest('tr').remove(); } });
  5. 5. Message to Ajax try { _useListRepo.DeleteSong(useListSongSN); return Content(" 刪除成功 !!"); } catch (Exception ex) { _log.ErrorException(" 利用人 UseList  歌曲刪除失 敗 !!", ex); Response.TrySkipIisCustomErrors = true; Response.StatusCode = 400; return Content(" 刪除失敗 !!"); }
  6. 6. Message to View try { // ... TempData["StatusSuccess"] = " 匯入成功 !!";                  return RedirectToAction("AnalysisMusicGroupOwner", new { BatchID = batchID }); } catch (TipoMusicException ex) { TempData["StatusError"] = ex.Message; TempData["ImportListErrorMessage"] = ex.ErrorMessages; } catch (Exception ex) { _log.ErrorException(" 利用人 UseList  匯入失敗 !!", ex); TempData["StatusError"] = " 匯入失敗 !!"; }
  7. 7. Message to View try { // ... TempData["StatusSuccess"] = " 匯入成功 !!";                  return RedirectToAction("AnalysisMusicGroupOwner", new { BatchID = batchID }); } catch (TipoMusicException ex) { TempData["StatusError"] = ex.Message; TempData["ImportListErrorMessage"] = ex.ErrorMessages; } catch (Exception ex) { _log.ErrorException(" 利用人 UseList  匯入失敗 !!", ex); TempData["StatusError"] = " 匯入失敗 !!"; }
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×