summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/rearrange/controllers/rearrange.php47
-rw-r--r--modules/rearrange/css/rearrange.css81
-rw-r--r--modules/rearrange/helpers/rearrange_installer.php31
-rw-r--r--modules/rearrange/helpers/rearrange_theme.php30
-rw-r--r--modules/rearrange/images/Thumbs.dbbin18944 -> 0 bytes
-rw-r--r--modules/rearrange/images/bin_closed.pngbin363 -> 0 bytes
-rw-r--r--modules/rearrange/images/directory.pngbin537 -> 0 bytes
-rw-r--r--modules/rearrange/images/file.pngbin294 -> 0 bytes
-rw-r--r--modules/rearrange/images/folder_add.pngbin668 -> 0 bytes
-rw-r--r--modules/rearrange/images/folder_open.pngbin583 -> 0 bytes
-rw-r--r--modules/rearrange/images/picture.pngbin606 -> 0 bytes
-rw-r--r--modules/rearrange/images/spinner.gifbin1553 -> 0 bytes
-rw-r--r--modules/rearrange/js/jquery.gallery.rearrange.tree.js198
-rw-r--r--modules/rearrange/module.info3
-rw-r--r--modules/rearrange/views/rearrange.html.php19
-rw-r--r--modules/rearrange/views/rearrange_item_list.html.php14
16 files changed, 0 insertions, 423 deletions
diff --git a/modules/rearrange/controllers/rearrange.php b/modules/rearrange/controllers/rearrange.php
deleted file mode 100644
index 291315e4..00000000
--- a/modules/rearrange/controllers/rearrange.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.");
-/**
- * Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2008 Bharat Mediratta
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-class Rearrange_Controller extends Controller {
-
- public function show($id=null) {
- $view = new View("rearrange_item_list.html");
-
- $isRoot = empty($id);
- $item = ORM::factory("item", $isRoot ? 1 : $id);
-
- $view->children = $isRoot ? array($item) : $item->children();
-
- print $view;
- }
-
- public function move($source_id, $target_id) {
- $source = ORM_MPTT::factory("item", $source_id);
- $target = ORM_MPTT::factory("item", $target_id);
-
- try {
- $source->move_to($target);
- print "success";
- } catch (Exception $e) {
- Kohana::log("error", $e->getMessage() . "\n" + $e->getTraceAsString());
- header("HTTP/1.1 500");
- print $e->getMessage();
- }
- }
-
-} \ No newline at end of file
diff --git a/modules/rearrange/css/rearrange.css b/modules/rearrange/css/rearrange.css
deleted file mode 100644
index 65fff8b0..00000000
--- a/modules/rearrange/css/rearrange.css
+++ /dev/null
@@ -1,81 +0,0 @@
-@CHARSET "UTF-8";
-#gRearrange {
- font-family: Verdana, sans-serif;
- font-size: 11px;
-}
-
-#gAddAlbum {
- background-image: url(../images/folder_add.png);
- background-repeat: no-repeat;
- padding-left: 20px;
- padding-bottom: 5px;
- cursor: pointer;
-}
-
-#gAddAlbumPopup {
- display: none;
- position: absolute;
- border: 1px solid #6fa5fd;
- z-index: 2;
- background: #ffffff;
-}
-
-#gAddAlbumPopupClose {
- font-size:14px;
- line-height:14px;
- right:6px;
- top:4px;
- position:absolute;
- color:#6fa5fd;
- font-weight:700;
- display:block;
- cursor: pointer;
-}
-
-#gDeleteItem {
- background-image: url(../images/bin_closed.png);
- background-repeat: no-repeat;
- padding-left: 20px;
- padding-bottom: 5px;
-}
-
-UL.jqueryFileTree {
- font-family: Verdana, sans-serif;
- font-size: 11px;
- line-height: 18px;
- padding: 0px;
- margin: 0px;
-}
-
-UL.jqueryFileTree LI {
- list-style: none;
- padding: 0px;
- padding-left: 20px;
- margin: 0px;
- white-space: nowrap;
-}
-
-UL.jqueryFileTree A {
- color: #333;
- text-decoration: none;
- display: block;
- padding: 0px 2px;
-}
-
-UL.jqueryFileTree A:hover {
- background: #BDF;
-}
-
-/* Core Styles */
-.jqueryFileTree LI.directory { background: url(../images/directory.png) left top no-repeat; }
-.jqueryFileTree LI.expanded { background: url(../images/folder_open.png) left top no-repeat; }
-.jqueryFileTree LI.file { background: url(../images/file.png) left top no-repeat; }
-.jqueryFileTree LI.wait { background: url(../images/spinner.gif) left top no-repeat; }
-.jqueryFileTree LI.item { background: url(../images/picture.png) left top no-repeat; }
-
-/*
- * File Extensions Support
- * If we want to add differnt icons for different file extentions. then we just need to add
- * classes for each extension and then add this class to the end of the classes on the 'li' element
- * i.e. .jqueryFileTree LI.ext_fla { background: url(../images/flash.png) left top no-repeat; }
-*/
diff --git a/modules/rearrange/helpers/rearrange_installer.php b/modules/rearrange/helpers/rearrange_installer.php
deleted file mode 100644
index 46672007..00000000
--- a/modules/rearrange/helpers/rearrange_installer.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.");
-/**
- * Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2008 Bharat Mediratta
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-class rearrange_installer {
- static function install() {
- $version = module::get_version("rearrange");
- if ($version == 0) {
- module::set_version("rearrange", 1);
- }
- }
-
- static function uninstall() {
- module::delete("rearrange");
- }
-}
diff --git a/modules/rearrange/helpers/rearrange_theme.php b/modules/rearrange/helpers/rearrange_theme.php
deleted file mode 100644
index 832e7200..00000000
--- a/modules/rearrange/helpers/rearrange_theme.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.");
-/**
- * Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2008 Bharat Mediratta
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-class rearrange_theme_Core {
- static function head($theme) {
- $head[] = html::script("modules/rearrange/js/jquery.gallery.rearrange.tree.js");
-
- $url = url::file("modules/rearrange/css/rearrange.css");
- $head[] = "<link rel=\"stylesheet\" type=\"text/css\" href=\"$url\" " .
- "media=\"screen,print,projection\" />";
-
- return implode("\n", $head);
- }
-}
diff --git a/modules/rearrange/images/Thumbs.db b/modules/rearrange/images/Thumbs.db
deleted file mode 100644
index 27137dce..00000000
--- a/modules/rearrange/images/Thumbs.db
+++ /dev/null
Binary files differ
diff --git a/modules/rearrange/images/bin_closed.png b/modules/rearrange/images/bin_closed.png
deleted file mode 100644
index afe22ba9..00000000
--- a/modules/rearrange/images/bin_closed.png
+++ /dev/null
Binary files differ
diff --git a/modules/rearrange/images/directory.png b/modules/rearrange/images/directory.png
deleted file mode 100644
index 784e8fa4..00000000
--- a/modules/rearrange/images/directory.png
+++ /dev/null
Binary files differ
diff --git a/modules/rearrange/images/file.png b/modules/rearrange/images/file.png
deleted file mode 100644
index 8b8b1ca0..00000000
--- a/modules/rearrange/images/file.png
+++ /dev/null
Binary files differ
diff --git a/modules/rearrange/images/folder_add.png b/modules/rearrange/images/folder_add.png
deleted file mode 100644
index 529fe8fe..00000000
--- a/modules/rearrange/images/folder_add.png
+++ /dev/null
Binary files differ
diff --git a/modules/rearrange/images/folder_open.png b/modules/rearrange/images/folder_open.png
deleted file mode 100644
index 4e354835..00000000
--- a/modules/rearrange/images/folder_open.png
+++ /dev/null
Binary files differ
diff --git a/modules/rearrange/images/picture.png b/modules/rearrange/images/picture.png
deleted file mode 100644
index 4a158fef..00000000
--- a/modules/rearrange/images/picture.png
+++ /dev/null
Binary files differ
diff --git a/modules/rearrange/images/spinner.gif b/modules/rearrange/images/spinner.gif
deleted file mode 100644
index 085ccaec..00000000
--- a/modules/rearrange/images/spinner.gif
+++ /dev/null
Binary files differ
diff --git a/modules/rearrange/js/jquery.gallery.rearrange.tree.js b/modules/rearrange/js/jquery.gallery.rearrange.tree.js
deleted file mode 100644
index c423becd..00000000
--- a/modules/rearrange/js/jquery.gallery.rearrange.tree.js
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- * Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2008 Bharat Mediratta
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * This script is based on the
- * jQuery File Tree Plugin,
- * developed by Cory S.N. LaViska
- * A Beautiful Site (http://abeautifulsite.net/)
- * Originally released under a Creative Commons License and is copyrighted
- * (C)2008 by Cory S.N. LaViska.
- * For details, visit http://creativecommons.org/licenses/by/3.0/us/
- *
- */
-if(jQuery) (function($){
-
- $.extend($.fn, {
-
- RearrangeTree: function(o, h) {
- // Defaults
- if( !o ) var o = {};
- if( o.script == undefined ) o.script = 'rearrange/show';
- if( o.folderEvent == undefined ) o.folderEvent = 'click';
- if( o.expandSpeed == undefined ) o.expandSpeed= 500;
- if( o.collapseSpeed == undefined ) o.collapseSpeed= 500;
- if( o.expandEasing == undefined ) o.expandEasing = null;
- if( o.collapseEasing == undefined ) o.collapseEasing = null;
- if( o.multiFolder == undefined ) o.multiFolder = true;
- if( o.loadMessage == undefined ) o.loadMessage = 'Loading...';
-
- function showTree(c, t) {
- $(c).addClass('wait');
- $(".jqueryFileTree.start").remove();
- $.get(o.script + "/" + t, {}, function(data) {
- $(c).find('.start').html('');
- $(c).removeClass('wait').append(data);
- $(c).find('UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
- $(c).find('UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
- $(c).find('li.directory').droppable({
- accept: "#gAddAlbum",
- drop: function(ev, ui) {
- addAlbum(ui.element);
- }
- });
- if ($(c).hasClass('treeitem')) {
- $(c).find("li", this.element).draggable({
- helper: 'clone',
- containment: "#gRearrange",
- opacity: .6,
- revert: "invalid"
- });
- }
-
- $(c).find('.directory').droppable({
- accept: "li",
- greedy: true,
- hoverClass: "droppable-hover",
- drop: function(ev, ui) {
- source_element = ui.draggable;
- source_parent = getParent(source_element);
- target = ui.element;
-
- $.ajax({
- url: "rearrange/move/" + source_element.attr("id") + "/" + target.attr("id"),
- success: function(data, textStatus) {
- collapse(source_parent);
- showTree(source_parent, source_parent.attr("id"));
- },
- error: function(xhr, textStatus, errorThrown) {
- alert("Http Error Code: " + xhr.status + "Text Status: " + textStatus);
- }
- });
- }
- });
- bindTree(c);
- });
- }
-
- function bindTree(t) {
- $(t).find('LI A').bind(o.folderEvent, function() {
- if( $(this).parent().hasClass('directory') ) {
- if( $(this).parent().hasClass('collapsed') ) {
- // Expand
- if( !o.multiFolder ) {
- $(this).parent().parent().find('UL').slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing });
- $(this).parent().parent().find('LI.directory').removeClass('expanded').addClass('collapsed');
- }
- $(this).parent().find('UL').remove(); // cleanup
- showTree( $(this).parent(), escape($(this).attr('rel')) );
- $(this).parent().removeClass('collapsed').addClass('expanded');
- } else {
- // Collapse
- collapse($(this).parent());
- }
- } else {
- h($(this).attr('rel'));
- }
- return false;
- });
- // Prevent A from triggering the # on non-click events
- if( o.folderEvent.toLowerCase != 'click' ) $(t).find('LI A').bind('click', function() { return false; });
- }
-
- function addAlbum(parent) {
- $("#gAddAlbumPopupClose").click(function() {
- $("#gAddAlbumPopup").css({"display": "none"});
- });
-
- $.get("form/add/albums/" + parent.attr("id"), {}, function(data) {
- $("#gAddAlbumArea").html(data);
- $("#gAddAlbumForm").ajaxForm({
- complete: function(xhr, statusText) {
- if (xhr.status == 200) {
- $("#gAddAlbumPopup").css({"display": "none"});
- collapse(parent);
- showTree(parent, parent.attr("id"));
- }
- }
- });
- $("#gAddAlbumPopup").css({
- "display": "block",
- "top": $("#gAddAlbum").offsetTop + $("#gAddAlbum").offsetHeight,
- "left":$("#gAddAlbum").offsetLeft
- });
- });
- }
-
- function collapse(parent) {
- parent.find('UL').slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing });
- parent.removeClass('expanded').addClass('collapsed');
- }
-
- function getParent(element) {
- parent = element.parent();
- while(parent != null) {
- if ($(parent).hasClass("treeitem")) {
- return parent;
- }
- parent = parent.parent();
- }
- return null;
- }
-
- $("#gAddAlbum").draggable({
- helper: 'clone',
- containment: "#gRearrange",
- opacity: .6,
- revert: "invalid"
- });
-
- $("#gDeleteItem").droppable({
- accept: "li",
- tolerance: "pointer",
- drop: function(ev, ui) {
- var element = ui.draggable;
- var parent = getParent(element);
-
- var id = element.attr("id");
- var anchor = $(element).find("a");
- if (confirm("Do you really want to delete " + $(element).find("a")[0].textContent)) {
- $.ajax({
- url: "items/" + id,
- success: function(data, textStatus) {
- collapse(parent);
- showTree(parent, parent.attr("id"));
- },
- error: function(xhr, textStatus, errorThrown) {
- alert("Http Error Code: " + xhr.status + "Text Status: " + textStatus);
- },
- type: "DELETE"
- });
- }
- }
- });
-
- $(this).each( function() {
- // Loading message
- $(this).html('<ul class="jqueryFileTree start"><li class="wait">' + o.loadMessage + '<li></ul>');
- // Get the initial file list
- showTree( $(this), "" );
- });
- }
- });
-
-})(jQuery); \ No newline at end of file
diff --git a/modules/rearrange/module.info b/modules/rearrange/module.info
deleted file mode 100644
index 67c626b5..00000000
--- a/modules/rearrange/module.info
+++ /dev/null
@@ -1,3 +0,0 @@
-name = Rearrange
-description = Allows users to rearrange photos and albums in their Gallery
-version = 1
diff --git a/modules/rearrange/views/rearrange.html.php b/modules/rearrange/views/rearrange.html.php
deleted file mode 100644
index 29a7cb77..00000000
--- a/modules/rearrange/views/rearrange.html.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.") ?>
-<script type="text/javascript">
- $(document).ready( function() {
- $('#gRearrangeTree').RearrangeTree({
- script: "<?= url::base(true) . "rearrange/show" ?>"
- }, function(file) {});
- });
-</script>
-<div id="gRearrange">
- <span id="gAddAlbum" rel="gAddAlbum">New Album</span>
- <div id="gAddAlbumPopup">
- <a id="gAddAlbumPopupClose">x</a>
- <div id="gAddAlbumArea"></div>
- </div>
- &nbsp;
- <span id="gDeleteItem">Delete</span>
- <hr/>
- <div id="gRearrangeTree"></div>
-</div>
diff --git a/modules/rearrange/views/rearrange_item_list.html.php b/modules/rearrange/views/rearrange_item_list.html.php
deleted file mode 100644
index 31f3e80f..00000000
--- a/modules/rearrange/views/rearrange_item_list.html.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.") ?>
-<ul class="jqueryFileTree" style="display: none">
- <? foreach ($children as $item): ?>
- <? if ($item->type == "album"): ?>
- <li class="directory collapsed treeitem" id="<?= $item->id?>">
- <a href="#" rel="<?= $item->id?>"><?= $item->title?></a>
- </li>
- <? else: ?>
- <li class="file item treeitem" id="<?= $item->id?>">
- <a href="#" rel="<?= $item->id?>"><?= $item->title?></a>
- </li>
- <? endif ?>
- <? endforeach ?>
-</ul>