Ver a proveniência

bugfixes

version-14
Rushabh Mehta há 11 anos
ascendente
cometimento
482e55ec33
25 ficheiros alterados com 64 adições e 44 eliminações
  1. +3
    -1
      frappe/__init__.py
  2. +3
    -3
      frappe/cli.py
  3. +1
    -1
      frappe/core/page/permission_manager/permission_manager.js
  4. +3
    -0
      frappe/modules/patch_handler.py
  5. +2
    -1
      frappe/patches.txt
  6. +4
    -1
      frappe/patches/4_0/set_todo_checked_as_closed.py
  7. +9
    -0
      frappe/patches/4_0/webnotes_to_frappe.py
  8. +1
    -1
      frappe/public/js/frappe/app.js
  9. +1
    -1
      frappe/public/js/frappe/misc/number_format.js
  10. +2
    -2
      frappe/public/js/frappe/misc/pretty_date.js
  11. +2
    -1
      frappe/public/js/frappe/provide.js
  12. +5
    -5
      frappe/public/js/frappe/ui/editor.js
  13. +2
    -2
      frappe/public/js/frappe/ui/listing.js
  14. +3
    -3
      frappe/public/js/frappe/views/doclistview.js
  15. +1
    -1
      frappe/public/js/frappe/views/test_runner.js
  16. +4
    -4
      frappe/public/js/lib/jquery/jquery.min.js
  17. +3
    -3
      frappe/templates/generators/blog_post.html
  18. +3
    -3
      frappe/templates/generators/web_page.html
  19. +3
    -3
      frappe/templates/includes/comments.html
  20. +4
    -4
      frappe/templates/pages/update-password.html
  21. +1
    -1
      frappe/templates/website_group/edit_post.html
  22. +1
    -1
      frappe/templates/website_group/forum.html
  23. +1
    -1
      frappe/templates/website_group/post.html
  24. +1
    -0
      frappe/website/doctype/website_sitemap_config/website_sitemap_config.py
  25. +1
    -1
      frappe/website/js/website.js

+ 3
- 1
frappe/__init__.py Ver ficheiro

@@ -416,6 +416,7 @@ def get_hooks(hook=None, app_name=None):
def load_app_hooks(app_name=None):
hooks = {}
for app in [app_name] if app_name else get_installed_apps():
if app=="webnotes": app="frappe"
for item in get_file_items(get_pymodule_path(app, "hooks.txt")):
key, value = item.split("=", 1)
key, value = key.strip(), value.strip()
@@ -441,7 +442,8 @@ def setup_module_map():
if not local.app_modules:
local.module_app, local.app_modules = {}, {}
for app in get_all_apps(True):
for app in get_all_apps(True):
if app=="webnotes": app="frappe"
local.app_modules.setdefault(app, [])
for module in get_module_list(app):
local.module_app[module] = app


+ 3
- 3
frappe/cli.py Ver ficheiro

@@ -28,9 +28,9 @@ def main():
if not fn in site_arg_optional:
if not parsed_args.get("site") and os.path.exists("currentsite.txt"):
with open("currentsite.txt", "r") as sitefile:
site = sitefile.read()
else:
site = parsed_args.get("site")
parsed_args["site"] = sitefile.read()
site = parsed_args.get("site")

if not site:
print "Site argument required"


+ 1
- 1
frappe/core/page/permission_manager/permission_manager.js Ver ficheiro

@@ -45,7 +45,7 @@ frappe.pages['permission-manager'].onload = function(wrapper) {
"<li>"+frappe._("If 'Restricted' is checked, the owner is always allowed based on Role.")+"</li>"+
"<li>"+frappe._("Once you have set this, the users will only be able access documents where the link (e.g Company) exists.")+"</li>"+
"<li>"+frappe._("Apart from System Manager, roles with Restrict permission can restrict other users for that Document Type")+"</li></ol><hr>\
<p>"+frappe._("If these instructions where not helpful, please add in your suggestions at <a href='https://github.com/frappe/frappe.ramework/issues'>GitHub Issues</a>")+"</p>\
<p>"+frappe._("If these instructions where not helpful, please add in your suggestions at <a href='https://github.com/frappe/frappe/issues'>GitHub Issues</a>")+"</p>\
</tr></td>\
</table>");
wrapper.permission_engine = new frappe.PermissionEngine(wrapper);


+ 3
- 0
frappe/modules/patch_handler.py Ver ficheiro

