Merge branch 'responsive' of github.com:webnotes/wnframework into responsive

This commit is contained in:
Rushabh Mehta 2013-07-11 18:46:35 +05:30
commit ce2ed23742
4 changed files with 15 additions and 5 deletions

View file

@ -85,6 +85,15 @@ wn.RoleEditor = Class.extend({
show_roles: function() {
var me = this;
$(this.wrapper).empty();
var add_all_roles = $('<p><button class="btn btn-default">Add all roles</button></p>').appendTo($(this.wrapper));
add_all_roles.find("button").on("click", function() {
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
if(!$(check).is(":checked")) {
check.checked = true;
}
});
});
for(var i in this.roles) {
$(this.wrapper).append(repl('<div class="user-role" \
data-user-role="%(role)s">\
@ -98,7 +107,7 @@ wn.RoleEditor = Class.extend({
$(this.wrapper).find('.user-role a').click(function() {
me.show_permissions($(this).parent().attr('data-user-role'))
return false;
})
});
},
show: function() {
var me = this;

View file

@ -1,7 +1,8 @@
wn.pages['data-import-tool'].onload = function(wrapper) {
wrapper.app_page = wn.ui.make_app_page({
parent: wrapper,
title: "Data Import Tool"
title: "Data Import Tool",
icon: "data-import-tool"
});
$(wrapper).find('.layout-main-section').append('<h3>1. Download Template</h3>\

View file

@ -245,7 +245,7 @@ wn.ui.AppFrame = Class.extend({
},
add_label: function(label) {
this.show_toolbar();
return $("<label class='col-lg-1'>"+label+" </label>")
return $("<label class='col-lg-1' style='margin-top: 0.8%;'>"+label+" </label>")
.appendTo(this.toolbar);
},
add_select: function(label, options) {
@ -351,4 +351,5 @@ wn.ui.make_app_page = function(opts) {
if(opts.set_document_title!==undefined)
opts.parent.appframe.set_document_title = opts.set_document_title;
if(opts.title) opts.parent.appframe.set_title(opts.title);
if(opts.icon) opts.parent.appframe.add_module_icon(null, opts.icon);
}

View file

@ -60,7 +60,6 @@ def make_test_records_for_doctype(doctype, verbose=0):
elif hasattr(test_module, "test_records"):
webnotes.test_objects[doctype] += make_test_objects(doctype, test_module.test_records, verbose)
elif verbose:
print_mandatory_fields(doctype)
@ -130,7 +129,7 @@ def export_doc(doctype, docname):
def run_unittest(doctype, verbose=False):
module = webnotes.conn.get_value("DocType", doctype, "module")
test_module = get_module_name(doctype, module, "test_")
make_test_records(args.doctype[0], verbose=verbose)
make_test_records(doctype, verbose=verbose)
try:
exec ('from %s import *' % test_module) in globals()