Skip to content

Commit

Permalink
Fix #458 - Fixed error on exe_do export
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelMayoSdweb committed Nov 13, 2019
1 parent 025e258 commit d2d8918
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions exe/webui/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,12 @@ def ideviceHeader(e, style, mode):
w2 = ''
eEm = ''

if ((e.idevice.emphasis > 0) and (G.application.ideviceStore.isJs(e.idevice) == False)) or (
((e.idevice.title != "") or (e.idevice.icon != "")) and (G.application.ideviceStore.isJs(e.idevice) == True)) :

if (((e.idevice.emphasis > 0) and
(G.application.ideviceStore and G.application.ideviceStore.isJs(e.idevice) == False))
or (
((e.idevice.title != "") or (e.idevice.icon != "")) and
(G.application.ideviceStore and G.application.ideviceStore.isJs(e.idevice) == True))) :

w2 = '<div class="iDevice_inner">'+lb
w2 += '<div class="iDevice_content_wrapper">'+lb
Expand Down Expand Up @@ -564,8 +568,11 @@ def ideviceFooter(e, style, mode):
themeHasXML = themeHasConfigXML(style)
h = ''

if ((e.idevice.emphasis > 0) and (G.application.ideviceStore.isJs(e.idevice) == False)) or (
((e.idevice.title != "") or (e.idevice.icon != "")) and (G.application.ideviceStore.isJs(e.idevice) == True)) :
if (((e.idevice.emphasis > 0) and
(G.application.ideviceStore and G.application.ideviceStore.isJs(e.idevice) == False))
or (
((e.idevice.title != "") or (e.idevice.icon != "")) and
(G.application.ideviceStore and G.application.ideviceStore.isJs(e.idevice) == True))) :

h = "</div>"+lb # Close iDevice_content_wrapper
h += "</div>"+lb # Close iDevice_inner
Expand Down Expand Up @@ -740,14 +747,14 @@ def textArea(name, value="", disabled="", cols="80", rows="8", cssClass="", pack
if (cssClass=="jsContentEditor"):
if safe_value != value:
value = safe_value
log.debug(u"jsContentEditor pre-processed value to: %s" % value)
log.debug(u"jsContentEditor pre-processed value to: %s" % value)
html += value
html += u'</textarea>'

html_js = ''
# There's probably an editor in the JavaScript iDevice, so we add the nodes list (tinymce_anchors)
if (cssClass=="jsContentEditor"):
html_js = '<script type="text/javascript">if (typeof(tinymce_anchors)=="undefined") var tinymce_anchors = [];'
html_js = '<script type="text/javascript">if (typeof(tinymce_anchors)=="undefined") var tinymce_anchors = [];'
########
# add exe_tmp_anchor tags
# for ALL anchors available in the entire doc!
Expand Down Expand Up @@ -784,7 +791,7 @@ def textArea(name, value="", disabled="", cols="80", rows="8", cssClass="", pack
# FieldWithResources' ProcessPreviewed()
########
html_js += '</script>'

return html + html_js


Expand Down

0 comments on commit d2d8918

Please sign in to comment.