@@ -31,34 +31,39 @@ | |||
/*text-shadow: 1px 1px 3px rgba(0, 0, 0, 1), 0px 3px 15px rgba(0, 0, 0, 0.5);*/ | |||
} | |||
.circle { | |||
position: absolute; | |||
top: 0px; | |||
right: 15px; | |||
width: 10px; | |||
height: 10px; | |||
border-radius: 50%; | |||
-moz-border-radius: 50%; | |||
-webkit-border-radius: 50%; | |||
line-height: none; | |||
background: #FF5858; | |||
z-index: 5; | |||
} | |||
/*.circle-text { | |||
color: white; | |||
display: inline-block; | |||
min-width: 15px; | |||
}*/ | |||
@media (max-width: 768px) { | |||
.case-wrapper { | |||
margin: 9px; | |||
width: 70px; | |||
height: 80px; | |||
height: 90px; | |||
} | |||
.case-label { | |||
padding-top: 2px; | |||
font-size: 85%; | |||
} | |||
.circle { | |||
right: 3px; | |||
} | |||
} | |||
.circle { | |||
position: absolute; | |||
top: -10px; | |||
right: 5px; | |||
border-radius: 30px; | |||
-moz-border-radius: 30px; | |||
-webkit-border-radius: 30px; | |||
line-height: 15px; | |||
background: #FF5858; | |||
padding: 5px; | |||
z-index: 5; | |||
} | |||
.circle-text { | |||
color: white; | |||
display: inline-block; | |||
min-width: 15px; | |||
} | |||
@@ -196,7 +196,7 @@ frappe.desktop.show_pending_notifications = function() { | |||
var notifier = $("#module-count-" + frappe.get_module(module)._id); | |||
if(notifier.length) { | |||
notifier.toggle(sum ? true : false); | |||
notifier.find(".circle-text").html(sum || ""); | |||
// notifier.find(".circle-text").html(sum || ""); | |||
} | |||
} | |||
}); | |||
@@ -1,18 +1,22 @@ | |||
frappe.pages['modules_setup'].onload = function(wrapper) { | |||
frappe.ui.make_app_page({ | |||
var page = frappe.ui.make_app_page({ | |||
parent: wrapper, | |||
title: __('Show or Hide Modules'), | |||
single_column: true | |||
}); | |||
frappe.add_breadcrumbs("Setup"); | |||
wrapper.page.set_primary_action(__("Update"), function() { | |||
frappe.modules_setup.update(this); | |||
}) | |||
}); | |||
page.main.css({"padding":"15px"}); | |||
$('<div class="alert alert-info">' | |||
+__("Select modules to be shown (based on permission). If hidden, they will be hidden for all users.")+'</div>').appendTo($(wrapper).find(".layout-main")); | |||
$('<div id="modules-list">').appendTo($(wrapper).find(".layout-main")); | |||
$('<p>' | |||
+__("Select modules to be shown (based on permission). If hidden, they will be hidden for all users.")+'</p>').appendTo($(wrapper).find(".layout-main")); | |||
$('<div id="modules-list">').appendTo(page.main); | |||
frappe.modules_setup.refresh_page(); | |||
} | |||
@@ -27,8 +31,7 @@ frappe.modules_setup = { | |||
if(m!="Setup") { | |||
var row = $('<div class="list-group-item">\ | |||
<span class="check-area" style="margin-right: 10px;"></span> ' | |||
+frappe.ui.app_icon.get_html(m, true) | |||
+ " <span> " + __(m) +'</span></div>').appendTo("#modules-list"); | |||
+ " <span> " + __(m) +'</span></div>').appendTo("#modules-list"); | |||
var $chk = $("<input type='checkbox' data-module='"+m+"' style='margin-top: -2px'>") | |||
.appendTo(row.find(".check-area")); | |||
if(!frappe.boot.hidden_modules || frappe.boot.hidden_modules.indexOf(m)==-1) { | |||
@@ -1,12 +1,15 @@ | |||
frappe.pages['permission-manager'].onload = function(wrapper) { | |||
frappe.ui.make_app_page({ | |||
var page = frappe.ui.make_app_page({ | |||
parent: wrapper, | |||
title: __('Role Permissions Manager'), | |||
icon: "icon-lock", | |||
single_column: true | |||
}); | |||
$(wrapper).find(".layout-main").html("<div class='perm-engine' style='min-height: 200px;'></div>" | |||
+ permissions_help); | |||
frappe.add_breadcrumbs("Setup"); | |||
$("<div class='perm-engine' style='min-height: 200px; padding: 15px;'></div>").appendTo(page.main); | |||
$(frappe.render_template("permission_manager_help", {})).appendTo(page.main); | |||
wrapper.permission_engine = new frappe.PermissionEngine(wrapper); | |||
} | |||
@@ -102,7 +105,7 @@ frappe.PermissionEngine = Class.extend({ | |||
}); | |||
// show standard permissions | |||
var $d = $(d.wrapper).find(".frappe-confirm-message").append("<hr><h4>Standard Permissions</h4>"); | |||
var $d = $(d.wrapper).find(".frappe-confirm-message").append("<hr><h4>Standard Permissions:</h4><br>"); | |||
var $wrapper = $("<p></p>").appendTo($d); | |||
$.each(data.message, function(i, d) { | |||
d.rights = []; | |||
@@ -130,11 +133,11 @@ frappe.PermissionEngine = Class.extend({ | |||
refresh: function() { | |||
var me = this; | |||
if(!me.doctype_select) { | |||
this.body.html("<div class='alert alert-info'>" + __("Loading") + "...</div>"); | |||
this.body.html("<p class='text-muted'>" + __("Loading") + "...</div>"); | |||
return; | |||
} | |||
if(!me.get_doctype() && !me.get_role()) { | |||
this.body.html("<div class='alert alert-info'>"+__("Select Document Type or Role to start.")+"</div>"); | |||
this.body.html("<p class='text-muted'>"+__("Select Document Type or Role to start.")+"</div>"); | |||
return; | |||
} | |||
// get permissions | |||
@@ -155,8 +158,8 @@ frappe.PermissionEngine = Class.extend({ | |||
this.body.empty(); | |||
this.perm_list = perm_list || []; | |||
if(!this.perm_list.length) { | |||
this.body.html("<div class='alert alert-warning'>" | |||
+__("No Permissions set for this criteria.")+"</div>"); | |||
this.body.html("<p class='text-muted'>" | |||
+__("No Permissions set for this criteria.")+"</p>"); | |||
} else { | |||
this.show_permission_table(this.perm_list); | |||
} | |||
@@ -242,8 +245,8 @@ frappe.PermissionEngine = Class.extend({ | |||
setup_user_permissions: function(d, role_cell) { | |||
var me = this; | |||
d.help = frappe.render('<ul class="user-permission-help small hidden" style="margin-left: -10px;">\ | |||
<li style="margin-top: 7px;"><a class="show-user-permission-doctypes">{%= __("Select Document Types") %}</a></li>\ | |||
<li style="margin-top: 3px;"><a class="show-user-permissions">{%= __("Show User Permissions") %}</a></li>\ | |||
<li style="margin-top: 7px;"><a class="show-user-permission-doctypes grey">{%= __("Select Document Types") %}</a></li>\ | |||
<li style="margin-top: 3px;"><a class="show-user-permissions grey">{%= __("Show User Permissions") %}</a></li>\ | |||
</ul>', {}); | |||
var checkbox = this.add_check(role_cell, d, "apply_user_permissions") | |||
@@ -270,7 +273,7 @@ frappe.PermissionEngine = Class.extend({ | |||
"print", "email", "report", "import", "export", "set_user_permissions"], | |||
set_show_users: function(cell, role) { | |||
cell.html("<a href='#'>"+__(role)+"</a>") | |||
cell.html("<a class='grey' href='#'>"+__(role)+"</a>") | |||
.find("a") | |||
.attr("data-role", role) | |||
.click(function() { | |||
@@ -295,7 +298,7 @@ frappe.PermissionEngine = Class.extend({ | |||
}, | |||
add_delete_button: function(row, d) { | |||
var me = this; | |||
$("<button class='btn btn-default btn-small'><i class='icon-remove'></i></button>") | |||
$("<button class='btn btn-default btn-sm'><i class='icon-remove'></i></button>") | |||
.appendTo($("<td>").appendTo(row)) | |||
.attr("data-name", d.name) | |||
.attr("data-doctype", d.parent) | |||
@@ -352,7 +355,7 @@ frappe.PermissionEngine = Class.extend({ | |||
}, | |||
show_add_rule: function() { | |||
var me = this; | |||
$("<button class='btn btn-default btn-primary'><i class='icon-plus'></i> " | |||
$("<button class='btn btn-default btn-primary btn-sm'><i class='icon-plus'></i> " | |||
+__("Add A New Rule")+"</button>") | |||
.appendTo($("<p class='permission-toolbar'>").appendTo(this.body)) | |||
.click(function() { | |||
@@ -480,7 +483,7 @@ frappe.PermissionEngine = Class.extend({ | |||
make_reset_button: function() { | |||
var me = this; | |||
$('<button class="btn btn-default" style="margin-left: 10px;">\ | |||
$('<button class="btn btn-default btn-sm" style="margin-left: 10px;">\ | |||
<i class="icon-refresh"></i> ' + __("Restore Original Permissions") + '</button>') | |||
.appendTo(this.body.find(".permission-toolbar")) | |||
.on("click", function() { | |||
@@ -504,97 +507,4 @@ frappe.PermissionEngine = Class.extend({ | |||
return frappe.get_children("DocType", doctype, "fields", | |||
{fieldtype:"Link", options:["not in", ["User", '[Select]']]}); | |||
} | |||
}) | |||
var permissions_help = ['<table class="table table-bordered" style="background-color: #f9f9f9; margin-top: 30px;">', | |||
'<tr><td>', | |||
'<h4><i class="icon-question-sign"></i> ', | |||
__('Quick Help for Setting Permissions'), | |||
':</h4>', | |||
'<ol>', | |||
'<li>', | |||
__('Permissions are set on Roles and Document Types (called DocTypes) by setting rights like Read, Write, Create, Delete, Submit, Cancel, Amend, Report, Import, Export, Print, Email and Set User Permissions.'), | |||
'</li>', | |||
'<li>', | |||
__('Permissions get applied on Users based on what Roles they are assigned.'), | |||
'</li>', | |||
'<li>', | |||
__('Roles can be set for users from their User page.') | |||
+ ' (<a href="#List/User">' + __("Setup > User") + '</a>)', | |||
'</li>', | |||
'<li>', | |||
__('The system provides many pre-defined roles. You can add new roles to set finer permissions.') | |||
+ ' (<a href="#List/Role">' + __("Add a New Role") + '</a>)', | |||
'</li>', | |||
'<li>', | |||
__('Permissions are automatically translated to Standard Reports and Searches.'), | |||
'</li>', | |||
'<li>', | |||
__('As a best practice, do not assign the same set of permission rule to different Roles. Instead, set multiple Roles to the same User.'), | |||
'</li>', | |||
'</ol>', | |||
'</td></tr>', | |||
'<tr><td>', | |||
'<h4><i class="icon-hand-right"></i> ', | |||
__('Meaning of Submit, Cancel, Amend'), | |||
':</h4>', | |||
'<ol>', | |||
'<li>', | |||
__('Certain documents, like an Invoice, should not be changed once final. The final state for such documents is called Submitted. You can restrict which roles can Submit.'), | |||
'</li>', | |||
'<li>', | |||
__('You can change Submitted documents by cancelling them and then, amending them.'), | |||
'</li>', | |||
'<li>', | |||
__('When you Amend a document after Cancel and save it, it will get a new number that is a version of the old number.'), | |||
'</li>', | |||
'<li>', | |||
__("For example if you cancel and amend 'INV004' it will become a new document 'INV004-1'. This helps you to keep track of each amendment."), | |||
'</li>', | |||
'</ol>', | |||
'</td></tr>', | |||
'<tr><td>', | |||
'<h4><i class="icon-signal"></i> ', | |||
__('Permission Levels'), | |||
':</h4>', | |||
'<ol>', | |||
'<li>', | |||
__("Permissions at level 0 are 'Document Level' permissions, i.e. they are primary for access to the document."), | |||
'</li>', | |||
'<li>', | |||
__('If a Role does not have access at Level 0, then higher levels are meaningless.'), | |||
'</li>', | |||
'<li>', | |||
__("Permissions at higher levels are 'Field Level' permissions. All Fields have a 'Permission Level' set against them and the rules defined at that permissions apply to the field. This is useful in case you want to hide or make certain field read-only for certain Roles."), | |||
'</li>', | |||
'<li>', | |||
__('You can use Customize Form to set levels on fields.') | |||
+ ' (<a href="#Form/Customize Form">Setup > Customize Form</a>)', | |||
'</li>', | |||
'</ol>', | |||
'</td></tr>', | |||
'<tr><td>', | |||
'<h4><i class="icon-shield"></i> ', | |||
__('User Permissions'), | |||
':</h4>', | |||
'<ol>', | |||
'<li>', | |||
__("To give acess to a role for only specific records, check the 'Apply User Permissions'. User Permissions are used to limit users with such role to specific records.") | |||
+ ' (<a href="#user-permissions">' + __('Setup > User Permissions Manager') + '</a>)', | |||
'</li>', | |||
'<li>', | |||
__("Select Document Types to set which User Permissions are used to limit access."), | |||
'</li>', | |||
'<li>', | |||
__("Once you have set this, the users will only be able access documents (eg. Blog Post) where the link exists (eg. Blogger)."), | |||
'</li>', | |||
'<li>', | |||
__("Apart from System Manager, roles with 'Set User Permissions' right can set permissions for other users for that Document Type."), | |||
'</li>', | |||
'</ol>', | |||
'</td></tr>', | |||
'</table>', | |||
'<p>', | |||
__("If these instructions where not helpful, please add in your suggestions on GitHub Issues.") | |||
+ ' (<a href="https://github.com/frappe/frappe/issues" target="_blank">' + __("Submit an Issue") + '</a>)', | |||
'</p>'].join("\n"); | |||
}); |
@@ -0,0 +1,41 @@ | |||
<hr> | |||
<div style="padding: 0px 15px;"> | |||
<h4>{%= __("Quick Help for Setting Permissions") %}:</h4> | |||
<ol> | |||
<li>{%= __("Permissions are set on Roles and Document Types (called DocTypes) by setting rights like Read, Write, Create, Delete, Submit, Cancel, Amend, Report, Import, Export, Print, Email and Set User Permissions.") %}</li> | |||
<li>{%= __("Permissions get applied on Users based on what Roles they are assigned.") %}</li> | |||
<li>{%= __("Roles can be set for users from their User page.") %} | |||
<a href="#List/User">{%= __("Setup > User") %}</a></li> | |||
<li>{%= __("The system provides many pre-defined roles. You can add new roles to set finer permissions.") %}<a href="#List/Role"> {%= __("Add a New Role") %}</a></li> | |||
<li>{%= __("Permissions are automatically translated to Standard Reports and Searches.") %}</li> | |||
<li>{%= __("As a best practice, do not assign the same set of permission rule to different Roles. Instead, set multiple Roles to the same User.") %}</li> | |||
</ol> | |||
<hr> | |||
<h4>{%= __("Meaning of Submit, Cancel, Amend") %}:</h4> | |||
<ol> | |||
<li>{%= __("Certain documents, like an Invoice, should not be changed once final. The final state for such documents is called Submitted. You can restrict which roles can Submit.") %}</li> | |||
<li>{%= __("You can change Submitted documents by cancelling them and then, amending them.") %}</li> | |||
<li>{%= __("When you Amend a document after Cancel and save it, it will get a new number that is a version of the old number.") %}</li> | |||
<li>{%= __("For example if you cancel and amend INV004 it will become a new document INV004-1. This helps you to keep track of each amendment.") %}</li> | |||
</ol> | |||
<hr> | |||
<h4>{%= __("Permission Levels") %}:</h4> | |||
<ol> | |||
<li>{%= __("Permissions at level 0 are Document Level permissions, i.e. they are primary for access to the document.") %}</li> | |||
<li>{%= __("If a Role does not have access at Level 0, then higher levels are meaningless.") %}</li> | |||
<li>{%= __("Permissions at higher levels are Field Level permissions. All Fields have a Permission Level set against them and the rules defined at that permissions apply to the field. This is useful in case you want to hide or make certain field read-only for certain Roles.") %}</li> | |||
<li>{%= __("You can use Customize Form to set levels on fields.") %} <a href="#Form/Customize Form">Setup > Customize Form</a></li> | |||
</ol> | |||
<hr> | |||
<h4>{%= __("User Permissions") %}:</h4> | |||
<ol> | |||
<li>{%= __("To give acess to a role for only specific records, check the Apply User Permissions. User Permissions are used to limit users with such role to specific records.") %} | |||
<a href="#user-permissions">{%= __("Setup > User Permissions Manager") %}</a></li> | |||
<li>{%= __("Select Document Types to set which User Permissions are used to limit access.") %}</li> | |||
<li>{%= __("Once you have set this, the users will only be able access documents (eg. Blog Post) where the link exists (eg. Blogger).") %}</li> | |||
<li>{%= __("Apart from System Manager, roles with Set User Permissions right can set permissions for other users for that Document Type.") %}</li> | |||
</ol> | |||
<p>{%= __("If these instructions where not helpful, please add in your suggestions on GitHub Issues.") %} | |||
<a href="https://github.com/frappe/frappe/issues" target="_blank">{%= __("Submit an Issue") %}</a> | |||
</p> | |||
</div> |
@@ -1,20 +1,19 @@ | |||
frappe.pages['user-permissions'].onload = function(wrapper) { | |||
frappe.ui.make_app_page({ | |||
var page = frappe.ui.make_app_page({ | |||
parent: wrapper, | |||
title: __("User Permissions Manager"), | |||
icon: "icon-shield", | |||
single_column: true | |||
}); | |||
$(wrapper).find(".layout-main").html("<div class='user-settings' \ | |||
style='min-height: 200px;'></div>\ | |||
<p style='margin-top: 15px;'>\ | |||
<a class='view-role-permissions'><i class='icon-chevron-right'></i> " + __("Edit Role Permissions") + "</a>\ | |||
</p>\ | |||
<table class='table table-bordered' \ | |||
style='background-color: #f9f9f9; margin-top: 15px;'>\ | |||
<tr><td>\ | |||
<h4><i class='icon-question-sign'></i> "+__("Quick Help for User Permissions")+":</h4>\ | |||
frappe.add_breadcrumbs("Setup"); | |||
$("<div class='user-settings' \ | |||
style='min-height: 200px; padding: 15px;'></div>\ | |||
<p style='padding: 15px; padding-bottom: 0px;'>\ | |||
<a class='view-role-permissions grey'>" + __("Edit Role Permissions") + "</a>\ | |||
</p><hr><div style='padding: 0px 15px;'>\ | |||
<h4>"+__("Help for User Permissions")+":</h4>\ | |||
<ol>\ | |||
<li>" | |||
+ __("Apart from Role based Permission Rules, you can apply User Permissions based on DocTypes.") | |||
@@ -31,9 +30,7 @@ frappe.pages['user-permissions'].onload = function(wrapper) { | |||
+ "<li>" | |||
+ __("A user can be permitted to multiple records of the same DocType.") | |||
+ "</li>\ | |||
</ol>\ | |||
</tr></td>\ | |||
</table>"); | |||
</ol></div>").appendTo(page.main); | |||
wrapper.user_permissions = new frappe.UserPermissions(wrapper); | |||
} | |||
@@ -131,10 +128,10 @@ frappe.UserPermissions = Class.extend({ | |||
fields: [ | |||
{ | |||
fieldtype:"HTML", | |||
options: '<div class="alert alert-warning"><ol>'+ | |||
options: '<p class="text-muted"><ol>'+ | |||
"<li>"+__("Upload CSV file containing all user permissions in the same format as Download.")+"</li>"+ | |||
"<li><strong>"+__("Any existing permission will be deleted / overwritten.")+"</strong></li>"+ | |||
'</div>' | |||
'</p>' | |||
}, | |||
{ | |||
fieldtype:"Attach", fieldname:"attach", | |||
@@ -200,16 +197,16 @@ frappe.UserPermissions = Class.extend({ | |||
this.show_add_user_permission(); | |||
}, | |||
add_message: function(txt) { | |||
$('<div class="alert alert-info">' + txt + '</div>').appendTo(this.body); | |||
$('<p class="text-muted">' + txt + '</p>').appendTo(this.body); | |||
}, | |||
refresh: function() { | |||
var me = this; | |||
if(!me.filters.user) { | |||
this.body.html("<div class='alert alert-info'>"+__("Loading")+"...</div>"); | |||
this.body.html("<p class='text-muted'>"+__("Loading")+"...</p>"); | |||
return; | |||
} | |||
if(!me.get_user() && !me.get_doctype()) { | |||
this.body.html("<div class='alert alert-warning'>"+__("Select User or DocType to start.")+"</div>"); | |||
this.body.html("<p class='text-muted'>"+__("Select User or DocType to start.")+"</p>"); | |||
return; | |||
} | |||
// get permissions | |||
@@ -244,7 +241,7 @@ frappe.UserPermissions = Class.extend({ | |||
$.each(this.prop_list, function(i, d) { | |||
var row = $("<tr>").appendTo(me.table.find("tbody")); | |||
$("<td>").html('<a href="#Form/User/'+encodeURIComponent(d.parent)+'">' | |||
$("<td>").html('<a class="grey" href="#Form/User/'+encodeURIComponent(d.parent)+'">' | |||
+d.parent+'</a>').appendTo(row); | |||
$("<td>").html(d.defkey).appendTo(row); | |||
$("<td>").html(d.defvalue).appendTo(row); | |||
@@ -255,7 +252,7 @@ frappe.UserPermissions = Class.extend({ | |||
}, | |||
add_delete_button: function(row, d) { | |||
var me = this; | |||
$("<button class='btn btn-small btn-default'><i class='icon-remove'></i></button>") | |||
$("<button class='btn btn-sm btn-default'><i class='icon-remove'></i></button>") | |||
.appendTo($("<td>").appendTo(row)) | |||
.attr("data-name", d.name) | |||
.attr("data-user", d.parent) | |||
@@ -285,7 +282,7 @@ frappe.UserPermissions = Class.extend({ | |||
show_add_user_permission: function() { | |||
var me = this; | |||
$("<button class='btn btn-primary'>"+__("Add A User Permission")+"</button>") | |||
$("<button class='btn btn-default btn-sm'>"+__("Add A User Permission")+"</button>") | |||
.appendTo($("<p>").appendTo(this.body)) | |||
.click(function() { | |||
var d = new frappe.ui.Dialog({ | |||
@@ -53,12 +53,10 @@ def has_permission(doc, user): | |||
def update_feed(doc, method=None): | |||
"adds a new feed" | |||
if doc.doctype == "Feed": | |||
return | |||
if frappe.flags.in_patch or frappe.flags.in_install_app or frappe.flags.in_import: | |||
return | |||
if doc.doctype == "Feed": | |||
return | |||
if hasattr(doc, "get_feed"): | |||
feed = doc.get_feed() | |||
@@ -166,7 +166,7 @@ def delete_linked_todos(doc): | |||
def insert_feed(doc): | |||
from frappe.utils import get_fullname | |||
if frappe.flags.in_install_app: | |||
if frappe.flags.in_install_app or frappe.flags.in_import: | |||
return | |||
frappe.get_doc({ | |||
@@ -88,6 +88,7 @@ ignore_values = { | |||
ignore_doctypes = ["Page Role", "DocPerm"] | |||
def import_doc(docdict, force=False, data_import=False): | |||
frappe.flags.in_import = True | |||
docdict["__islocal"] = 1 | |||
doc = frappe.get_doc(docdict) | |||
@@ -118,3 +119,5 @@ def import_doc(docdict, force=False, data_import=False): | |||
doc.ignore_mandatory = True | |||
doc.ignore_user_permissions = True | |||
doc.insert() | |||
frappe.flags.in_import = False |
@@ -273,7 +273,7 @@ em.link-option { | |||
/* module */ | |||
.module-item { | |||
margin: 0px; | |||
padding: 15px 10px; | |||
padding: 5px 0px; | |||
border-bottom: 1px solid #d1d8dd; | |||
cursor: pointer; | |||
} | |||
@@ -584,7 +584,7 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlData.extend({ | |||
make_input: function() { | |||
var me = this; | |||
this.$input = $('<button class="btn btn-default btn-sm">') | |||
.html(__("Upload")) | |||
.html(__("Attach")) | |||
.prependTo(me.input_area) | |||
.on("click", function() { | |||
me.onclick(); | |||
@@ -42,7 +42,7 @@ frappe.ui.form.Dashboard = Class.extend({ | |||
var badge = $(repl('<div class="col-md-4">\ | |||
<div class="alert-badge">\ | |||
<a class="badge-link grey">%(label)s</a>\ | |||
<span class="badge pull-right">-</span>\ | |||
<span class="badge">-</span>\ | |||
</div></div>', {label:label, icon: frappe.boot.doctype_icons[doctype]})) | |||
.appendTo(this.body) | |||
@@ -2,6 +2,8 @@ | |||
<div class="toolbar"> | |||
<span class="panel-title"> | |||
{%= __("Editing Row") %} #<span class="grid-form-row-index"></span></span> | |||
<button class="btn btn-default btn-xs pull-right"style="margin-left: 7px;"> | |||
{%= __("Done") %}</button> | |||
<button class="btn btn-default btn-xs pull-right grid-insert-row" | |||
style="margin-left: 7px;"> | |||
{%= __("Insert Above") %}</button> | |||
@@ -144,7 +144,7 @@ frappe.search.verbs = [ | |||
frappe.search.find(frappe.boot.user.can_create, txt.substr(4), function(match) { | |||
return { | |||
value:__("New {0}", ["<b>"+match+"</b>"]), | |||
route:["Form", match, "New " + match] | |||
onclick: function() { new_doc(match); } | |||
} | |||
}); | |||
} | |||
@@ -11,7 +11,7 @@ | |||
{% } %} | |||
{% if (item.description) { %} | |||
</h4> | |||
<p class="text-muted">{%= item.description %}</p> | |||
<p class="text-muted small">{%= item.description %}</p> | |||
{% } else { %}</h5>{% } %} | |||
</div> | |||
<div class="col-md-3 text-muted text-right small" style="padding-top: 5px;"> | |||
@@ -1,29 +1,34 @@ | |||
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors | |||
// MIT License. See license.txt | |||
// MIT License. See license.txt | |||
function loadreport(dt, rep_name, onload) { | |||
if(rep_name) | |||
frappe.set_route('Report', dt, rep_name); | |||
else | |||
frappe.set_route('Report', dt); | |||
} | |||
} | |||
function loaddoc(doctype, name, onload) { | |||
frappe.model.with_doctype(doctype, function() { | |||
if(locals.DocType[doctype].in_dialog) { | |||
_f.edit_record(doctype, name); | |||
} else { | |||
frappe.set_route('Form', doctype, name); | |||
frappe.set_route('Form', doctype, name); | |||
} | |||
}) | |||
} | |||
var load_doc = loaddoc; | |||
frappe.create_routes = {}; | |||
function new_doc(doctype, in_form) { | |||
frappe.model.with_doctype(doctype, function() { | |||
var new_name = frappe.model.make_new_doc_and_get_name(doctype); | |||
frappe.set_route("Form", doctype, new_name); | |||
}) | |||
if(frappe.create_routes[doctype]) { | |||
frappe.set_route(frappe.create_routes[doctype]); | |||
} else { | |||
var new_name = frappe.model.make_new_doc_and_get_name(doctype); | |||
frappe.set_route("Form", doctype, new_name); | |||
} | |||
}); | |||
} | |||
var newdoc = new_doc; | |||
@@ -32,6 +37,6 @@ function loadpage(page_name, call_back, no_history) { | |||
frappe.set_route(page_name); | |||
} | |||
function loaddocbrowser(dt) { | |||
function loaddocbrowser(dt) { | |||
frappe.set_route('List', dt); | |||
} |
@@ -325,7 +325,7 @@ em.link-option { | |||
.module-item { | |||
margin: 0px; | |||
padding: 15px 10px; | |||
padding: 5px 0px; | |||
border-bottom: 1px solid @border-color; | |||
cursor: pointer; | |||
} | |||
@@ -8,10 +8,10 @@ | |||
border-bottom: 3px solid #aaa; | |||
} | |||
table.table-bordered { | |||
.print-format table.table-bordered { | |||
border-top: 3px solid #aaa; | |||
} | |||
th { | |||
.print-format th { | |||
background-color: #eee; | |||
} |
@@ -1,5 +1,5 @@ | |||
{ | |||
"creation": "2013-03-19 12:02:15", | |||
"creation": "2013-03-19 12:02:15", | |||
"description": "Settings for the About Us Page", | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
@@ -81,7 +81,7 @@ | |||
"icon": "icon-group", | |||
"idx": 1, | |||
"issingle": 1, | |||
"modified": "2014-05-28 17:14:48.015912", | |||
"modified": "2015-01-01 15:01:14.701018", | |||
"modified_by": "Administrator", | |||
"module": "Website", | |||
"name": "About Us Settings", | |||
@@ -1,5 +1,5 @@ | |||
{ | |||
"creation": "2013-04-30 12:58:46", | |||
"creation": "2013-04-30 12:58:46", | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Other", | |||
@@ -21,7 +21,7 @@ | |||
"reqd": 0 | |||
}, | |||
{ | |||
"description": "The name of your company / website as you want to appear on browser title bar. All pages will have this as the prefix to the title.", | |||
"description": "", | |||
"fieldname": "title_prefix", | |||
"fieldtype": "Data", | |||
"in_list_view": 1, | |||
@@ -226,7 +226,7 @@ | |||
"idx": 1, | |||
"issingle": 1, | |||
"max_attachments": 10, | |||
"modified": "2014-08-20 12:55:53.402229", | |||
"modified": "2015-01-01 14:30:06.250845", | |||
"modified_by": "Administrator", | |||
"module": "Website", | |||
"name": "Website Settings", | |||