예제 #1
0
 public void IsDialog_NotSet_False()
 {
     using (var e = new MockA11yElement())
     {
         Assert.IsFalse(IsDialog.Matches(e));
     } // using
 }
예제 #2
0
 public void IsDialog_False()
 {
     using (var e = new MockA11yElement())
     {
         var a11yProperty = new A11yProperty(PropertyType.UIA_IsDialogPropertyId, false);
         e.Properties.Add(PropertyType.UIA_IsDialogPropertyId, a11yProperty);
         Assert.IsFalse(IsDialog.Matches(e));
     } // using
 }
예제 #3
0
        /// <summary>
        /// Render out the correct markup for the tree
        /// </summary>
        /// <remarks>
        /// Since we're inheriting from a UserControl, we need to render out the markup manually
        /// </remarks>
        /// <param name="writer"></param>
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            //You'll notice that we're replacing the 'serviceUrl' parameter with our own custom web service!

            writer.Write(@"
<script type=""text/javascript"">
jQuery(document).ready(function() {
    var ctxMenu = " + GetJSONContextMenu() + @";	
    var app = """ + App + @""";
    var showContext = " + ShowContextMenu.ToString().ToLower() + @";
    var isDialog = " + IsDialog.ToString().ToLower() + @";
    var dialogMode = """ + DialogMode.ToString() + @""";
    var treeType = """ + TreeType + @""";
    var functionToCall = """ + FunctionToCall + @""";
    var nodeKey = """ + NodeKey + @""";
	
    //create the javascript tree
    jQuery(""#" + ClientID + @""").UmbracoTree({
        doNotInit: " + ManualInitialization.ToString().ToLower() + @",
        jsonFullMenu: ctxMenu,
        appActions: UmbClientMgr.appActions(),
        deletingText: '" + umbraco.ui.GetText("deleting") + @"',
        app: app,
        showContext: showContext,
        isDialog: isDialog,
        dialogMode: dialogMode,
        treeType: treeType,
        functionToCall : functionToCall,
        nodeKey : nodeKey,
        treeMode: """ + Mode.ToString().ToLower() + @""",
        dataUrl: """ + IOHelper.ResolveUrl(SystemDirectories.Umbraco) + @"/webservices/TreeDataService.ashx"",
        serviceUrl: """ + IOHelper.ResolveUrl(SystemDirectories.Umbraco) + @"/controls/Tree/CustomTreeService.asmx/GetInitAppTreeData""});
        
     //add event handler for ajax errors, this will refresh the whole application
    var mainTree = UmbClientMgr.mainTree();
    if (mainTree != null) {
        mainTree.addEventHandler(""ajaxError"", function(e) {
            if (e.msg == ""rebuildTree"") {
	            UmbClientMgr.mainWindow(""umbraco.aspx"");
            }
        });
    }
});	

</script>");

            //render the controls
            TreeContainer.RenderControl(writer);
        }