Merge branch '1310' of github.com:webnotes/wnframework

Conflicts:
	public/js/wn/misc/tools.js
	webnotes/__init__.py
	webnotes/auth.py
This commit is contained in:
Anand Doshi 2013-11-15 18:18:39 +05:30
commit 3a5ef9739e
2 changed files with 12 additions and 11 deletions

View file

@ -81,20 +81,22 @@ wn.ui.form.States = Class.extend({
var state_doc = wn.model.get("Workflow State", {name:state})[0];
// set the icon
this.workflow_button.find('i').removeClass()
.addClass("icon-white")
.addClass("icon-" + state_doc.icon);
if (state_doc) {
// set the icon
this.workflow_button.find('i').removeClass()
.addClass("icon-white")
.addClass("icon-" + state_doc.icon);
// set the style
this.workflow_button.removeClass().addClass("btn btn-default dropdown-toggle")
// set the style
this.workflow_button.removeClass().addClass("btn btn-default dropdown-toggle")
if(state_doc && state_doc.style)
this.workflow_button.addClass("btn-" + state_doc.style.toLowerCase());
}
if(state_doc && state_doc.style)
this.workflow_button.addClass("btn-" + state_doc.style.toLowerCase());
// show actions from that state
this.show_actions(state);
if(this.frm.doc.__islocal) {
this.workflow_button.prop('disabled', true);
}

View file

@ -113,7 +113,6 @@ class LoginManager:
webnotes._response.set_cookie("full_name", full_name)
webnotes._response.set_cookie("user_id", self.user)
def post_login(self):
self.run_trigger()
self.validate_ip_address()