2015年2月13日 星期五

jqueryui dialog 使用注意事項

1. 如何讓右上角的X符號消失
.dialog({open: function(event, ui) { $('.ui-dialog-titlebar-close').hide(); }

2. 如何避免在partialview 的架構中關閉再開啟時會殘留原本的視窗
.dialog({buttons: {      
            '關閉': function () {
                $(this).dialog('close');
                $(this).dialog('destroy'); <= 透過destory 確保視窗不會殘留
            }
        }

3. 使用 bootstrap 的 button click 時遇到 cannot call methods on button prior to initialization; attempted to call method 'loading'
調整 javascript 載入順序 : jqueryui 必須在 bootstrap 之前載入

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...