@@ -29,6 +29,9 @@ def run_all():
def get_all_patches():
patches = []
for app in frappe.get_installed_apps():
# 3-to-4 fix
if app=="webnotes":
app="frappe"
patches.extend(frappe.get_file_items(frappe.get_pymodule_path(app, "patches.txt")))
return patches


+ 2
- 1
frappe/patches.txt Ver ficheiro

@@ -10,4 +10,5 @@ frappe.patches.4_0.remove_index_sitemap
frappe.patches.4_0.add_delete_permission
frappe.patches.4_0.move_match_to_restricted
frappe.patches.4_0.set_todo_checked_as_closed
frappe.patches.4_0.website_sitemap_hierarchy
frappe.patches.4_0.website_sitemap_hierarchy
frappe.patches.4_0.webnotes_to_frappe

+ 4
- 1
frappe/patches/4_0/set_todo_checked_as_closed.py Ver ficheiro

@@ -2,4 +2,7 @@ import frappe

def execute():
frappe.reload_doc("core", "doctype", "todo")
frappe.conn.sql("""update tabToDo set status = if(ifnull(checked,0)=0, 'Open', 'Closed')""")
try:
frappe.conn.sql("""update tabToDo set status = if(ifnull(checked,0)=0, 'Open', 'Closed')""")
except:
pass

+ 9
- 0
frappe/patches/4_0/webnotes_to_frappe.py Ver ficheiro

@@ -0,0 +1,9 @@
import frappe, json

def execute():
installed = frappe.get_installed_apps()
if "webnotes" in installed:
installed.remove("webnotes")
installed = ["frappe"] + installed
frappe.conn.set_global("installed_apps", json.dumps(installed))
frappe.clear_cache()

+ 1
- 1
frappe/public/js/frappe/app.js Ver ficheiro

@@ -173,7 +173,7 @@ frappe.Application = Class.extend({
make_nav_bar: function() {
// toolbar
if(frappe.boot) {
frappe.container.frappe.oolbar = new frappe.ui.toolbar.Toolbar();
frappe.container.frappe_toolbar = new frappe.ui.toolbar.Toolbar();
}
},
logout: function() {


+ 1
- 1
frappe/public/js/frappe/misc/number_format.js Ver ficheiro

@@ -1,7 +1,7 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt

if(!window.frappe. frappe.= {};
if(!window.frappe) window.frappe = {};

function flt(v, decimals, number_format) {
if(v==null || v=='')return 0;


+ 2
- 2
frappe/public/js/frappe/misc/pretty_date.js Ver ficheiro

@@ -26,14 +26,14 @@ function prettyDate(time){


var comment_when = function(datetime) {
return '<span class="frappe.timestamp" data-timestamp="'+datetime+'">' + prettyDate(datetime) + '</span>';
return '<span class="frappe-timestamp" data-timestamp="'+datetime+'">' + prettyDate(datetime) + '</span>';
};

frappe.provide("frappe.datetime");
frappe.datetime.comment_when = prettyDate;
frappe.datetime.refresh_when = function() {
if(jQuery) {
$(".frappe.timestamp").each(function() {
$(".frappe-timestamp").each(function() {
$(this).html(prettyDate($(this).attr("data-timestamp")));
})
}


+ 2
- 1
frappe/public/js/frappe/provide.js Ver ficheiro

@@ -2,7 +2,8 @@
// MIT License. See license.txt

// provide a namespace
if(!window.frappe.frappe.= {}
if(!window.frappe)
window.frappe = {};
frappe.provide = function(namespace) {
// docs: create a namespace //
var nsl = namespace.split('.');


+ 5
- 5
frappe/public/js/frappe/ui/editor.js Ver ficheiro

@@ -15,7 +15,7 @@ bsEditor = Class.extend({
this.setup_fixed_toolbar();
} else if(this.options.parent) {
this.wrapper = $("<div></div>").appendTo(this.options.parent);
this.setup_editor($("<div class='frappe.editor'></div>").appendTo(this.wrapper));
this.setup_editor($("<div class='frappe-list'></div>").appendTo(this.wrapper));
this.setup_inline_toolbar();
this.editor.css(this.options.inline_editor_style);
this.set_editing();
@@ -223,8 +223,8 @@ bsEditorToolbar = Class.extend({
make: function(parent) {
if(!parent)
parent = $("body");
if(!parent.find(".frappe.editor-toolbar").length) {
this.toolbar = $('<div class="frappe.editor-toolbar frappe.ignore-click">\
if(!parent.find(".frappe-list-toolbar").length) {
this.toolbar = $('<div class="frappe-list-toolbar frappe-ignore-click">\
<div class="btn-toolbar" data-role="editor-toolbar" style="margin-bottom: 7px;">\
<div class="btn-group form-group">\
<a class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown" \
@@ -438,7 +438,7 @@ bsHTMLEditor = Class.extend({
style="height: 400px; width: 100%; font-family: Monaco, \'Courier New\', monospace; font-size: 11px">\
</textarea><br>\
<button class="btn btn-primary" style="margin-top: 7px;">Save</button>');
this.modal.addClass("frappe.ignore-click");
this.modal.addClass("frappe-ignore-click");
this.modal.find(".btn-primary").on("click", function() {
var html = me.modal.find("textarea").val();
$.each(me.editor.dataurls, function(key, val) {
@@ -480,7 +480,7 @@ bsLinkEditor = Class.extend({
</div>\
<button class="btn btn-primary" style="margin-top: 7px;">Insert</button>');
this.modal.addClass("frappe.ignore-click");
this.modal.addClass("frappe-ignore-click");
this.modal.find(".btn-primary").on("click", function() {
me.toolbar.restore_selection();
var url = me.modal.find("input[type=text]").val();


+ 2
- 2
frappe/public/js/frappe/ui/listing.js Ver ficheiro

@@ -61,7 +61,7 @@ frappe.ui.Listing = Class.extend({
$.extend(this, this.opts);
$(this.parent).html(repl('\
<div class="frappe.ist">\
<div class="frappe-list">\
<h3 class="title hide">%(title)s</h3>\
\
<div class="list-filters" style="display: none;">\
@@ -99,7 +99,7 @@ frappe.ui.Listing = Class.extend({
</p>\
</div>\
', this.opts));
this.$w = $(this.parent).find('.frappe.ist');
this.$w = $(this.parent).find('.frappe-list');
this.set_events();
if(this.appframe) {


+ 3
- 3
frappe/public/js/frappe/views/doclistview.js Ver ficheiro

@@ -53,7 +53,7 @@ frappe.views.DocListView = frappe.ui.Listing.extend({
this.page.doclistview = this;
this.$page = $(this.page).css({"min-height": "400px"});
$('<div class="frappe.ist-area" style="margin-bottom: 25px;">\
$('<div class="frappe-list-area" style="margin-bottom: 25px;">\
<div class="help">'+frappe._('Loading')+'...</div></div>')
.appendTo(this.$page.find(".layout-main-section"));
@@ -83,7 +83,7 @@ frappe.views.DocListView = frappe.ui.Listing.extend({
setup: function() {
this.can_delete = frappe.model.can_delete(this.doctype);
this.meta = locals.DocType[this.doctype];
this.$page.find('.frappe.ist-area').empty(),
this.$page.find('.frappe-list-area').empty(),
this.setup_listview();
this.setup_docstatus_filter();
this.init_list(false);
@@ -153,7 +153,7 @@ frappe.views.DocListView = frappe.ui.Listing.extend({
},
setup_listview: function() {
this.listview = frappe.views.get_listview(this.doctype, this);
this.wrapper = this.$page.find('.frappe.ist-area');
this.wrapper = this.$page.find('.frappe-list-area');
this.page_length = 20;
this.allow_delete = true;
},


+ 1
- 1
frappe/public/js/frappe/views/test_runner.js Ver ficheiro

@@ -15,7 +15,7 @@ frappe.standard_pages["test-runner"] = function() {
var route = frappe.get_route();
if(route.length < 2) {
msgprint("To run a test add the module name in the route after 'test-runner/'. \
For example, #test-runner/lib/js/frappe.test_app.js");
For example, #test-runner/lib/js/frappe/test_app.js");
return;
}



+ 4
- 4
frappe/public/js/lib/jquery/jquery.min.js
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


+ 3
- 3
frappe/templates/generators/blog_post.html Ver ficheiro

@@ -26,9 +26,9 @@
<script>
$(function() {
if(window.logged_in && getCookie("system_user")==="yes") {
wn.has_permission("Blog Post", "{{ name }}", "write", function(r) {
wn.require("assets/frappe/js/wn/website/editable.js");
wn.make_editable($('[itemprop="articleBody"]'), "Blog Post", "{{ name }}", "content");
frappe.has_permission("Blog Post", "{{ name }}", "write", function(r) {
frappe.require("assets/frappe/js/frappe/website/editable.js");
frappe.make_editable($('[itemprop="articleBody"]'), "Blog Post", "{{ name }}", "content");
});
}
});


+ 3
- 3
frappe/templates/generators/web_page.html Ver ficheiro

@@ -42,9 +42,9 @@
<script>
$(function() {
if(window.logged_in && getCookie("system_user")==="yes") {
wn.has_permission("Web Page", "{{ docname }}", "write", function(r) {
wn.require("assets/frappe/js/wn/website/editable.js");
wn.make_editable($(".web-page-content"), "Web Page", "{{ docname }}", "main_section");
frappe.has_permission("Web Page", "{{ docname }}", "write", function(r) {
frappe.require("assets/frappe/js/frappe/website/editable.js");
frappe.make_editable($(".web-page-content"), "Web Page", "{{ docname }}", "main_section");
});
}
});


+ 3
- 3
frappe/templates/includes/comments.html Ver ficheiro

@@ -58,11 +58,11 @@ $(document).ready(function() {
}
if(!args.comment_by_fullname || !args.comment_by || !args.comment) {
wn.msgprint("All fields are necessary to submit the comment.")
frappe.msgprint("All fields are necessary to submit the comment.")
return false;
}
wn.call({
frappe.call({
btn: this,
type: "POST",
method: "frappe.templates.includes.comments.add_comment",
@@ -70,7 +70,7 @@ $(document).ready(function() {
callback: function(r) {
if(r.exc) {
if(r._server_messages)
wn.msgprint(r._server_messages);
frappe.msgprint(r._server_messages);
} else {
$(r.message).appendTo("#comment-list");
$(".no-comment, .add-comment").toggle(false);


+ 4
- 4
frappe/templates/pages/update-password.html Ver ficheiro

@@ -46,15 +46,15 @@ $(document).ready(function() {
}
if(!args.old_password && !args.key) {
wn.msgprint("Old Password Required.");
frappe.msgprint("Old Password Required.");
return;
}
if(!args.new_password) {
wn.msgprint("New Password Required.")
frappe.msgprint("New Password Required.")
return;
}
wn.call({
frappe.call({
type: "POST",
method: "frappe.core.doctype.profile.profile.update_password",
btn: $("#update"),
@@ -62,7 +62,7 @@ $(document).ready(function() {
callback: function(r) {
if(r.message) {
$("input").val("");
var dialog = wn.msgprint(r.message);
var dialog = frappe.msgprint(r.message);
dialog.on("hide.bs.modal", function() {
window.location.href = "login";
});


+ 1
- 1
frappe/templates/website_group/edit_post.html Ver ficheiro

@@ -1,7 +1,7 @@
{% include "templates/includes/post_editor.html" %}

<script>
wn.require("/assets/js/canvasResize.min.js");
frappe.require("/assets/js/canvasResize.min.js");
$(function() {
website.bind_add_post();


+ 1
- 1
frappe/templates/website_group/forum.html Ver ficheiro

@@ -9,7 +9,7 @@
<script>
$(function() {
if($(".post").length===20) {
wn.setup_pagination();
frappe.setup_pagination();
}
{% if group.group_type == "Forum" -%}


+ 1
- 1
frappe/templates/website_group/post.html Ver ficheiro

@@ -13,7 +13,7 @@
</div>

<script>
wn.require("/assets/js/canvasResize.min.js");
frappe.require("/assets/js/canvasResize.min.js");
$(function() {
website.toggle_edit(true);
website.toggle_upvote();


+ 1
- 0
frappe/website/doctype/website_sitemap_config/website_sitemap_config.py Ver ficheiro

@@ -43,6 +43,7 @@ def rebuild_website_sitemap_config():
frappe.conn.sql("""delete from `tabWebsite Sitemap Config`""")
for app in frappe.get_installed_apps():
if app=="webnotes": app="frappe"
build_website_sitemap_config(app)
cleanup_sitemap()


+ 1
- 1
frappe/website/js/website.js Ver ficheiro

@@ -3,7 +3,7 @@

frappe.provide("website");

$.extend(frappe. {
$.extend(frappe, {
_assets_loaded: [],
require: function(url) {
if(frappe._assets_loaded.indexOf(url)!==-1) return;


Carregando…
Cancelar
Guardar