Commits

Luke Plant committed 30412dd

Some fixes needed due to CMS upgrade

Comments (0)

Files changed (2)

christchurch/static/christchurch/css/style.css

     padding-top: 0;
 }
 
-img.right {
+img.right, .align-right img {
     float: right;
     margin-left: 5px;
     margin-bottom: 5px;
 }
 
-img.left {
+img.left, .align-left img {
     float: left;
     margin-right: 5px;
     margin-bottom: 5px;

christchurch/templates/standard.html

       </div>
     </div>
   </div>
+{% addtoblock "js" %}
   <script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery.min.js"></script>
+{% endaddtoblock %}
+
+{% addtoblock "js" %}
+  <script type="text/javascript" src="{{ STATIC_URL }}christchurch/js/jquery.cycle.lite.js"></script>
+{% endaddtoblock %}
+
+{% addtoblock "js" %}
+  <script type="text/javascript">
+jQuery(document).ready(function(event) {
+
+    function getCookie(name) {
+        var cookieValue = null;
+        if (document.cookie && document.cookie != '') {
+            var cookies = document.cookie.split(';');
+            for (var i = 0; i < cookies.length; i++) {
+                var cookie = jQuery.trim(cookies[i]);
+                // Does this cookie string begin with the name we want?
+                if (cookie.substring(0, name.length + 1) == (name + '=')) {
+                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+                    break;
+                }
+            }
+        }
+        return cookieValue;
+    }
+
+    if ($('#photochanger').length > 0) {
+        function addImages() {
+            var list = getCookie('photocycler');
+            if (list == undefined) {
+                // maybe it didn't load yet
+                setTimeout(addImages, 1000);
+            } else {
+                list = list.split('|');
+                if (jQuery('#photochanger img').length == 1) {
+                    for (var i = 0; i < list.length; i++) {
+                        jQuery('#photochanger').append("<img src='/usermedia/photos/slideshow/" + list[i] +  "' width='450' height='200' alt='' />");
+                    }
+                }
+                jQuery('#photochanger').cycle({
+                    timeout: 4000,
+                    delay: -1000,
+                    sync: 0
+                });
+
+            }
+        }
+
+        addImages();
+    }
+});
+</script>
+{% endaddtoblock %}
+
   {% render_block "js" %}
 </body>
 </html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.