示例#1
0
文件: xhtml.py 项目: apoirier/test
def add_attribute(self, name, value):
    """Add an attribute with a method value

    In:
      - ``self`` -- the tag
      - ``name`` -- name of the attribute
      - ``value`` -- method value
    """
    # Transcode the method to javascript
    xml.add_attribute(self, name, ajax.JS(value))
示例#2
0
文件: xhtml.py 项目: apoirier/test
def add_attribute(self, name, value):
    """Add an attribute with a ``ajax.Update`` value

    In:
      - ``self`` -- the tag
      - ``name`` -- name of the attribute
      - ``value`` -- ``ajax.Update`` value
    """
    # Generate a XHR request
    xml.add_attribute(self, name, value.generate_action(self._actions[0], self.renderer))
示例#3
0
def add_function_attribute(self, name, value):
    """Add an attribute with a function value

    In:
      - ``self`` -- the tag
      - ``name`` -- name of the attribute
      - ``value`` -- function value
    """
    # Transcode the function to javascript
    xml.add_attribute(self, name, ajax.JS(value))
示例#4
0
def add_method_attribute(self, name, value):
    """Add an attribute with a method value

    In:
      - ``self`` -- the tag
      - ``name`` -- name of the attribute
      - ``value`` -- method value
    """
    # Transcode the method to javascript
    xml.add_attribute(self, name, ajax.JS(value))
示例#5
0
def add_function_attribute(self, name, value):
    """Add an attribute with a function value

    In:
      - ``self`` -- the tag
      - ``name`` -- name of the attribute
      - ``value`` -- function value
    """
    # Transcode the function to javascript
    xml.add_attribute(self, name, ajax.JS(value))
示例#6
0
def add_ajax_attribute(self, name, value):
    """Add an attribute with a ``ajax.Update`` value

    In:
      - ``self`` -- the tag
      - ``name`` -- name of the attribute
      - ``value`` -- ``ajax.Update`` value
    """
    # Generate a XHR request
    xml.add_attribute(self, name,
                      value.generate_action(self._actions[0], self.renderer))