Beispiel #1
0
    protected void Page_Init(object sender, EventArgs e)
    {
        pnlNewRev.FileUploadFinished += new PXFileUploadEventHandler(pnlNewRev_FileUploadFinished);
        WikiFileMaintenance graph = (WikiFileMaintenance)ds.DataGraph;
        string authority          = Request.GetWebsiteAuthority().GetLeftPart(UriPartial.Authority);
        string schema             = Request.GetWebsiteAuthority().GetLeftPart(UriPartial.Scheme);

        graph.GetFileAddress        = authority + ResolveUrl("~/Frames/GetFile.ashx");
        graph.WebDAVFilePrefix      = ("https://" + authority.Substring(schema.Length)) + (string.IsNullOrEmpty(_filesPath) ? string.Empty : ResolveUrl(_filesPath));
        graph.GetDavFilePath        = GetFilePath;
        _editButton                 = new PXFileEditButton();
        _editButton.CommandName     = "edit";
        _editButton.Text            = "Edit";
        _editButton.NavigateUrl     = "about:blank";
        _editButton.WordImage       = Sprite.Main.GetFullUrl(Sprite.Main.Doc);
        _editButton.ExcelImage      = Sprite.Main.GetFullUrl(Sprite.Main.Excel);
        _editButton.PowerPointImage = Sprite.Main.GetFullUrl(Sprite.Main.Ppt);
        _editButton.Enabled         = false;
        _editButton.Visible         = false;
        _editButton.CollectParams   = CollectParams.AnyCallback;
        int           idx       = ds.ToolBar.Items.Count - 3;
        PXToolBarItem oldButton = ds.ToolBar.Items["edit"];

        if (oldButton != null)
        {
            idx = ds.ToolBar.Items.IndexOf(oldButton);
            ds.ToolBar.Items.Remove(oldButton);
        }
        ds.ToolBar.Items.Insert(idx, _editButton);
        ds.PreRender   += ds_PreRender;
        form.DataBound += form_DataBound;
    }
Beispiel #2
0
 void ITitleModuleController.AppendToolbarItem(PXToolBarItem item)
 {
     tlbTools.Items.Insert(1, item);
     if (item.Key == "reminder")
     {
         item.Visible = false;
     }
 }
 void ITitleModuleController.AppendToolbarItem(PXToolBarItem item)
 {
     tlbTools.Items.Insert(1, item);
     if (item.Key == "reminder")
     {
         item.Visible = false;
     }
     if (PXSiteMap.IsPortal)
     {
         if (!System.Web.Security.Roles.IsUserInRole(PXAccess.GetAdministratorRoles().First()))
         {
             item.Visible = false;
         }
     }
 }
Beispiel #4
0
	void ITitleModuleController.AppendToolbarItem(PXToolBarItem item)
	{
		var cont = item as PXToolBarContainer;
		if (cont != null && cont.TemplateContainer.Controls.Count > 0)
		{
			var but = cont.TemplateContainer.Controls[0] as PXNewsCheckerButton;
			if (but != null)
			{
				but.NormalCss = toolsBar.Styles.Normal.CssClass;
				but.HoverCss = toolsBar.Styles.Normal.CssClass;
				but.PushedCss = toolsBar.Styles.Pushed.CssClass;
				toolsBar.Items.Insert(1, item);
			}
		}
	}
	void ITitleModuleController.AppendToolbarItem(PXToolBarItem item)
	{
		tlbTools.Items.Insert(0, item);
		if (item.Key == "reminder") item.Visible = false;
		if (PXSiteMap.IsPortal)
		{
			if (!System.Web.Security.Roles.IsUserInRole(PXAccess.GetAdministratorRole()))
			{
				item.Visible = false;
			}
			item.CssClass = "toolsBtnSP";
		}
	}