[JQuery] Plug-in: Full Calendar
寫Application時, 有 user 要求要在calendar中顯示event, 為了極速開發. 找到了個calendar 做參考. Source: http://www.oodlestechnologies.com/blogs/Fullcalendar-Walk-through-with-AngularJS Full Calendar: http://fullcalendar.io/
寫Application時, 有 user 要求要在calendar中顯示event, 為了極速開發. 找到了個calendar 做參考. Source: http://www.oodlestechnologies.com/blogs/Fullcalendar-Walk-through-with-AngularJS Full Calendar: http://fullcalendar.io/
有時雖然可以利用modal來做dialog, 但(“#modal”).show() 也須要預設一堆Dialog才可使用. 若只想簡單地做alert(“Hello world”)的話, 可以考慮利用Bootstrap-dialog 這個extension. 網址: https://nakupanda.github.io/bootstrap3-dialog/ Git Project: https://github.com/nakupanda/bootstrap3-dialog
在建構框架 (framework)時, 會有機會須要重覆使用一堆指定的 user control. 其實透過 extend HtmlHelper, 便可以將coding變得簡單, 將來修改時亦只須要修改一部份便可. 在這裡, 用了一個Bootstrap control 做例子. public static class HtmlHelperExtend { public static MvcHtmlString DateTimePicker(this HtmlHelper helper, string divDayTimePickerId, string txtBoxdayTimePickerId, DateTime? value, string labelId, string labelText=”Label […]
在此例子中, 它override了本身form[0].submit()的方法, 再配合JQuery ajax(), 從而做到到async submit 的效果. $(‘#formDetails’).submit(function (e) { e.preventDefault(); //do some verification $.ajax({ url: “@Url.Action(“Save”,”Reservation”)”, method: “POST”, data: $(this).serialize(), success: function (data) { //callback methods go right here } }); });
部份programming language 寫function call 時可以支援default value, 可惜JavaScript不能. 故須要特別處理. function alertDialog(message, title, okCallBack) { message=typeof message !== ‘undefinded’? message: “”; title=typeof title!==’undefinded’? title: “Dialog”; okCallBack=typeof okCallBack!==’undefined’? okCallBack: function (dialogRef) { dialogRef.close(); }; BootstrapDialog.show({ title: title, message: […]
當session timeout時, 若不作處理, 運作時有機會throw exception. 為應對此情況, 可以自訂一個Attribute, 當controller / action call 時, 便會先行attribute. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace Test.Attributes { public class SessionExpireAttribute : ActionFilterAttribute { public override void […]
若需要從SAP中取出data, 除了用web service 外, 可以直接call其BAPI call. 方法如下:
Copyright © 2024 | MH Magazine WordPress Theme by MH Themes