Exemplo n.º 1
0
 def initialize(self):
     html = CONCATENATE(
         DIV(DIV(DIV(DIV("COMPONENTES", _class="phanterpwa-breadcrumb"),
                     DIV("FONT AWESOME", _class="phanterpwa-breadcrumb"),
                     _class="phanterpwa-breadcrumb-wrapper"),
                 _class="p-container"),
             _class='title_page_container card'),
         DIV(DIV(DIV(DIV(
             widgets.Preloaders("preloader_fontawesome"),
             _style=
             "width:100%; text-align: center; padding-top: 100px; padding-bottom: 100px;"
         ),
                     _id="icon_awesome_container",
                     _class="icon_awesome_container e-padding_20"),
                 _class="card p-row padding_20"),
             _class="phanterpwa-container p-container"))
     html.html_to("#main-container")
     BackButton = left_bar.LeftBarButton(
         "back_localizar_aluno", "Voltar",
         I(_class="fas fa-arrow-circle-left"), **{
             "_phanterpwa-way": "home",
             "position": "top",
             "ways": ["fontawesome"]
         })
     window.PhanterPWA.Components['left_bar'].add_button(BackButton)
     setTimeout(lambda: self._add_content(0), 300)
Exemplo n.º 2
0
    def initialize(self):
        html = CONCATENATE(
            DIV(DIV(DIV(DIV("PROJECT", _class="phanterpwa-breadcrumb"),
                        DIV(self.request.get_arg(0),
                            _class="phanterpwa-breadcrumb"),
                        _class="phanterpwa-breadcrumb-wrapper"),
                    _class="p-container"),
                _class='title_page_container card'),
            DIV(DIV(DIV(DIV(
                widgets.Preloaders("preload_android"),
                _style=
                "width:100%; text-align: center; padding-top: 100px; padding-bottom: 100px;"
            ),
                        _id="applications_container"),
                    _class="card p-row e-padding_10"),
                _class="phanterpwa-container p-container"))
        html.html_to("#main-container")
        BackButton = left_bar.LeftBarButton(
            "back_developer", "Voltar", I(_class="fas fa-arrow-circle-left"),
            **{
                "_phanterpwa-way":
                "developer",
                "position":
                "top",
                "ways": [
                    lambda: window.PhanterPWA.get_current_way().startswith(
                        "project")
                ]
            })
        window.PhanterPWA.Components['left_bar'].add_button(BackButton)
        if self.request.get_arg(1) == "view":

            ConfigProject = left_bar.LeftBarButton(
                "config_project", "Configurar Projeto e Api",
                I(_class="fas fa-tools"), **{
                    "_phanterpwa-way":
                    "project/{0}/config".format(self.request.get_arg(0)),
                    "position":
                    "top",
                    "ways": [
                        lambda: window.PhanterPWA.get_current_way().startswith(
                            "project")
                    ]
                })
            window.PhanterPWA.Components['left_bar'].add_button(ConfigProject)
            window.PhanterPWA.GET(
                **{
                    'url_args': ['api', 'projects',
                                 self.request.get_arg(0)],
                    'onComplete': self._after_get_applications
                })
        elif self.request.get_arg(1) == "config":
            window.PhanterPWA.GET(
                **{
                    'url_args': ['api', 'config',
                                 self.request.get_arg(0)],
                    'onComplete': self._after_get_config
                })
