diff --git a/pandora/app/config.py b/pandora/app/config.py index f1946942..e7b39884 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -257,21 +257,14 @@ def update_static(): 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 f in files: - f = os.path.join(root, f) - #ignore old embed js file - if 'js/embed/' in f: - continue - if len(f.split('.')) == 2: - fsite = f.replace('.js', '.%s.js' % settings.CONFIG['site']['id']) - else: - fsite = f - basefile = f.split('.')[0] + '.js' - if f not in ( + if not f in ( 'pandora.js', 'pandora.min.js' - ) and f.endswith('.js') and ( - len(f.split('.')) == 2 or - not os.path.exists(basefile) and fsite == f - ): + ) and f.endswith('.js') and len(f.split('.')) == 2: + f = os.path.join(root, f) + #ignore old embed js file + if 'js/embed/' in f: + continue + fsite = f.replace('.js', '.%s.js' % settings.CONFIG['site']['id']) if os.path.exists(fsite): f = fsite js.append(f[len(settings.STATIC_ROOT)+1:]) diff --git a/pandora/edit/models.py b/pandora/edit/models.py index 554ae068..69b7bb37 100644 --- a/pandora/edit/models.py +++ b/pandora/edit/models.py @@ -251,7 +251,7 @@ class Edit(models.Model): items = [i['id'] for i in self.get_items(user).values('id')] clips = clips.filter(item__in=items) else: - clips = clip.models.Clip.objects.filter(id=None) + clips = None return clips def get_clips_json(self, user=None): diff --git a/static/js/pandora.js b/static/js/pandora.js index 73a1c4da..c238563f 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -475,7 +475,6 @@ appPanel // allow site scripts to run after pandora is loaded pandora.triggerEvent('loaded'); !pandora.isLicensed() && pandora.openLicenseDialog(); - pandora.localInitInit && pandora.localInitInit(); loadUserScript && pandora.loadUserScript(); document.removeEventListener && document.removeEventListener( 'keydown', onKeydown