Skip to content

Commit

Permalink
Revert "Added a build version"
Browse files Browse the repository at this point in the history
This reverts commit 842fd2c.
  • Loading branch information
bharat committed Jun 20, 2010
1 parent 842fd2c commit 5173395
Show file tree
Hide file tree
Showing 151 changed files with 229 additions and 22,657 deletions.
19 changes: 0 additions & 19 deletions modules/gwtorganise/.externalToolBuilders/New_Builder.launch

This file was deleted.

10 changes: 0 additions & 10 deletions modules/gwtorganise/.project
Expand Up @@ -30,16 +30,6 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/New_Builder.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
Expand Down
@@ -1,4 +1,4 @@
#Fri Mar 26 11:43:34 NZDT 2010
#Thu Feb 11 15:27:06 NZDT 2010
eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=gwt-servlet.jar
Expand Down
21 changes: 0 additions & 21 deletions modules/gwtorganise/build.xml

This file was deleted.

74 changes: 7 additions & 67 deletions modules/gwtorganise/controllers/json_album.php
Expand Up @@ -73,21 +73,13 @@ function move_to($target_album_id) {
access::verify_csrf();

$target_album = ORM::factory("item", $target_album_id);
access::required("view", $target_album);
access::required("add", $target_album);

$source_album = null;

$js = json_decode($_REQUEST["sourceids"]);

$i = 0;
$source_album = null;
foreach ($js as $source_id) {
$source = ORM::factory("item", $source_id);
if (empty($source_album)) { // get the source_album
$source_album = $source->parent();
}
if (!$source->contains($target_album)) {
access::required("edit", $source);
item::move($source, $target_album);
}
$i++;
Expand Down Expand Up @@ -234,7 +226,12 @@ public function make_album_cover($id) {
print json_encode(array("result" => "success"));
}

public function p_rotate($item, $dir){
public function rotate($id, $dir) {
access::verify_csrf();
$item = model_cache::get("item", $id);
access::required("view", $item);
access::required("edit", $item);

$degrees = 0;
switch($dir) {
case "ccw":
Expand Down Expand Up @@ -265,63 +262,6 @@ public function p_rotate($item, $dir){
}
}

return $item;
}

public function delete_many($id) {

access::verify_csrf();

$js = json_decode($_REQUEST["sourceids"]);

$i = 0;
$toreturn = array();
foreach ($js as $item_id) {
$item = ORM::factory("item", $item_id);
access::required("view", $item);
access::required("edit", $item);
if ($item->is_album()) {
$msg = t("Deleted album <b>%title</b>", array("title" => html::purify($item->title)));
} else {
$msg = t("Deleted photo <b>%title</b>", array("title" => html::purify($item->title)));
}
$parent = $item->parent();
$item->delete();
message::success($msg);
}

print json_encode(array("result" => "success"));

}

public function rotate_many($dir) {
access::verify_csrf();

$js = json_decode($_REQUEST["sourceids"]);

$i = 0;
$toreturn = array();
foreach ($js as $item_id) {
$item = ORM::factory("item", $item_id);
access::required("view", $item);
access::required("edit", $item);
$item = $this->p_rotate($item, $dir);
$toreturn[$item_id] = self::child_json_encode($item);
$i++;
}

print json_encode($toreturn);
}


public function rotate($id, $dir) {
access::verify_csrf();
$item = model_cache::get("item", $id);
access::required("view", $item);
access::required("edit", $item);

$item = $this->p_rotate($item, $dir);

print json_encode(self::child_json_encode($item));
}

Expand Down
9 changes: 0 additions & 9 deletions modules/gwtorganise/helpers/revision.php

This file was deleted.

Expand Up @@ -27,7 +27,6 @@
import com.google.gwt.user.client.ui.MenuItem;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.TreeItem;
import com.google.gwt.user.client.ui.Widget;

/**
* encapsulates an album
Expand Down Expand Up @@ -190,6 +189,7 @@ public void success(String aResult) {
popupMenuBar.addItem(addAlbum);
popupMenuBar.addItem(userPermissions);


popupMenuBar.setVisible(true);
popupPanel.add(popupMenuBar);

Expand Down
Expand Up @@ -28,7 +28,19 @@ public Widget getDropTarget() {

@Override
public void onDrop(DragContext context) {
m_Album.moveTo(Utils.extractIds(context));
JSONArray jsa = new JSONArray();

int i = 0;
for (Widget widget : context.selectedWidgets){
if (widget instanceof Item){
jsa.set(i, new JSONNumber(((Item)widget).getID()));
i++;
}
}
m_Album.moveTo(jsa);
// context.
// TODO Auto-generated method stub

}

@Override
Expand Down

This file was deleted.

29 changes: 3 additions & 26 deletions modules/gwtorganise/src/com/gloopics/g3viewer/client/G3Viewer.java
Expand Up @@ -17,8 +17,6 @@


import com.allen_sauer.gwt.dnd.client.PickupDragController;
import com.gloopics.g3viewer.client.ConfirmDialogBox.ConfirmCallBack;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.InputElement;
import com.google.gwt.dom.client.Style.Unit;
Expand Down Expand Up @@ -135,22 +133,11 @@ public void onClick(ClickEvent event) {
*/
public static final String ROTATE_URL = BASE_URL + "index.php/json_album/rotate/";

/**
* rotate url
*/
public static final String ROTATE_ALL_URL = BASE_URL + "index.php/json_album/rotate_many/";

/**
* Resize details URL
*/
public static final String RESIZE_DETAILS_URL = BASE_URL + "index.php/json_album/resize_config";

/**
* Resize details URL
*/
public static final String DELETE_ALL_URL = BASE_URL + "index.php/json_album/delete_many/";


/*
* tree
*/
Expand All @@ -171,11 +158,6 @@ public void onClick(ClickEvent event) {
*/
private final HttpDialogBox m_HttpDialogBox= new HttpDialogBox(this);

/**
* the only confirmation dialog box
*/
private final ConfirmDialogBox m_ConfirmDialogBox = new ConfirmDialogBox(this);

private class SimplePanelEx extends SimplePanel
{
public SimplePanelEx()
Expand Down Expand Up @@ -241,7 +223,7 @@ public void onBrowserEvent(Event event) {
/**
* the drag controller
*/
private final MyPickupDragController m_DragController;
private final PickupDragController m_DragController;

/**
* the upload control
Expand All @@ -253,7 +235,7 @@ public void onBrowserEvent(Event event) {
*/

public G3Viewer(){
m_DragController = new MyPickupDragController(RootPanel.get(),false);
m_DragController = new PickupDragController(RootPanel.get(),false);
m_DragController.setBehaviorMultipleSelection(true);
m_DragController.setBehaviorDragStartSensitivity(5);
m_DragController.setBehaviorDragProxy(true);
Expand Down Expand Up @@ -325,7 +307,7 @@ public static void displayError(String errorType, String errorMessage) {
/**
* returns the drag controller
*/
public MyPickupDragController getDragController(){
public PickupDragController getDragController(){
return m_DragController;
}

Expand All @@ -346,11 +328,6 @@ public void doDialog(String a_Url, HttpDialogHandler a_Handler)
m_HttpDialogBox.doDialog(BASE_URL + a_Url, a_Handler);
}

public void doConfirm(String a_Text, ConfirmCallBack a_Handler)
{
m_ConfirmDialogBox.doDialog(a_Text, a_Handler);
}

public void showImage(String a_Url)
{
m_ImageDialogBox.doDialog( a_Url);
Expand Down

0 comments on commit 5173395

Please sign in to comment.