Exemplo n.º 3
0
 def initialize(self):
     html = CONCATENATE(
         DIV(DIV(DIV(DIV("DEVELOPMENT", _class="phanterpwa-breadcrumb"),
                     _class="phanterpwa-breadcrumb-wrapper"),
                 _class="p-container"),
             _class='title_page_container card'),
         DIV(DIV(DIV(DIV(
             widgets.Preloaders("preload_android"),
             _style=
             "width:100%; text-align: center; padding-top: 100px; padding-bottom: 100px;"
         ),
                     _id="projects_container"),
                 _class="card p-row e-padding_10"),
             _class="phanterpwa-container p-container"))
     html.html_to("#main-container")
     BackButton = left_bar.LeftBarButton(
         "back_localizar_aluno", "Voltar",
         I(_class="fas fa-arrow-circle-left"), **{
             "_phanterpwa-way": "home",
             "position": "top",
             "ways": ["developer"]
         })
     TestButton = left_bar.LeftBarButton(
         "test_phanterpwa", "Test PhanterPWA", I(_class="fas fa-tasks"), **{
             "_phanterpwa-way": "test_phanterpwa",
             "position": "top",
             "ways": ["developer"]
         })
     CheckRequeriments = left_bar.LeftBarButton(
         "check_requeriments", "Check Requeriments",
         I(_class="fab fa-connectdevelop"), **{
             "_phanterpwa-way": "check_requeriments",
             "position": "top",
             "ways": ["developer"]
         })
     NewProjectsFolder = left_bar.LeftBarButton(
         "change_projects_folder", "Change Project Folder",
         I(_class="fas fa-folder-open"), **{
             "position": "top",
             "ways": ["developer"],
         })
     window.PhanterPWA.Components['left_bar'].add_button(BackButton)
     window.PhanterPWA.Components['left_bar'].add_button(TestButton)
     window.PhanterPWA.Components['left_bar'].add_button(CheckRequeriments)
     window.PhanterPWA.Components['left_bar'].add_button(NewProjectsFolder)
     if self.projects_data is None or self.projects_data is js_undefined:
         window.PhanterPWA.GET(
             **{
                 'url_args': ['api', 'projects'],
                 'onComplete': self._after_get_applications
             })
     else:
         self._xml_projects_list(self.projects_data)
     self._binds()
Exemplo n.º 4
0
 def initialize(self):
     html = CONCATENATE(
         DIV(
             DIV(
                 DIV(
                     DIV("TEST PHANTERPWA", _class="phanterpwa-breadcrumb"),
                     _class="phanterpwa-breadcrumb-wrapper"
                 ),
                 _class="p-container"),
             _class='title_page_container card'
         ),
         DIV(
             DIV(
                 DIV(
                     DIV(
                         widgets.Preloaders("preload_android"),
                         _style="width:100%; text-align: center; padding-top: 100px; padding-bottom: 100px;"
                     ),
                     _id="applications_container"),
                 _class="card p-row e-padding_10"
             ),
             _class="phanterpwa-container p-container"
         )
     )
     html.html_to("#main-container")
     BackButton = left_bar.LeftBarButton(
         "back_developer",
         "Voltar",
         I(_class="fas fa-arrow-circle-left"),
         **{
             "_phanterpwa-way": "developer",
             "position": "top",
             "ways": [lambda: window.PhanterPWA.get_current_way().startswith("test_phanterpwa")]
         }
     )
     window.PhanterPWA.Components['left_bar'].add_button(BackButton)
     window.PhanterPWA.GET(**{
         'url_args': ['api', 'automation', 'test_list'],
         'onComplete': self._after_get_test_list
     })
