Browse Source

[minor] better message for beta docs

version-14
Rushabh Mehta 8 years ago
parent
commit
ad7911fb96
4 changed files with 12 additions and 5 deletions
  1. +2
    -2
      frappe/desk/doctype/todo/todo.json
  2. +3
    -0
      frappe/public/js/frappe/dom.js
  3. +5
    -1
      frappe/public/js/frappe/form/templates/form_sidebar.html
  4. +2
    -2
      frappe/test_runner.py

+ 2
- 2
frappe/desk/doctype/todo/todo.json View File

@@ -4,7 +4,7 @@
"allow_import": 0, "allow_import": 0,
"allow_rename": 0, "allow_rename": 0,
"autoname": "hash", "autoname": "hash",
"beta": 1,
"beta": 0,
"creation": "2012-07-03 13:30:35", "creation": "2012-07-03 13:30:35",
"custom": 0, "custom": 0,
"docstatus": 0, "docstatus": 0,
@@ -514,7 +514,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2017-07-12 19:08:23.760631",
"modified": "2017-07-13 17:44:54.369254",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Desk", "module": "Desk",
"name": "ToDo", "name": "ToDo",


+ 3
- 0
frappe/public/js/frappe/dom.js View File

@@ -211,6 +211,9 @@ frappe.timeout = seconds => {
}); });
}; };


frappe.scrub = function(text) {
return text.replace(/ /g, "_").toLowerCase();
};


frappe.get_modal = function(title, content) { frappe.get_modal = function(title, content) {
return $(frappe.render_template("modal", {title:title, content:content})).appendTo(document.body); return $(frappe.render_template("modal", {title:title, content:content})).appendTo(document.body);


+ 5
- 1
frappe/public/js/frappe/form/templates/form_sidebar.html View File

@@ -10,7 +10,11 @@
</ul> </ul>
{% if frm.meta.beta %} {% if frm.meta.beta %}
<div class="sidebar-menu"> <div class="sidebar-menu">
<label class="label label-warning" title="{{ __("This feature is brand new and still experimental") }}">{{ __("Experimental Feature") }}</label>
<p><label class="label label-warning" title="{{ __("This feature is brand new and still experimental") }}">{{ __("Under Development") }}</label></p>
<p><a class="small" href="https://github.com/frappe/{{ frappe.boot.module_app[frappe.scrub(frm.meta.module)] }}/issues/new"
target="_blank">
{{ __("Click here to post bugs and suggestions") }}</a></p>

</div> </div>
{% endif %} {% endif %}
<ul class="list-unstyled sidebar-menu sidebar-rating hide"> <ul class="list-unstyled sidebar-menu sidebar-rating hide">


+ 2
- 2
frappe/test_runner.py View File

@@ -128,7 +128,7 @@ def run_tests_for_doctype(doctype, verbose=False, tests=(), force=False, profile
for name in frappe.db.sql_list("select name from `tab%s`" % doctype): for name in frappe.db.sql_list("select name from `tab%s`" % doctype):
frappe.delete_doc(doctype, name, force=True) frappe.delete_doc(doctype, name, force=True)
make_test_records(doctype, verbose=verbose, force=force) make_test_records(doctype, verbose=verbose, force=force)
module = frappe.get_module(test_module)
module = importlib.import_module(test_module)
return _run_unittest(module, verbose=verbose, tests=tests, profile=profile) return _run_unittest(module, verbose=verbose, tests=tests, profile=profile)


def run_tests_for_module(module, verbose=False, tests=(), profile=False): def run_tests_for_module(module, verbose=False, tests=(), profile=False):
@@ -190,7 +190,7 @@ def _add_test(app, path, filename, verbose, test_suite=None, ui_tests=False):
module_name = '{app}.{relative_path}.{module_name}'.format(app=app, module_name = '{app}.{relative_path}.{module_name}'.format(app=app,
relative_path=relative_path.replace('/', '.'), module_name=filename[:-3]) relative_path=relative_path.replace('/', '.'), module_name=filename[:-3])


module = frappe.get_module(module_name)
module = importlib.import_module(module_name)
is_ui_test = True if hasattr(module, 'TestDriver') else False is_ui_test = True if hasattr(module, 'TestDriver') else False


if is_ui_test != ui_tests: if is_ui_test != ui_tests:


Loading…
Cancel
Save