update and debug
authorcavaliet
Fri, 07 Jun 2013 17:00:48 +0200
changeset 99 b701cc8df736
parent 98 aa57d0d436d6
child 100 2979ff5a8c25
update and debug
src/metadatacomposer/static/metadatacomposer/css/styles_player.css
src/metadatacomposer/static/metadatacomposer/js/metadataplayer-core.js
src/metadatacomposer/templates/metadatacomposer_project_list.html
src/metadatacomposer/templates/partial/library_image_list.html
src/metadatacomposer/templates/partial/metadatacomposer_partial_player.html
--- a/src/metadatacomposer/static/metadatacomposer/css/styles_player.css	Fri Jun 07 16:17:28 2013 +0200
+++ b/src/metadatacomposer/static/metadatacomposer/css/styles_player.css	Fri Jun 07 17:00:48 2013 +0200
@@ -287,10 +287,11 @@
 
 .annotation {
     left: 45px; top: 800px; right: 35px;
+    transition: top 0.8s; -webkit-transition: top 0.8s;
 }
 
 .annotation-main:after {
-    content: "."; visibility: hidden; display: block; height: 1px; clear: both;
+    content: "."; visibility: hidden; display: block; height: 0; line-height: 0; clear: both;
 }
 
 /* Narrow annotations */
@@ -348,23 +349,30 @@
 
 .text-contents {
     font-family: Georgia, 'Times New Roman', serif;
-    margin: 0 45px 35px;
+    margin: 0 45px 35px; font-size: 15px;
+    
+}
+
+.text-contents p, .text-contents ul, .text-contents ol {
+/*    column-break-inside:avoid; -moz-column-break-inside:avoid; -webkit-column-break-inside:avoid; */
+    margin-bottom: 10px;
+}
+
+.text-contents h2, .text-contents h3, .text-contents h4 {
+/*    text-align: center; */
+    font-family: 'Futura-Medium'; margin-bottom: 10px; line-height: 1.1em;
+}
+
+.text-contents img {
+    float: left; margin: 0 5px 2px 0;
+}
+/*
+.column-group {
     column-count: 2; column-gap: 60px;
     -moz-column-count: 2; -moz-column-gap: 60px;
     -webkit-column-count: 2; -webkit-column-gap: 60px;
 }
-
-.text-contents p, .text-contents ul, .text-contents ol {
-    column-break-inside:avoid; -moz-column-break-inside:avoid; -webkit-column-break-inside:avoid;
-    margin-bottom: 10px; font-size: 15px;
-}
-
-.text-contents h2, .text-contents h3, .text-contents h4 {
-    font-family: 'Futura-Medium'; margin-bottom: 10px; line-height: 1.1em;
-    column-break-after:avoid; -moz-column-break-after:avoid; -webkit-column-break-after:avoid;
-    column-break-inside:avoid; -moz-column-break-inside:avoid; -webkit-column-break-inside:avoid;
-}
-
+*/
 .text-contents h2 {
     font-size: 21px;
 }
@@ -419,7 +427,7 @@
 /* Audio annotation */
 
 .audio-annotation .media-description {
-    margin: 25px 0 0; font-size: 15px; font-weight: bold;
+    margin: 25px 0 0; font-size: 15px;
 }
 
 .audio-annotation .annotation-main {
--- a/src/metadatacomposer/static/metadatacomposer/js/metadataplayer-core.js	Fri Jun 07 16:17:28 2013 +0200
+++ b/src/metadatacomposer/static/metadatacomposer/js/metadataplayer-core.js	Fri Jun 07 17:00:48 2013 +0200
@@ -1180,10 +1180,7 @@
             return (_e.elementType === _listId);
         });
     } else {
-        if (typeof this.contents[_listId] === "undefined") {
-            this.contents[_listId] = new IriSP.List(this.directory);
-        }
-        return this.contents[_listId];
+        return this.contents[_listId] || new IriSP.List(this.directory);
     }
 };
 
--- a/src/metadatacomposer/templates/metadatacomposer_project_list.html	Fri Jun 07 16:17:28 2013 +0200
+++ b/src/metadatacomposer/templates/metadatacomposer_project_list.html	Fri Jun 07 17:00:48 2013 +0200
@@ -52,7 +52,7 @@
                                         <td><a class="btn btn-delete" data-title="{{ p.title }}" href="{% url 'composer_remove_project' branding=branding %}?ldt_id={{ p.ldt_id }}"><i class="icon-remove"></i></a></td>
                                     </tr>
                                     <tr>
-                                        <td><a class="btn" href="{% url 'composer_preview_player' branding=branding ldt_id=p.ldt_id %}" target="_blank"><i class="icon-eye-open"></i></a></td>
+                                        <td><a class="btn" href="{% url 'composer_preview_player' branding=branding ldt_id=p.ldt_id %}"><i class="icon-eye-open"></i></a></td>
                                         <td><a class="btn" href="{% url 'composer_duplicate_project' branding=branding %}?ldt_id={{ p.ldt_id }}"><i class="icon-copy"></i></a></td>
                                     </tr>
                                 </table>        
--- a/src/metadatacomposer/templates/partial/library_image_list.html	Fri Jun 07 16:17:28 2013 +0200
+++ b/src/metadatacomposer/templates/partial/library_image_list.html	Fri Jun 07 17:00:48 2013 +0200
@@ -6,7 +6,7 @@
         <div class="row">
           {% for i in image_results %}
             <div class="span2">
-                <a data-url="{% absurl 'composer_image' branding=branding image_pk=i.pk %}"
+                <a data-url="{% url 'composer_image' branding=branding image_pk=i.pk %}"
                    data-title="{{ i.title }}"
                    data-description="{{ i.description }}" href="#">
                    {% thumbnail i.image_file "140x140" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />{% empty %}<img src="{% static 'metadatacomposer/img/140x140.gif' %}" width="140px" height="140px" />{% endthumbnail %}
--- a/src/metadatacomposer/templates/partial/metadatacomposer_partial_player.html	Fri Jun 07 16:17:28 2013 +0200
+++ b/src/metadatacomposer/templates/partial/metadatacomposer_partial_player.html	Fri Jun 07 17:00:48 2013 +0200
@@ -92,12 +92,14 @@
                          
             </div>
         </div>
-        <script type="text/javascript">
-        var project_url = "{% absurl 'projectjson_id' id=ldt_id %}";
-        </script>
         <script type="text/javascript" src="{% static 'metadatacomposer/lib/jquery.min.js' %}"></script>
         <script type="text/javascript" src="{% static 'metadatacomposer/lib/jquery-ui.min.js' %}"></script>
         <script type="text/javascript" src="{% static 'metadatacomposer/lib/underscore-min.js' %}"></script>
         <script src="{% static 'metadatacomposer/js/metadataplayer-core.js' %}"></script>
         <script src="{% static 'metadatacomposer/js/ldt-serializer.js' %}"></script>
-        <script type="text/javascript" src="{% static 'metadatacomposer/js/player.js' %}"></script>
\ No newline at end of file
+        <script type="text/javascript" src="{% static 'metadatacomposer/js/player.js' %}"></script>
+        <script type="text/javascript">
+        $(function() {
+            IriSP.player("{% url 'projectjson_id' id=ldt_id %}");
+        });
+        </script>
\ No newline at end of file