refactor: Remove Webview feature
This commit is contained in:
parent
7d04a56738
commit
8735683635
16 changed files with 0 additions and 719 deletions
|
|
@ -1,8 +0,0 @@
|
|||
// Copyright (c) 2020, Frappe Technologies and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('CSS Class', {
|
||||
// refresh: function(frm) {
|
||||
|
||||
// }
|
||||
});
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
"actions": [],
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "Prompt",
|
||||
"creation": "2020-03-17 15:03:31.431344",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"is_global",
|
||||
"is_dynamic",
|
||||
"css"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "is_global",
|
||||
"fieldtype": "Check",
|
||||
"label": "Is Global?"
|
||||
},
|
||||
{
|
||||
"fieldname": "css",
|
||||
"fieldtype": "Code",
|
||||
"in_list_view": 1,
|
||||
"label": "CSS",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"description": "Website Theme elements are accessible as Jinja variables. Example: \"{{ primary_color }}\"",
|
||||
"fieldname": "is_dynamic",
|
||||
"fieldtype": "Check",
|
||||
"label": "Is Dynamic?"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-03-17 17:01:14.874631",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Website",
|
||||
"name": "CSS Class",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Website Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class CSSClass(Document):
|
||||
pass
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
class TestCSSClass(unittest.TestCase):
|
||||
pass
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{% extends "templates/web.html" %}
|
||||
|
||||
{% block page_content %}
|
||||
{% include "frappe/website/doctype/web_view/templates/web_view_content.html" %}
|
||||
{% endblock %}
|
||||
|
||||
<!-- this is a sample default web page template -->
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
{%- if css_rules or css -%}
|
||||
|
||||
<style>
|
||||
{%- for css_rule in css_rules -%}
|
||||
{{ css_rule }}
|
||||
{%- endfor -%}
|
||||
{{ css or "" }}
|
||||
</style>
|
||||
{%- endif -%}
|
||||
|
||||
{%- macro render_element(element) -%}
|
||||
{%- if element.element_type in ('Content', 'Web View') -%}
|
||||
<div class="web-content {{ element_class(element) }}" {{ element_style(element) }}>
|
||||
{{ element.web_content_html }}
|
||||
</div>
|
||||
{%- elif element.element_type=='Image' -%}
|
||||
<img src='{{ element.image_url }}'
|
||||
{%- if element.element_class -%}class='{{ element.element_class }}'{%- endif -%}
|
||||
{{ element_style(element) }}>
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro element_class(element) -%}
|
||||
{{ element.element_class or "" }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro element_style(element) -%}
|
||||
{%- if element.element_style or element.background_color -%}
|
||||
style = "{{ element.element_style or '' }} {%if element.background_color %}background-color: {{ element.background_color }};{% endif %}"
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro render_sections(sections) -%}
|
||||
{%- for section in sections -%}
|
||||
<section class='section {{ section.element_class or "" }} {{ section.hide and "hidden" or "" }}' {{ element_style(section) }}>
|
||||
<div class='section-body {% if section.contain_section_width %}container{% endif %}'>
|
||||
{%- if section.section_intro -%}
|
||||
<div class='section-intro'>{{ section.section_intro }}</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if section.section_type == 'List' -%}
|
||||
{%- for element in section.elements -%}
|
||||
{{ render_element(element) }}
|
||||
{%- endfor -%}
|
||||
|
||||
{%- elif section.section_type == 'Grid' -%}
|
||||
<div class='row'>
|
||||
{%- for element in section.elements -%}
|
||||
<div class='col-md-{{ element.columns or 6 }}'>
|
||||
{{ render_element(element) }}
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
|
||||
{%- elif section.section_type == 'Tabbed' -%}
|
||||
<ul class="nav" role="tablist">
|
||||
{%- for element in section.elements -%}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{ loop.index == 1 and 'active' or ''}}" href="#{{ element.element_id }}" role="tab" data-toggle="tab">
|
||||
{{ element.title }}
|
||||
</a>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{%- for element in section.elements -%}
|
||||
<div class="tab-pane {{ loop.index == 1 and 'show active' or ''}}" role="tabpanel" id="{{ element.element_id }}">
|
||||
{{ render_element(element) }}
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</section>
|
||||
{%- endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% if content_type == 'HTML' -%}
|
||||
{{ content_html }}
|
||||
{%- else -%}
|
||||
{{ render_sections(sections) }}
|
||||
{%- endif -%}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
<div>
|
||||
<a href={{ route }}>{{ title }}</a>
|
||||
</div>
|
||||
<!-- this is a sample default list template -->
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.website.doctype.web_page.test_web_page import get_page_content
|
||||
|
||||
test_dependencies = ['Web Page'] # for test
|
||||
|
||||
class TestWebView(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
frappe.delete_doc_if_exists('Web View', 'test-web-view')
|
||||
frappe.delete_doc_if_exists('Web View', 'html-web-view')
|
||||
frappe.delete_doc_if_exists('CSS Class', 'test-css-class')
|
||||
|
||||
frappe.get_doc(dict(
|
||||
doctype = 'CSS Class',
|
||||
name = 'test-css-class',
|
||||
css = '.test-class { color: red; }'
|
||||
)).insert()
|
||||
|
||||
# simple html webview
|
||||
frappe.get_doc(dict(
|
||||
doctype = 'Web View',
|
||||
title = 'HTML Web View',
|
||||
route = 'html-web-view',
|
||||
published = 1,
|
||||
content_type = 'HTML',
|
||||
content_html = '<h1>Hello HTML</h1>'
|
||||
)).insert()
|
||||
|
||||
# simple web view with components
|
||||
|
||||
frappe.get_doc(dict(
|
||||
doctype = 'Web View',
|
||||
title = 'Test Web View',
|
||||
route = 'test-web-view',
|
||||
published = 1,
|
||||
content_type = 'Components',
|
||||
components = [
|
||||
dict(
|
||||
element_type = 'Section',
|
||||
section_type = 'List'
|
||||
),
|
||||
dict(
|
||||
element_type = 'Content',
|
||||
web_content_type = 'Markdown',
|
||||
web_content_markdown = '## Heading\n\nBody'
|
||||
),
|
||||
dict(
|
||||
element_type = 'Content',
|
||||
web_content_type = 'HTML',
|
||||
web_content_html = '<div>Here is some HTML</div>'
|
||||
),
|
||||
dict(
|
||||
element_type = 'Section',
|
||||
section_type = 'Grid'
|
||||
),
|
||||
dict(
|
||||
element_type = 'Content',
|
||||
element_class = 'test-css-class',
|
||||
web_content_type = 'Markdown',
|
||||
web_content_markdown = 'Column 1'
|
||||
),
|
||||
dict(
|
||||
element_type = 'Content',
|
||||
web_content_type = 'Markdown',
|
||||
web_content_markdown = 'Column 2'
|
||||
),
|
||||
dict(
|
||||
element_type = 'Web View',
|
||||
web_view = 'html-web-view',
|
||||
),
|
||||
]
|
||||
)).insert()
|
||||
|
||||
def test_web_view(self):
|
||||
html = get_page_content('test-web-view')
|
||||
self.assert_web_view_in_html(html)
|
||||
|
||||
def test_html_web_view(self):
|
||||
html = get_page_content('html-web-view')
|
||||
self.assertTrue('Hello HTML' in html)
|
||||
|
||||
def assert_web_view_in_html(self, html):
|
||||
self.assertTrue('<h2 id="heading">Heading</h2>' in html)
|
||||
self.assertTrue('<div>Here is some HTML</div>' in html)
|
||||
self.assertTrue('Column 1' in html)
|
||||
self.assertTrue('Column 2' in html)
|
||||
self.assertTrue('Hello HTML' in html)
|
||||
self.assertTrue('.test-class { color: red; }' in html)
|
||||
|
||||
def test_web_view_in_footer(self):
|
||||
website_settings = frappe.get_single("Website Settings")
|
||||
website_settings.footer_type = 'Web View'
|
||||
website_settings.footer_web_view = 'test-web-view'
|
||||
website_settings.save()
|
||||
|
||||
html = get_page_content('test-web-page-1')
|
||||
|
||||
website_settings.footer_type = 'Standard'
|
||||
website_settings.footer_web_view = ''
|
||||
website_settings.save()
|
||||
|
||||
# web view should still come as footer
|
||||
self.assert_web_view_in_html(html)
|
||||
|
||||
html_without_footer = get_page_content('test-web-page-1')
|
||||
|
||||
# no more footer
|
||||
self.assertFalse('Column 1' in html_without_footer)
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// Copyright (c) 2020, Frappe Technologies and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Web View', {
|
||||
// refresh: function(frm) {
|
||||
|
||||
// }
|
||||
});
|
||||
|
|
@ -1,154 +0,0 @@
|
|||
{
|
||||
"actions": [],
|
||||
"allow_guest_to_view": 1,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"beta": 1,
|
||||
"creation": "2020-03-16 15:28:03.828741",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"title",
|
||||
"route",
|
||||
"column_break_4",
|
||||
"full_width",
|
||||
"published",
|
||||
"section_break_6",
|
||||
"content_type",
|
||||
"content_html",
|
||||
"components",
|
||||
"style_section",
|
||||
"css",
|
||||
"metatags_section",
|
||||
"meta_title",
|
||||
"meta_description",
|
||||
"meta_image"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "title",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Title",
|
||||
"reqd": 1,
|
||||
"unique": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "route",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Route"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "published",
|
||||
"fieldtype": "Check",
|
||||
"label": "Published"
|
||||
},
|
||||
{
|
||||
"fieldname": "css",
|
||||
"fieldtype": "Code",
|
||||
"label": "CSS"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_4",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "full_width",
|
||||
"fieldtype": "Check",
|
||||
"label": "Full Width"
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_6",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Content"
|
||||
},
|
||||
{
|
||||
"default": "Components",
|
||||
"fieldname": "content_type",
|
||||
"fieldtype": "Select",
|
||||
"label": "Content Type",
|
||||
"options": "Components\nHTML",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.content_type==='Components'",
|
||||
"fieldname": "components",
|
||||
"fieldtype": "Table",
|
||||
"label": "Components",
|
||||
"options": "Web View Component"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.content_type===\"HTML\"",
|
||||
"fieldname": "content_html",
|
||||
"fieldtype": "HTML Editor",
|
||||
"label": "Content HTML"
|
||||
},
|
||||
{
|
||||
"fieldname": "style_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Style"
|
||||
},
|
||||
{
|
||||
"fieldname": "metatags_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Meta Tags"
|
||||
},
|
||||
{
|
||||
"fieldname": "meta_title",
|
||||
"fieldtype": "Data",
|
||||
"label": "Title"
|
||||
},
|
||||
{
|
||||
"fieldname": "meta_description",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Description"
|
||||
},
|
||||
{
|
||||
"fieldname": "meta_image",
|
||||
"fieldtype": "Attach Image",
|
||||
"label": "Image"
|
||||
}
|
||||
],
|
||||
"has_web_view": 1,
|
||||
"is_published_field": "published",
|
||||
"links": [],
|
||||
"modified": "2020-04-22 00:54:23.413077",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Website",
|
||||
"name": "Web View",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Website Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"route": "route",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
from frappe.utils import markdown
|
||||
import frappe
|
||||
|
||||
class WebView(WebsiteGenerator):
|
||||
def get_context(self, context):
|
||||
# group components into sections
|
||||
if self.content_type=='Components':
|
||||
self.build_components(context)
|
||||
|
||||
self.set_metatags(context)
|
||||
return context
|
||||
|
||||
def build_components(self, context):
|
||||
context.sections = []
|
||||
context.css_rules = []
|
||||
for component in self.components:
|
||||
if not context.sections and component.element_type!='Section':
|
||||
self.add_default_section(context)
|
||||
|
||||
if component.element_type=='Section':
|
||||
self.add_section(context, component)
|
||||
else:
|
||||
self.add_component(context, component)
|
||||
|
||||
self.add_css_class(context, component)
|
||||
self.add_color(component)
|
||||
self.add_missing_semi(component)
|
||||
|
||||
return context
|
||||
|
||||
def add_section(self, context, component):
|
||||
component.elements = []
|
||||
context.sections.append(component)
|
||||
|
||||
if component.section_intro:
|
||||
component.section_intro = markdown(component.section_intro)
|
||||
|
||||
def add_component(self, context, component):
|
||||
if component.hide:
|
||||
return
|
||||
|
||||
if component.element_type == 'Web View' and component.web_view:
|
||||
component.web_content_html = frappe.get_doc('Web View', component.web_view).render_content()
|
||||
|
||||
elif component.web_content_type == 'Markdown':
|
||||
component.web_content_html = markdown(component.web_content_markdown)
|
||||
|
||||
if component.title:
|
||||
component.element_id = frappe.scrub(component.title)
|
||||
|
||||
context.sections[-1].elements.append(component)
|
||||
|
||||
def add_css_class(self, context, component):
|
||||
# add css class definitions selected by the user
|
||||
if component.element_class and not component.hide:
|
||||
css, is_dynamic = frappe.db.get_value('CSS Class', component.element_class, ['css', 'is_dynamic'])
|
||||
if is_dynamic:
|
||||
css = frappe.render_template(css, self.get_theme())
|
||||
context.css_rules.append(css)
|
||||
|
||||
def add_color(self, component):
|
||||
# convert to css color
|
||||
if component.background_color and not component.hide:
|
||||
component.background_color = frappe.db.get_value('Color',
|
||||
component.background_color, 'color', cache=True)
|
||||
|
||||
def add_missing_semi(self, component):
|
||||
if component.element_style and not component.element_style.strip().endswith(';'):
|
||||
component.element_style = component.element_style.strip() + ';'
|
||||
|
||||
def render_content(self):
|
||||
# webview can be rendered as an object (see footer)
|
||||
return frappe.render_template("frappe/website/doctype/web_view/templates/web_view_content.html", self.get_context(self.as_dict()))
|
||||
|
||||
def get_theme(self):
|
||||
# get theme properties
|
||||
if not hasattr(self, '_theme'):
|
||||
default_theme = frappe.db.get_value("Website Settings", "Website Settings", "website_theme")
|
||||
self._theme = frappe.get_value('Website Theme', default_theme, '*')
|
||||
return self._theme
|
||||
|
||||
def add_default_section(self, context):
|
||||
# add a default section if not added
|
||||
context.sections.append(frappe._dict(
|
||||
element_type='Section',
|
||||
section_type='List',
|
||||
title='Default Section',
|
||||
elements=[]
|
||||
))
|
||||
|
||||
def set_metatags(self, context):
|
||||
context.metatags = {
|
||||
"name": self.meta_title or context.title,
|
||||
"description": self.meta_description,
|
||||
"image": self.meta_image
|
||||
}
|
||||
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2020-03-16 15:25:17.530296",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"element_type",
|
||||
"title",
|
||||
"hide",
|
||||
"contain_section_width",
|
||||
"column_break_3",
|
||||
"columns",
|
||||
"background_color",
|
||||
"element_class",
|
||||
"element_style",
|
||||
"section_break_5",
|
||||
"web_view",
|
||||
"section_type",
|
||||
"web_content_type",
|
||||
"web_content_html",
|
||||
"web_content_markdown",
|
||||
"image_url",
|
||||
"section_intro"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "element_type",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Element Type",
|
||||
"options": "Section\nContent\nImage\nWeb View",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"default": "List",
|
||||
"depends_on": "eval:doc.element_type==='Section'",
|
||||
"fieldname": "section_type",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Section Type",
|
||||
"options": "List\nTabbed\nGrid"
|
||||
},
|
||||
{
|
||||
"default": "Markdown",
|
||||
"depends_on": "eval:doc.element_type==='Content'",
|
||||
"fieldname": "web_content_type",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Web Content Type",
|
||||
"options": "Markdown\nHTML"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.element_type === 'Content' && doc.web_content_type === 'HTML'",
|
||||
"fieldname": "web_content_html",
|
||||
"fieldtype": "HTML Editor",
|
||||
"label": "Web Content HTML"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.element_type === 'Content' && doc.web_content_type === 'Markdown'",
|
||||
"fieldname": "web_content_markdown",
|
||||
"fieldtype": "Markdown Editor",
|
||||
"label": "Web Content Markdown"
|
||||
},
|
||||
{
|
||||
"fieldname": "title",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Title"
|
||||
},
|
||||
{
|
||||
"fieldname": "columns",
|
||||
"fieldtype": "Int",
|
||||
"label": "Columns"
|
||||
},
|
||||
{
|
||||
"fieldname": "element_class",
|
||||
"fieldtype": "Link",
|
||||
"label": "Element Class",
|
||||
"options": "CSS Class"
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_5",
|
||||
"fieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_3",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.element_type==='Image'",
|
||||
"fieldname": "image_url",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Image URL"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.element_type==='Section'",
|
||||
"fieldname": "section_intro",
|
||||
"fieldtype": "Markdown Editor",
|
||||
"label": "Section Intro"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "hide",
|
||||
"fieldtype": "Check",
|
||||
"label": "Hide"
|
||||
},
|
||||
{
|
||||
"fieldname": "element_style",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Element Style"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"depends_on": "eval:doc.element_type==='Section'",
|
||||
"fieldname": "contain_section_width",
|
||||
"fieldtype": "Check",
|
||||
"label": "Contain Section Width"
|
||||
},
|
||||
{
|
||||
"fieldname": "background_color",
|
||||
"fieldtype": "Link",
|
||||
"label": "Background Color",
|
||||
"options": "Color"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.element_type==='Web View'",
|
||||
"fieldname": "web_view",
|
||||
"fieldtype": "Link",
|
||||
"label": "Web View",
|
||||
"options": "Web View"
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-04-19 03:02:53.233036",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Website",
|
||||
"name": "Web View Component",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class WebViewComponent(Document):
|
||||
pass
|
||||
Loading…
Add table
Reference in a new issue