Ejemplo n.º 1
0
 public static string ToConfig(AbstractComponent component, bool registerResources)
 {
     return ComponentLoader.ToConfig(new AbstractComponent[] { component }, registerResources);
 }
Ejemplo n.º 2
0
 public static string ToConfig(AbstractComponent component)
 {
     return component.ToConfig();
 }
Ejemplo n.º 3
0
 public virtual void SetActiveGroup(AbstractComponent group)
 {
     this.SetActiveGroup(group.ClientID);            
 }
Ejemplo n.º 4
0
 public static void Render(AbstractComponent component, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(component, registerResources));
 }
Ejemplo n.º 5
0
 public virtual void Add(AbstractComponent component)
 {
     this.Items.Add(component);
 }
Ejemplo n.º 6
0
 public virtual void Remove(AbstractComponent component)
 {
     this.Call("remove", new JRawValue(component.ClientID));
 }
Ejemplo n.º 7
0
        /*  Methods
         *  -----------------------------------------------------------------------------------------------*/

        /// <summary>
        ///
        /// </summary>
        /// <param name="component"></param>
        /// <returns></returns>
        public virtual ItemsBuilder <TParent, TParentBuilder> Add(AbstractComponent component)
        {
            this.Owner.Items.Add(component);
            return(this);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Adds docked item to the panel.
        /// Note : this method must be used during Ajax request (when the panel instance is created on the client side)
        /// </summary>
        /// <param name="component">The AbstractComponent or array of components to add. The components must include a 'dock' parameter on each component to indicate where it should be docked ('top', 'right', 'bottom', 'left').</param>
        public virtual void AddDocked(AbstractComponent component)
        {
            //if (!ExtNet.IsAjaxRequest)
            //{
            //    throw new Exception("AddDocked method must be used during ajax request to add dynamic control only");
            //}

            if (component.Dock == Dock.None)
            {
                throw new Exception("You have to specify Dock for docked component");
            }

            component.RegisterAllResources = true;
            component.RegisterScripts();
            component.RegisterStyles();
            component.PreventRenderTo = true;

            this.Call("addDocked", component.ToConfig());
        }
Ejemplo n.º 9
0
 public static void Render(AbstractComponent component)
 {
     CompressionUtils.GZipAndSend(component.ToConfig());
 }
Ejemplo n.º 10
0
 public static string ToJson(AbstractComponent component)
 {
     return(component.ToConfig());
 }
Ejemplo n.º 11
0
 public virtual void SetActiveTab(AbstractComponent item)
 {
     this.SetActiveTab(item.ConfigID);
 }
Ejemplo n.º 12
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="item"></param>
        protected override void BeforeItemAdd(AbstractComponent item)
        {
            base.BeforeItemAdd(item);

            item.ContentContainer.Attributes.Add("class", "x-hidden");
        }
Ejemplo n.º 13
0
 /// <summary>
 /// Applies the supplied values to the template and appends the new node(s) to el.
 /// </summary>
 public virtual TBuilder Append(AbstractComponent target, object data)
 {
     this.ToComponent().Append(target, data);
     return(this as TBuilder);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Brings the specified Component to the front of any other active Components in this ZIndexManager.
 /// </summary>
 /// <param name="comp">The id of the Component or a Ext.Component instance</param>
 public virtual void BringToFront(AbstractComponent comp)
 {
     this.BringToFront(comp.ClientID);
 }
Ejemplo n.º 15
0
 public void Append(AbstractComponent target, object data)
 {
     this.ScriptHelper("append", target, data);
 }
Ejemplo n.º 16
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="item"></param>
 protected override void BeforeItemAdd(AbstractComponent item)
 {
     base.BeforeItemAdd(item);
     
     item.ContentContainer.Attributes.Add("class", "x-hidden");            
 }
Ejemplo n.º 17
0
 public void InsertFirst(AbstractComponent target, object data)
 {
     this.ScriptHelper("insertFirst", target, data);
 }
Ejemplo n.º 18
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="item"></param>
 protected virtual void Buttons_AfterItemRemove(AbstractComponent item)
 {
     item.RenderXType = true;
     this.AfterItemRemove(item);
 }
Ejemplo n.º 19
0
 public void Overwrite(AbstractComponent target, object data)
 {
     this.ScriptHelper("overwrite", target, data);
 }
Ejemplo n.º 20
0
 public virtual void Insert(int index, AbstractComponent component)
 {
     this.Call("insert", index, new JRawValue(component.ClientID));
 }
Ejemplo n.º 21
0
 protected void ScriptHelper(string name, AbstractComponent target, object data)
 {
     this.ScriptHelper(name, "={".ConcatWith(target.ClientID, ".getContentTarget()}"), data);
 }
Ejemplo n.º 22
0
 protected virtual void BeforeItemAdd(AbstractComponent item) { }
Ejemplo n.º 23
0
 public virtual void Add(AbstractComponent component)
 {
     this.Items.Add(component);
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Applies the supplied values to the template and overwrites the content of el with the new node(s).
 /// </summary>
 public virtual TBuilder Overwrite(AbstractComponent target, object data)
 {
     this.ToComponent().Overwrite(target, data);
     return(this as TBuilder);
 }
Ejemplo n.º 25
0
 public virtual void Insert(int index, AbstractComponent component)
 {
     this.Call("insert", index, new JRawValue(component.ClientID));
 }
Ejemplo n.º 26
0
 public static string ToConfig(AbstractComponent component)
 {
     return ComponentLoader.ToConfig(new AbstractComponent[] { component }, true);
 }
Ejemplo n.º 27
0
 public virtual void Remove(AbstractComponent component)
 {
     this.Call("remove", new JRawValue(component.ClientID));
 }
Ejemplo n.º 28
0
 public static void Render(AbstractComponent component)
 {
     CompressionUtils.GZipAndSend(component.ToConfig());
 }
Ejemplo n.º 29
0
 public virtual void Remove(AbstractComponent component, bool autoDestroy)
 {
     this.Call("remove", new JRawValue(component.ClientID), autoDestroy);
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Sends the specified Component to the back of other active Components in this ZIndexManager.
 /// </summary>
 /// <param name="comp">The id of the Component or a Ext.Component instance</param>
 public virtual void SendToBack(AbstractComponent comp)
 {
     this.SendToBack(comp.ClientID);
 }
Ejemplo n.º 31
0
 protected virtual void BeforeItemAdd(AbstractComponent item)
 {
 }
    private string ObtenerValoresAtributos(AbstractComponent comp)
    {
      string atributo = string.Empty;
      try
      {
        FieldContainer componentes = (FieldContainer)comp;

        foreach (AbstractComponent com in componentes.Items)
        {
          if (typeof(AtributoTexto) == com.GetType())
          {
            TextField cajatexto = (TextField)com;
            if (!string.IsNullOrEmpty(cajatexto.Text))
            {
              atributo += "<b>" + cajatexto.FieldLabel + ":</b> " + cajatexto.Text + "<br>";
            }
          }
          else
          {
            if (typeof(AtributoEntero) == com.GetType() || typeof(AtributoDecimal) == com.GetType())
            {
              NumberField cajatexto = (NumberField)com;
              if (!string.IsNullOrEmpty(cajatexto.Text))
              {
                atributo += "<b>" + cajatexto.FieldLabel + ":</b> " + cajatexto.Text + "<br>";
              }
            }
            else
            {
              if (typeof(AtributoFecha) == com.GetType())
              {
                DateField cajatexto = (DateField)com;
                if (!string.IsNullOrEmpty(cajatexto.Text))
                {
                  atributo = "<b>" + cajatexto.FieldLabel + ":</b> " + cajatexto.Text + "<br>";
                }
              }
              else
              {
                if (typeof(AtributoTextArea) == com.GetType())
                {
                  TextArea cajatexto = (TextArea)com;
                  if (!string.IsNullOrEmpty(cajatexto.Text))
                  {
                    atributo = "<b>" + cajatexto.FieldLabel + ":</b> " + cajatexto.Text + "<br>";
                  }
                }
              }
            }
          }
        }
        return atributo;
      }
      catch (Exception ex)
      {
        Mensajes.Error("No se pueden copiar los atributos en el detalle.");
        return "";
      }
    }
Ejemplo n.º 33
0
 /// <summary>
 /// Sends the specified Component to the back of other active Components in this ZIndexManager.
 /// </summary>
 /// <param name="comp">The id of the Component or a Ext.Component instance</param>
 public virtual void SendToBack(AbstractComponent comp)
 {
     this.SendToBack(comp.ClientID);
 }
Ejemplo n.º 34
0
        private void AfterItemRemove(AbstractComponent item)
        {
            var cmp = this.PluginOwner;

            if (cmp != null)
            {
                if (cmp.Controls.Contains(item))
                {
                    cmp.Controls.Remove(item);
                }

                if (cmp.LazyItems.Contains(item))
                {
                    cmp.LazyItems.Remove(item);
                }
            }
        }
Ejemplo n.º 35
0
 /// <summary>
 /// Brings the specified Component to the front of any other active Components in this ZIndexManager.
 /// </summary>
 /// <param name="comp">The id of the Component or a Ext.Component instance</param>
 public virtual void BringToFront(AbstractComponent comp)
 {
     this.BringToFront(comp.ClientID);
 }
Ejemplo n.º 36
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="item"></param>
 protected virtual void Buttons_AfterItemAdd(AbstractComponent item)
 {
     item.RenderXType = !item.XType.Equals("button");
     this.AfterItemAdd(item);
 }
Ejemplo n.º 37
0
 public Element(AbstractComponent el, bool chaining)
     : this(el)
 {
     this.Chaining = chaining;
 }
Ejemplo n.º 38
0
 void Component_AfterItemAdd(AbstractComponent item)
 {
     if (this.PluginOwner != null)
     {                
         this.PluginOwner.Controls.Add(item);
         this.PluginOwner.LazyItems.Add(item);
     }
 }
Ejemplo n.º 39
0
 public void Append(AbstractComponent target, object data)
 {
     this.ScriptHelper("append", target, data);
 }
Ejemplo n.º 40
0
 public virtual void Add(AbstractComponent component, bool render)
 {
     this.Add((component));
     if (render)
     {
         component.Render();
     }
 }
Ejemplo n.º 41
0
 public void InsertFirst(AbstractComponent target, object data)
 {
     this.ScriptHelper("insertFirst", target, data);
 }
Ejemplo n.º 42
0
 public virtual void Insert(int index, AbstractComponent component, bool render)
 {
     if (render)
     {
         component.InsertTo(index, this);
     }
     else
     {
         this.Call("insert", index, new JRawValue(component.ClientID));    
     }
 }
Ejemplo n.º 43
0
 public void Overwrite(AbstractComponent target, object data)
 {
     this.ScriptHelper("overwrite", target, data);
 }
Ejemplo n.º 44
0
 public virtual void Remove(AbstractComponent component, bool autoDestroy)
 {
     this.Call("remove", new JRawValue(component.ClientID), autoDestroy);
 }
Ejemplo n.º 45
0
 protected void ScriptHelper(string name, AbstractComponent target, object data)
 {
     this.ScriptHelper(name, TokenUtils.RawWrap(target.ClientID + ".getContentTarget()"), data);
 }
Ejemplo n.º 46
0
 protected internal virtual void PluginAdded()
 {
     this.pluginOwner = this.ParentComponent;
     if (!this.RequiredOwnerType.IsAssignableFrom(this.pluginOwner.GetType()))
     {
         throw new Exception(this.GetType().Name + " plugin requires " + this.RequiredOwnerType.Name);
     }
 }
Ejemplo n.º 47
0
 public static void Render(AbstractComponent component)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(component, true));
 }
Ejemplo n.º 48
0
 public virtual void SetActiveTab(AbstractComponent item)
 {
     this.SetActiveTab(item.ClientID);
 }
Ejemplo n.º 49
0
 /// <summary>
 /// Applies the supplied values to the template and inserts the new node(s) as the first child of el.
 /// </summary>
 public virtual TBuilder InsertFirst(AbstractComponent target, object data)
 {
     this.ToComponent().InsertFirst(target, data);
     return(this as TBuilder);
 }