@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json | |||||
from .exceptions import * | from .exceptions import * | ||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template | from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template | ||||
__version__ = '9.2.18' | |||||
__version__ = '9.2.19' | |||||
__title__ = "Frappe Framework" | __title__ = "Frappe Framework" | ||||
local = Local() | local = Local() | ||||
@@ -116,7 +116,8 @@ def add_to_deleted_document(doc): | |||||
doctype='Deleted Document', | doctype='Deleted Document', | ||||
deleted_doctype=doc.doctype, | deleted_doctype=doc.doctype, | ||||
deleted_name=doc.name, | deleted_name=doc.name, | ||||
data=doc.as_json() | |||||
data=doc.as_json(), | |||||
owner=frappe.session.user | |||||
)).db_insert() | )).db_insert() | ||||
def update_naming_series(doc): | def update_naming_series(doc): | ||||
@@ -363,7 +363,7 @@ frappe.views.ListSidebar = Class.extend({ | |||||
<a><i class="octicon octicon-x pull-right close" style="margin-top: 10px;"></i></a> | <a><i class="octicon octicon-x pull-right close" style="margin-top: 10px;"></i></a> | ||||
<h5>Go Premium</h5> | <h5>Go Premium</h5> | ||||
<p>Upgrade to a premium plan with more users, storage and priority support.</p> | <p>Upgrade to a premium plan with more users, storage and priority support.</p> | ||||
<button class="btn btn-sm btn-primary" style="margin-bottom: 10px;"> Renew / Upgrade </button> | |||||
<button class="btn btn-xs btn-default" style="margin-bottom: 10px;"> Renew / Upgrade </button> | |||||
</div>`).appendTo(upgrade_list); | </div>`).appendTo(upgrade_list); | ||||
upgrade_box.find('.btn-primary').on('click', () => { | upgrade_box.find('.btn-primary').on('click', () => { | ||||
@@ -12,8 +12,24 @@ frappe.ui.TagEditor = Class.extend({ | |||||
- docname | - docname | ||||
*/ | */ | ||||
$.extend(this, opts); | $.extend(this, opts); | ||||
this.setup_taggle(); | |||||
if (!this.user_tags) { | |||||
this.user_tags = ""; | |||||
} | |||||
this.initialized = true; | |||||
this.refresh(this.user_tags); | |||||
}, | |||||
setup_taggle: function() { | |||||
var me = this; | var me = this; | ||||
this.wrapper = $('<div class="tag-line" style="position: relative">').appendTo(this.parent) | |||||
// hidden form, does not have parent | |||||
if (!this.parent) { | |||||
return; | |||||
} | |||||
this.wrapper = $('<div class="tag-line" style="position: relative">').appendTo(this.parent); | |||||
if(!this.wrapper.length) return; | if(!this.wrapper.length) return; | ||||
var id = frappe.dom.set_unique_id(this.wrapper); | var id = frappe.dom.set_unique_id(this.wrapper); | ||||
this.taggle = new Taggle(id, { | this.taggle = new Taggle(id, { | ||||
@@ -48,12 +64,8 @@ frappe.ui.TagEditor = Class.extend({ | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
if (!this.user_tags) { | |||||
this.user_tags = ""; | |||||
} | |||||
this.initialized = true; | |||||
this.refresh(this.user_tags); | |||||
this.setup_awesomplete(); | this.setup_awesomplete(); | ||||
this.setup_complete = true; | |||||
}, | }, | ||||
setup_awesomplete: function() { | setup_awesomplete: function() { | ||||
var me = this; | var me = this; | ||||
@@ -100,8 +112,7 @@ frappe.ui.TagEditor = Class.extend({ | |||||
}, | }, | ||||
refresh: function(user_tags) { | refresh: function(user_tags) { | ||||
var me = this; | var me = this; | ||||
if(!me.initialized || me.refreshing) | |||||
return; | |||||
if (!this.initialized || !this.setup_complete || this.refreshing) return; | |||||
me.refreshing = true; | me.refreshing = true; | ||||
try { | try { | ||||