Beispiel #1
0
    def from_post_source(self,
                         script,
                         data=None,
                         successFncs=None,
                         udpate_freq=None,
                         interval_name=None):
        """
    Description:
    -----------

    Attributes:
    ----------
    :param script:
    :param data:
    :param successFncs:
    :param udpate_freq: Optional, Set the data update frequency in second
    """
        if udpate_freq is not None:
            return self._report.js.window.setInterval(
                JsQuery.JQuery(self._report).getPyScript(
                    script, data, successFncs=successFncs),
                milliseconds=udpate_freq * 1000).setVar(interval_name)

        return JsQuery.JQuery(self._report).getPyScript(
            script, data, successFncs=successFncs)
Beispiel #2
0
    def from_get(self, url, data=None, code=None):
        """
    Description:
    -----------

    """
        return JsQuery.JQuery(self.page).get(url, data)
Beispiel #3
0
    def jquery_node(self):
        """
    Get the cell nodes for the selected column.

    Related Pages:

      https://datatables.net/reference/api/column().nodes()
    """
        return JsQuery.JQuery(selector="%s.nodes().to$()" % self.varId,
                              setVar=False)
Beispiel #4
0
  def jqThis(self):
    """
    Description:
    -----------
    Interface to the Javascript Object primitive

    :return: The Javascript "this" object
    """
    from epyk.core.js.packages import JsQuery
    return JsQuery.JQuery(self._jsObj._src, selector="jQuery(this)", setVar=False)
Beispiel #5
0
  def jquery(self):
    """
    Description:
    -----------
    Link to the JQuery functions

    :rtype: JsQuery.JQuery
    """
    if self._jquery is None:
      self._jquery = JsQuery.JQuery(src=self._src, selector=JsQuery.decorate_var("#%s" % self._src.htmlCode), setVar=False)
    return self._jquery
Beispiel #6
0
    def jquery(self) -> JsQuery.JQuery:
        """
    Description:
    ------------

    :rtype: JsQuery.JQuery
    """
        if self._jquery is None:
            self._jquery = JsQuery.JQuery(component=self.component,
                                          selector=JsQuery.decorate_var(
                                              "#%s" % self.component.htmlCode))
        return self._jquery
Beispiel #7
0
    def jquery(self):
        """
    Description:
    ------------

    :rtype: JsQuery.JQuery
    """
        if self._jquery is None:
            self._jquery = JsQuery.JQuery(src=self._src,
                                          selector=JsQuery.decorate_var(
                                              "#%s" % self._src.htmlCode))
        return self._jquery
Beispiel #8
0
  def jquery(self) -> JsQuery.JQuery:
    """
    Description:
    -----------
    Link to the JQuery functions.

    :rtype: JsQuery.JQuery
    """
    if self._jquery is None:
      self._jquery = JsQuery.JQuery(component=self.component,
                                    selector=JsQuery.decorate_var("#%s" % self.component.htmlCode), set_var=False)
    return self._jquery
Beispiel #9
0
    def container_jquery(self):
        """
    Get the div container node for the table in the API's context.

    Related Pages:

      https://datatables.net/reference/api/table().container()
    """
        return JsQuery.JQuery(self.src,
                              selector="jQuery(%s.table().container())" %
                              self.varId,
                              setVar=False,
                              parent=self._parent)
Beispiel #10
0
    def jquery_nodes(self):
        """
    Get the cell nodes for the selected column.

    Related Pages:

      https://datatables.net/reference/api/column().nodes()

    :return:
    """
        self.nodes()
        self._js.append("to$()")
        return JsQuery.JQuery(jqId=self.toStr())
Beispiel #11
0
    def jquery_node(self):
        """
    Description:
    -----------
    Get the cell nodes for the selected column.

    Related Pages:

      https://datatables.net/reference/api/column().nodes()
    """
        return JsQuery.JQuery(component=self.component,
                              selector="%s.nodes().to$()" % self.varId,
                              set_var=False)
Beispiel #12
0
    def jqThis(self):
        """
    Description:
    -----------
    Interface to the Javascript Object primitive.

    :return: The Javascript "this" object
    """
        from epyk.core.js.packages import JsQuery
        return JsQuery.JQuery(component=self.component,
                              page=self.page,
                              selector="jQuery(this)",
                              set_var=False)
Beispiel #13
0
    def container_jquery(self):
        """
    Description:
    -----------
    Get the div container node for the table in the API's context.

    Related Pages:

      https://datatables.net/reference/api/table().container()
    """
        return JsQuery.JQuery(component=self.component,
                              selector="jQuery(%s.table().container())" %
                              self.varId,
                              set_var=False)
Beispiel #14
0
    def jquery_node(self):
        """
    Description:
    -----------
    Get the cell nodes for the selected column.

    Related Pages:

      https://datatables.net/reference/api/column().nodes()
    """
        self.node()
        self._js.append("to$()")
        return JsQuery.JQuery(component=self.component,
                              selector=self.toStr(),
                              set_var=False)
Beispiel #15
0
    def jquery(self):
        """
    Description:
    ------------
    jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.
    Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

    Related Pages:

      https://jqueryui.com/

    :rtype: JsQuery.JQuery
    """
        if self._jquery is None:
            self._jquery = JsQuery.JQuery(src=self._src,
                                          selector=JsQuery.decorate_var(
                                              "#%s" % self._src.htmlCode))
        return self._jquery
Beispiel #16
0
    def from_get(self, url, data=None, code=None):
        """

    """
        return JsQuery.JQuery(self._report).get(url, data)