/*global jQuery*/
/*global fluid*/
-/*global demo*/
+/*global atutor*/
-var demo = demo || {};
+var atutor = atutor || {};
(function (jQuery, fluid) {
var afterMoveListener = function (thePhotoThatMoved, position, allPhotos) {
// Loop through each item in the ordered list and update its hidden form field.
allPhotos.each(function (idx, photo) {
jQuery(photo).children("a").children("input").val(idx+1);
- });
+ });
//POST it back to the server
postOrder();
// Send it back to the server via an AJAX POST request.
jQuery.ajax({
type: "post",
- url: form.action,
+ url: form.attr('action'),
data: photoRequest,
complete: function (data, ajaxStatus) {
// Handle success or failure by being nice to the user.
});
};
-
- demo.formBasedImageReorderer = function () {
- var reorderer = fluid.reorderImages("#reorder-images-form", {
+
+ /**
+ * Which actually uses the Grid reorderer
+ */
+ atutor.formBasedImageReorderer = function () {
+ var reorderer = fluid.reorderGrid("#reorder-images-form", {
selectors: {
movables: ".photo_wrapper"
- },
- listeners: {
- afterMove: afterMoveListener
- }
- });
+ }
+ });
+ reorderer.events.afterMove.addListener(afterMoveListener);
};
-})(jQuery, fluid);
\ No newline at end of file
+})(jQuery, fluid);
+++ /dev/null
-/*
-Copyright 2008-2009 University of Cambridge
-Copyright 2008-2009 University of Toronto
-Copyright 2008-2009 University of California, Berkeley
-
-Licensed under the Educational Community License (ECL), Version 2.0 or the New
-BSD license. You may not use this file except in compliance with one these
-Licenses.
-
-You may obtain a copy of the ECL 2.0 License and BSD License at
-https://source.fluidproject.org/svn/LICENSE.txt
-*/
-
-/*global jQuery*/
-/*global fluid*/
-/*global demo*/
-
-var demo = demo || {};
-
-(function ($, fluid) {
- demo.initUploader = function () {
- fluid.progressiveEnhanceableUploader(".flc-uploader", ".fl-progEnhance-basic", {
- demo: true,
- uploadManager: {
- type: "fluid.swfUploadManager",
- options: {
- // Set the uploadURL to the URL for posting files to your server.
- uploadURL: "http://localhost/atutor155/atutor_163/mods/photo_album/albums.php",
-
- // This option points to the location of the SWFUpload Flash object that ships with Fluid Infusion.
- flashURL: "../../jscript/infusion/lib/swfupload/flash/swfupload.swf"
- }
- },
- decorators: [{
- type: "fluid.swfUploadSetupDecorator",
- options: {
- // This option points to the location of the Browse Files button used with Flash 10 clients.
- flashButtonImageURL: "../../jscript/infusion/components/uploader/images/browse.png"
- }
- }]
- });
- }
-})(jQuery, fluid);
-
-
-
\ No newline at end of file
<div class="album_panel">
<?php if(!empty($this->photos)): ?>
<p><?php echo _AT('pa_organize_photo_blurb'); ?></p>
- <form action="<?php echo 'edit_photos.php?aid='.$this->album_info['id'].SEP.'org=1'; ?>" id="reorder-images-form" class="flc-imageReorderer fl-imageReorderer fl-reorderer-horizontalLayout" style="float:left;">
+ <form action="<?php echo AT_PA_BASENAME . 'edit_photos.php?aid='.$this->album_info['id'].SEP.'org=1'; ?>" id="reorder-images-form" class="fl-reorderer-horizontalLayout" style="float:left;">
<!-- loop through this -->
<?php foreach($this->photos as $key=>$photo):?>
<div class="photo_wrapper">
</div>
<script type="text/javascript">
- demo.formBasedImageReorderer();
+ atutor.formBasedImageReorderer();
</script>