Merge branch 'develop'

This commit is contained in:
Anand Doshi 2016-01-08 16:13:01 +05:30
commit 9060e50c3e
14 changed files with 65 additions and 77 deletions

View file

@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = "6.17.5"
__version__ = "6.17.6"

View file

@ -42,8 +42,13 @@ class DocShare(Document):
frappe.throw(_('You need to have "Share" permission'), frappe.PermissionError)
def after_insert(self):
self.get_doc().add_comment("Shared",
_("{0} shared this document with {1}").format(get_fullname(self.owner), get_fullname(self.user)))
doc = self.get_doc()
owner = get_fullname(self.owner)
if self.everyone:
doc.add_comment("Shared", _("{0} shared this document with everyone").format(owner))
else:
doc.add_comment("Shared", _("{0} shared this document with {1}").format(owner, get_fullname(self.user)))
def on_trash(self):
if not self.flags.ignore_share_permission:

View file

@ -1385,7 +1385,7 @@
"istable": 0,
"max_attachments": 5,
"menu_index": 0,
"modified": "2015-12-23 02:45:19.261689",
"modified": "2016-01-08 04:50:48.919694",
"modified_by": "Administrator",
"module": "Core",
"name": "User",
@ -1398,9 +1398,9 @@
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,

View file

@ -12,7 +12,6 @@ frappe.ui.form.on("Customize Form", {
filters: [
['DocType', 'issingle', '=', 0],
['DocType', 'custom', '=', 0],
['DocType', 'in_create', '=', 0],
['DocType', 'name', 'not in', 'DocType, DocField, DocPerm, User, Role, UserRole, \
Page, Page Role, Module Def, Print Format, Report, Customize Form, \
Customize Form Field']

View file

@ -1,6 +1,6 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "EV.#####",
"creation": "2013-06-10 13:17:47",
@ -24,6 +24,7 @@
"oldfieldtype": "Section Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -46,6 +47,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -71,6 +73,7 @@
"options": "Private\nPublic\nCancel",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -94,6 +97,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -115,6 +119,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -137,6 +142,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -159,6 +165,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -181,6 +188,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -202,6 +210,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -224,6 +233,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -246,6 +256,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -270,6 +281,7 @@
"options": "\nEvery Day\nEvery Week\nEvery Month\nEvery Year",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -294,6 +306,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -315,6 +328,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -338,6 +352,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -361,6 +376,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -384,6 +400,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -407,6 +424,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -430,6 +448,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -453,6 +472,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -476,6 +496,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -497,6 +518,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -521,6 +543,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
"report_hide": 0,
@ -546,6 +569,7 @@
"oldfieldtype": "Section Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -569,6 +593,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "50%",
"read_only": 0,
"report_hide": 0,
@ -596,6 +621,7 @@
"options": "Event Role",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -621,6 +647,7 @@
"options": "DocType",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -646,6 +673,7 @@
"options": "ref_type",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@ -664,7 +692,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:46.775883",
"modified": "2016-01-08 04:50:37.240223",
"modified_by": "Administrator",
"module": "Desk",
"name": "Event",
@ -697,9 +725,9 @@
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"export": 1,
"if_owner": 0,
"import": 0,
"import": 1,
"permlevel": 0,
"print": 1,
"read": 1,

View file

@ -32,8 +32,10 @@ def _toggle_like(doctype, name, add, user=None):
try:
liked_by, owner = frappe.db.get_value(doctype, name, ["_liked_by", "owner"])
if owner==frappe.session.user and add=="Yes":
frappe.throw(_("You cannot like something that you created"))
# CHANGED: Allow someone to like their own documents as it also works as a bookmark
# if owner==frappe.session.user and add=="Yes":
# frappe.throw(_("You cannot like something that you created"))
if liked_by:
liked_by = json.loads(liked_by)

View file

@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node"
app_icon = "octicon octicon-circuit-board"
app_version = "6.17.5"
app_version = "6.17.6"
app_color = "orange"
source_link = "https://github.com/frappe/frappe"
app_license = "MIT"

View file

@ -18,6 +18,12 @@
"website/js/website.js",
"public/js/lib/socket.io.min.js"
],
"js/editor.min.js": [
"public/js/lib/jquery/jquery.hotkeys.js",
"public/js/lib/beautify-html.js",
"public/js/frappe/ui/editor.html",
"public/js/frappe/ui/editor.js"
],
"js/dialog.min.js": [
"public/js/frappe/dom.js",
"public/js/frappe/ui/modal.html",

View file

@ -32,11 +32,13 @@
min-width: 24px;
height: 24px;
border-radius: 4px;
background-color: #ff5858;
color: #fff;
text-align: center;
padding: 2px 5px;
}
.navbar-new-comments-true {
background-color: #ff5858;
}
#navbar-search {
width: 300px;
background-color: rgba(255, 255, 255, 0.9);

View file

@ -27,7 +27,7 @@ frappe.get_indicator = function(doc, doctype) {
}
if(is_submittable && doc.docstatus==0) {
return [__("Draft"), "light-blue", "docstatus,=,0"];
return [__("Draft"), "red", "docstatus,=,0"];
}
if(is_submittable && doc.docstatus==2) {

View file

@ -60,12 +60,12 @@ frappe.socket = {
});
window.onbeforeunload = function() {
if (frm.is_new()) {
if (!cur_frm || cur_frm.is_new()) {
return;
}
// if tab/window is closed, notify other users
if (cur_frm && cur_frm.doc) {
if (cur_frm.doc) {
frappe.socket.doc_close(cur_frm.doctype, cur_frm.docname);
}
}

View file

@ -1,57 +0,0 @@
frappe.make_editable = function(editor, doctype, name, fieldname) {
frappe.require("/assets/js/editor.min.js");
WebPageEditor = bsEditor.extend({
onhide: function(action) {
this._super(action);
this.toggle_edit_mode(false);
},
setup_editor: function(editor) {
this._super(editor);
this.toggle_edit_mode(false);
},
toggle_edit_mode: function(bool) {
var me = this;
this._super(bool);
if(!bool) {
// remove existing web page editor toggles
$('li.editable-toggle + li').remove();
$('li.editable-toggle').remove();
var $edit_btn = $(repl('<li class="editable-toggle">\
<a href="#"><i class="icon-fixed-width icon-pencil"></i>Edit %(doctype)s</a></li>\
<li class="divider"></li>', {doctype: doctype}))
.prependTo($("#website-post-login ul.dropdown-menu"));
$edit_btn.find("a")
.on("click", function() {
me.toggle_edit_mode(true);
$edit_btn.remove();
return false;
});
}
}
});
bseditor = new WebPageEditor({
editor: editor,
onsave: function(bseditor) {
frappe.call({
type: "POST",
method: "frappe.client.set_value",
args: {
doctype: doctype,
name: name,
fieldname: fieldname,
value: bseditor.get_value()
},
callback: function(r) {
frappe.msgprint(r.exc ? __("Error") : __("Saved"));
if(!r.exc)
editor.html(r.message[0][fieldname]);
}
});
}
});
};

View file

@ -40,12 +40,15 @@
min-width: 24px;
height: 24px;
border-radius: 4px;
background-color: @indicator-red;
color: #fff;
text-align: center;
padding: 2px 5px;
}
.navbar-new-comments-true {
background-color: @indicator-red;
}
#navbar-search {
width: 300px;
background-color: rgba(255, 255, 255, 0.9);

View file

@ -1,7 +1,7 @@
from setuptools import setup, find_packages
from pip.req import parse_requirements
version = "6.17.5"
version = "6.17.6"
requirements = parse_requirements("requirements.txt", session="")
setup(