Exemplo n.º 5
0
 def initialize(self):
     if self.request.get_arg(0) == "inputs":
         html = CONCATENATE(
             DIV(DIV(DIV(DIV("COMPONENTES", _class="phanterpwa-breadcrumb"),
                         DIV("INPUT", _class="phanterpwa-breadcrumb"),
                         _class="phanterpwa-breadcrumb-wrapper"),
                     _class="p-container"),
                 _class='title_page_container card'),
             DIV(DIV(DIV(DIV(
                 widgets.Preloaders("preload_android"),
                 _style=
                 "width:100%; text-align: center; padding-top: 100px; padding-bottom: 100px;"
             ),
                         _id="projects_container"),
                     _class="card p-row e-padding_10"),
                 _id="input-container-example",
                 _class="phanterpwa-container p-container"))
         html.html_to("#main-container")
         setTimeout(lambda: inputs.Inputs(self), 30)
     elif self.request.get_arg(0) == "selects":
         html = CONCATENATE(
             DIV(DIV(DIV(DIV("COMPONENTES", _class="phanterpwa-breadcrumb"),
                         DIV("SELECT", _class="phanterpwa-breadcrumb"),
                         _class="phanterpwa-breadcrumb-wrapper"),
                     _class="p-container"),
                 _class='title_page_container card'),
             DIV(DIV(DIV(DIV(
                 widgets.Preloaders("preload_android"),
                 _style=
                 "width:100%; text-align: center; padding-top: 100px; padding-bottom: 100px;"
             ),
                         _id="projects_container"),
                     _class="card p-row e-padding_10"),
                 _id="selects-container-example",
                 _class="phanterpwa-container p-container"))
         html.html_to("#main-container")
         setTimeout(lambda: selects.Selects(self), 30)
     elif self.request.get_arg(0) == "menus":
         self.menus = menus.MenuBox(self)
     elif self.request.get_arg(0) == "others":
         self.others = Others(self)
     else:
         html = CONCATENATE(
             DIV(DIV(DIV(DIV("COMPONENTES", _class="phanterpwa-breadcrumb"),
                         _class="phanterpwa-breadcrumb-wrapper"),
                     _class="p-container"),
                 _class='title_page_container card'),
             DIV(DIV(
                 DIV(DIV(
                     DIV(
                         I(**{
                             "_class": "fas fa-edit promo-icon",
                         }), H2("Inputs", _class="promo-title"), **{
                             "_class": "link",
                             "_phanterpwa-way": "examples/inputs"
                         }), **{"_class": "promo-container"}),
                     _class='p-col w1p100 w3p50 w4p25'),
                 DIV(DIV(
                     DIV(
                         I(**{
                             "_class":
                             "far fa-caret-square-down promo-icon",
                         }), H2("Selects", _class="promo-title"), **{
                             "_class": "link",
                             "_phanterpwa-way": "examples/selects"
                         }), **{"_class": "promo-container"}),
                     _class='p-col w1p100 w3p50 w4p25'),
                 DIV(DIV(
                     DIV(
                         I(**{
                             "_class": "fas fa-ellipsis-v  promo-icon",
                         }), H2("Menus", _class="promo-title"), **{
                             "_class": "link",
                             "_phanterpwa-way": "examples/menus"
                         }), **{"_class": "promo-container"}),
                     _class='p-col w1p100 w3p50 w4p25'),
                 DIV(DIV(
                     DIV(
                         I(**{
                             "_class": "fas fa-file-signature  promo-icon",
                         }), H2("Others", _class="promo-title"), **{
                             "_class": "link",
                             "_phanterpwa-way": "examples/others"
                         }), **{"_class": "promo-container"}),
                     _class='p-col w1p100 w3p50 w4p25'),
                 DIV(DIV(
                     DIV(
                         I(**{
                             "_class": "fas fa-flag promo-icon",
                         }), H2("Font Awesome", _class="promo-title"), **{
                             "_class": "link",
                             "_phanterpwa-way": "fontawesome"
                         }), **{"_class": "promo-container"}),
                     _class='p-col w1p100 w3p50 w4p25'),
                 _class='p-row card e-padding_20'),
                 _class="phanterpwa-container p-container"))
         html.html_to("#main-container")
     BackButton1 = left_bar.LeftBarButton(
         "back_home", "Voltar", I(_class="fas fa-arrow-circle-left"), **{
             "_phanterpwa-way": "home",
             "position": "top",
             "ways": [lambda r: True if r == "examples" else False]
         })
     BackButton2 = left_bar.LeftBarButton(
         "back_examples", "Voltar", I(_class="fas fa-arrow-circle-left"),
         **{
             "_phanterpwa-way": "examples",
             "position": "top",
             "ways":
             [lambda r: True if r.startswith("examples/") else False]
         })
     window.PhanterPWA.Components['left_bar'].add_button(BackButton1)
     window.PhanterPWA.Components['left_bar'].add_button(BackButton2)