/// <summary>
        /// Edits the frame.
        /// </summary>
        /// <param name="buttons">The buttons.</param>
        /// <param name="dataSource">The data source.</param>
        /// <param name="title">The title for the edit frame</param>
        /// <returns></returns>
        public GlassEditFrame EditFrame(string title, string buttons, string dataSource = null)
        {
            var frame = new GlassEditFrame(title, buttons, _writer, dataSource);

            frame.RenderFirstPart();
            return(frame);
        }
        /// <summary>
        /// Edits the frame.
        /// </summary>
        /// <param name="buttons">The buttons.</param>
        /// <param name="path">The path.</param>
        /// <returns>
        /// GlassEditFrame.
        /// </returns>
        public GlassEditFrame EditFrame(string buttons, string path = null)
        {
            var frame = new GlassEditFrame(buttons, HttpContext.Current.Response.Output, path);

            frame.RenderFirstPart();
            return(frame);
        }
Exemple #3
0
        /// <summary>
        /// Begins the edit frame.
        /// </summary>
        /// <param name="buttons">The buttons.</param>
        /// <param name="dataSource">The data source.</param>
        /// <param name="title">The title for the edit frame</param>
        /// <returns></returns>
        public GlassEditFrame BeginEditFrame(string buttons, string dataSource, string title)
        {
            var frame = new GlassEditFrame(title, buttons, Output, dataSource);

            frame.RenderFirstPart();
            return(frame);
        }
Exemple #4
0
        /// <summary>
        /// Creates an edit frame using the current context item
        /// </summary>
        /// <returns></returns>
        public GlassEditFrame BeginEditFrame()
        {
            var frame = new GlassEditFrame(string.Empty, GlassEditFrame.DefaultEditButtons, Output);

            frame.RenderFirstPart();
            return(frame);
        }
        /// <summary>
        /// Begins the edit frame.
        /// </summary>
        /// <param name="htmlHelper">The HTML helper.</param>
        /// <param name="dataSource">The data source.</param>
        /// <param name="buttons">The buttons.</param>
        /// <param name="title">The title for the edit frame</param>
        /// <returns></returns>
        public static GlassEditFrame BeginEditFrame(this HtmlHelper htmlHelper, string dataSource, string buttons, string title)
        {
            var frame = new GlassEditFrame(title, buttons, htmlHelper.ViewContext.Writer, dataSource);

            frame.RenderFirstPart();
            return(frame);
        }
Exemple #6
0
        /// <summary>
        /// Creates an edit frame using the current context item
        /// </summary>
        /// <returns></returns>
        public GlassEditFrame BeginEditFrame()
        {
            var frame = new GlassEditFrame(GlassEditFrame.DefaultEditButtons, this.Output);

            frame.RenderFirstPart();
            return(frame);
        }
        /// <summary>
        /// Edits the frame.
        /// </summary>
        /// <param name="buttons">The buttons.</param>
        /// <returns>GlassEditFrame.</returns>
        public GlassEditFrame EditFrame(string buttons)
        {
            var frame = new GlassEditFrame(buttons, HttpContext.Current);

            frame.RenderFirstPart();
            return(frame);
        }
        /// <summary>
        /// Begins the edit frame.
        /// </summary>
        /// <param name="htmlHelper">The HTML helper.</param>
        /// <param name="editFrame">The edit frame.</param>
        /// <returns></returns>
        public static GlassEditFrame BeginEditFrame(this HtmlHelper htmlHelper, EditFrame editFrame)
        {
            var glassEditFrame = new GlassEditFrame(editFrame, htmlHelper.ViewContext.Writer);

            glassEditFrame.RenderFirstPart();
            return(glassEditFrame);
        }
        /// <summary>
        /// Edits the frame.
        /// </summary>
        /// <param name="buttons">The buttons.</param>
        /// <param name="path">The path.</param>
        /// <param name="output">The output text writer</param>
        /// <param name="title">The title for the edit frame</param>
        /// <returns>
        /// GlassEditFrame.
        /// </returns>
        public GlassEditFrame EditFrame(string title, string buttons, string path = null, TextWriter output = null)
        {
            if (output == null)
            {
                output = HttpContext.Current.Response.Output;
            }
            var frame = new GlassEditFrame(title, buttons, output, path);

            frame.RenderFirstPart();
            return(frame);
        }