[c_selection.js] If safari_mobile, get current selection from a previously created global variable
[c_sync.js] ref where the safari_mobile global is used
[c_text_view_comments.js] if safari_mobile update selection also on selectionChange event
[text_view_comments.html] if safari_mobile store a clone of the current selection on each selectionChange
set layout width to 99% to improve display
factorize safari mobile detection code
from django.core.urlresolvers import reverse
from django.conf import settings
def embed_html(text_key, attrs='', version_key=None, query_string="") :
if version_key :
url = reverse('text-view-comments-frame-version', args=[text_key, version_key])
else :
url = reverse('text-view-comments-frame', args=[text_key])
url += '?' + query_string
embed_code = '<iframe %s frameborder="0" src="%s%s" style="height: 600px; width: 99.9%%; position: relative; top: 0px;"></iframe>'%(attrs, settings.SITE_URL, url)
return embed_code