Compare commits
3 commits
17d3114102
...
f818f962bc
| Author | SHA1 | Date | |
|---|---|---|---|
| f818f962bc | |||
| d07a60ba5f | |||
| 22cd1d358d |
3 changed files with 16 additions and 8 deletions
|
|
@ -257,14 +257,21 @@ def update_static():
|
||||||
pandora_json = os.path.join(settings.STATIC_ROOT, 'json/pandora.json')
|
pandora_json = os.path.join(settings.STATIC_ROOT, 'json/pandora.json')
|
||||||
for root, folders, files in os.walk(os.path.join(settings.STATIC_ROOT, 'js')):
|
for root, folders, files in os.walk(os.path.join(settings.STATIC_ROOT, 'js')):
|
||||||
for f in files:
|
for f in files:
|
||||||
if not f in (
|
f = os.path.join(root, f)
|
||||||
'pandora.js', 'pandora.min.js'
|
#ignore old embed js file
|
||||||
) and f.endswith('.js') and len(f.split('.')) == 2:
|
if 'js/embed/' in f:
|
||||||
f = os.path.join(root, f)
|
continue
|
||||||
#ignore old embed js file
|
if len(f.split('.')) == 2:
|
||||||
if 'js/embed/' in f:
|
|
||||||
continue
|
|
||||||
fsite = f.replace('.js', '.%s.js' % settings.CONFIG['site']['id'])
|
fsite = f.replace('.js', '.%s.js' % settings.CONFIG['site']['id'])
|
||||||
|
else:
|
||||||
|
fsite = f
|
||||||
|
basefile = f.split('.')[0] + '.js'
|
||||||
|
if f not in (
|
||||||
|
'pandora.js', 'pandora.min.js'
|
||||||
|
) and f.endswith('.js') and (
|
||||||
|
len(f.split('.')) == 2 or
|
||||||
|
not os.path.exists(basefile) and fsite == f
|
||||||
|
):
|
||||||
if os.path.exists(fsite):
|
if os.path.exists(fsite):
|
||||||
f = fsite
|
f = fsite
|
||||||
js.append(f[len(settings.STATIC_ROOT)+1:])
|
js.append(f[len(settings.STATIC_ROOT)+1:])
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ class Edit(models.Model):
|
||||||
items = [i['id'] for i in self.get_items(user).values('id')]
|
items = [i['id'] for i in self.get_items(user).values('id')]
|
||||||
clips = clips.filter(item__in=items)
|
clips = clips.filter(item__in=items)
|
||||||
else:
|
else:
|
||||||
clips = None
|
clips = clip.models.Clip.objects.filter(id=None)
|
||||||
return clips
|
return clips
|
||||||
|
|
||||||
def get_clips_json(self, user=None):
|
def get_clips_json(self, user=None):
|
||||||
|
|
|
||||||
|
|
@ -475,6 +475,7 @@ appPanel
|
||||||
// allow site scripts to run after pandora is loaded
|
// allow site scripts to run after pandora is loaded
|
||||||
pandora.triggerEvent('loaded');
|
pandora.triggerEvent('loaded');
|
||||||
!pandora.isLicensed() && pandora.openLicenseDialog();
|
!pandora.isLicensed() && pandora.openLicenseDialog();
|
||||||
|
pandora.localInitInit && pandora.localInitInit();
|
||||||
loadUserScript && pandora.loadUserScript();
|
loadUserScript && pandora.loadUserScript();
|
||||||
document.removeEventListener && document.removeEventListener(
|
document.removeEventListener && document.removeEventListener(
|
||||||
'keydown', onKeydown
|
'keydown', onKeydown
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue