Merge branch 'shf_rename' of github.com:webnotes/wnframework into shf_rename
This commit is contained in:
commit
64f2b46cf2
5 changed files with 13 additions and 16 deletions
|
|
@ -51,6 +51,7 @@
|
|||
"lib/css/bootstrap/navbar.css",
|
||||
"lib/css/bootstrap/dropdown.css",
|
||||
"lib/css/bootstrap/tooltip.css",
|
||||
"lib/css/bootstrap/icons.css",
|
||||
"lib/css/legacy/body.css",
|
||||
"lib/css/legacy/messages.css",
|
||||
"lib/css/legacy/dialog.css",
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ body {
|
|||
padding: 0px;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
/* font settings */
|
||||
|
|
@ -128,12 +127,12 @@ div.comment { color: #444; }
|
|||
div#body_div {
|
||||
display: none;
|
||||
padding-right: 7px;
|
||||
width: 900px;
|
||||
margin: auto;
|
||||
margin-top: 56px;
|
||||
padding-top: 70px;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: auto;
|
||||
width: 900px;
|
||||
}
|
||||
|
||||
|
|
@ -144,23 +143,19 @@ div#body_div {
|
|||
transition: background 1s ease-in;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 900px;
|
||||
margin: auto;
|
||||
}
|
||||
header .container {
|
||||
width: 900px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
div#body_div, header .container, .content, #opened-page-selector, footer {
|
||||
header .container, .content {
|
||||
width: 900px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
div#body_div, header .container, .content, #opened-page-selector, footer {
|
||||
header .container, .content {
|
||||
width: 1100px;
|
||||
}
|
||||
}
|
||||
|
|
@ -211,7 +206,6 @@ div.std-footer-item {
|
|||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 30px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ LocalDB.sync = function(list) {
|
|||
|
||||
if(d.localname) {
|
||||
wn.model.new_names[d.localname] = d.name;
|
||||
console.log(d.localname);
|
||||
$(document).trigger('rename', [d.doctype, d.localname, d.name]);
|
||||
delete locals[d.doctype][d.localname];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ _f.Frm = function(doctype, parent) {
|
|||
// notify on rename
|
||||
var me = this;
|
||||
$(document).bind('rename', function(event, dt, old_name, new_name) {
|
||||
console.log(arguments)
|
||||
if(dt==me.doctype)
|
||||
me.rename_notify(dt, old_name, new_name)
|
||||
});
|
||||
|
|
@ -238,16 +239,16 @@ _f.Frm.prototype.email_doc = function() {
|
|||
// ======================================================================================
|
||||
|
||||
_f.Frm.prototype.rename_notify = function(dt, old, name) {
|
||||
// editable
|
||||
this.is_editable[name] = this.is_editable[old];
|
||||
delete this.is_editable[old];
|
||||
|
||||
// from form
|
||||
if(this.docname == old)
|
||||
this.docname = name;
|
||||
else
|
||||
return; // thats it, not for children!
|
||||
|
||||
// editable
|
||||
this.is_editable[name] = this.is_editable[old];
|
||||
delete this.is_editable[old];
|
||||
|
||||
// cleanup
|
||||
if(this && this.opendocs[old]) {
|
||||
// local doctype copy
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ def get_comments(doctype=None, docname=None, limit=5):
|
|||
|
||||
webnotes.response['n_comments'], webnotes.response['comment_list'] = nc, cl
|
||||
|
||||
@webnotes.whitelist()
|
||||
@webnotes.whitelist(allow_guest=True)
|
||||
def add_comment():
|
||||
"""add a new comment"""
|
||||
import time
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue