private void CreateDivPortletHeader(PSCPanel panel, PortletInstanceInPanel portletInstanceInPanel) { // Create div portlet header PSCPanel divHeader = new PSCPanel(); divHeader.CssClass = "psc-divPortlet-Header"; panel.Controls.Add(divHeader); //Title Porlet System.Web.UI.WebControls.Literal lblTitle = new System.Web.UI.WebControls.Literal(); lblTitle.Text = string.Format("<span>{0}</span>", portletInstanceInPanel.PortletInstance.Name); divHeader.Controls.Add(lblTitle); //Button Edit LiteralControl btnEdit = new LiteralControl(); btnEdit.Text = string.Format("<img src='{0}' onclick=\"{1}\" title='Hiệu chỉnh Dữ liệu' class='{2}' alt='{3}'/>", "/Systems/Engine/Images/PortletEditData.png", string.Format("PortletEditData('{0}');", portletInstanceInPanel.PortletInstance.Id), "ButtonImage", "Edit Portlet"); divHeader.Controls.Add(btnEdit); //Button giao dien LiteralControl btnEditApperance = new LiteralControl(); btnEditApperance.Text = string.Format("<img src='{0}' onclick=\"{1}\" title='Hiệu chỉnh CSS' class='{2}' alt='{3}'/>", "/Systems/Engine/Images/PortletEditApperance.png", string.Format("PortletEditCSS('{0}');", portletInstanceInPanel.PortletInstance.Id), "ButtonImage", "Edit Portlet CSS"); divHeader.Controls.Add(btnEditApperance); // Button Delete LiteralControl btnDelete = new LiteralControl(); btnDelete.Text = string.Format("<img src='{0}' onclick=\"{1}\" title='Xóa Porlet' class='{2}' alt='{3}'/>", "/Systems/Engine/Images/PortletDelete.png", string.Format("PortletRemove('{0}','{1}');", portletInstanceInPanel.PortletInstance.Id, portletInstanceInPanel.PortletInstance.Name), "ButtonImage", "Remove Portlet"); divHeader.Controls.Add(btnDelete); }
public void PortletMove(int panel, int index1, int index2) { PanelInPage pip = this.Where(p => p.Panel.Id == panel).Single(); PortletInstanceInPanel portlet = pip.Portlets[index1]; pip.Portlets.RemoveAt(index1); pip.Portlets.Insert(index2, portlet); pip.Portlets.UpdatePosition(); }
public PortletInstanceInPanelArgs(PortletInstanceInPanel portletInstanceInPanel, bool isEdit) { _portletInstanceInPanel = portletInstanceInPanel; _isEdit = isEdit; }