Added a build version
This commit is contained in:
parent
31d13b0799
commit
f10820ab49
19
modules/gwtorganise/.externalToolBuilders/New_Builder.launch
Normal file
19
modules/gwtorganise/.externalToolBuilders/New_Builder.launch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
|
||||||
|
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
|
<listEntry value="/gwtorganise/build.xml"/>
|
||||||
|
</listAttribute>
|
||||||
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
|
<listEntry value="1"/>
|
||||||
|
</listAttribute>
|
||||||
|
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
|
||||||
|
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="gwtorganise"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/gwtorganise/build.xml}"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
|
||||||
|
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/gwtorganise}"/>
|
||||||
|
</launchConfiguration>
|
@ -30,6 +30,16 @@
|
|||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
<dictionary>
|
||||||
|
<key>LaunchConfigHandle</key>
|
||||||
|
<value><project>/.externalToolBuilders/New_Builder.launch</value>
|
||||||
|
</dictionary>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#Wed Mar 17 15:58:06 NZDT 2010
|
#Fri Mar 26 11:43:34 NZDT 2010
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
entryPointModules=
|
entryPointModules=
|
||||||
filesCopiedToWebInfLib=gwt-servlet.jar
|
filesCopiedToWebInfLib=gwt-servlet.jar
|
||||||
|
21
modules/gwtorganise/build.xml
Normal file
21
modules/gwtorganise/build.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generate a java class with the current svn revision number -->
|
||||||
|
<project>
|
||||||
|
<echo>Generate build info class...</echo>
|
||||||
|
<tstamp>
|
||||||
|
<format property="TODAY" pattern="EEE, d-MMMM-yyyy HH:mm:ss z" locale="ENGLISH, GERMANY"/>
|
||||||
|
</tstamp>
|
||||||
|
<echo>Virtual PVT Cell Revision: ${svn.revision}</echo>
|
||||||
|
<echo>Time stamp ${TODAY}</echo>
|
||||||
|
<echo>Write build info to file ${basedir}\helpers\BuildInfo.java</echo>
|
||||||
|
<!-- the source code of the java class -->
|
||||||
|
<echo file="${basedir}\helpers\revision.php">
|
||||||
|
<?php defined("SYSPATH") or die("No direct script access.");
|
||||||
|
class revision_Core {
|
||||||
|
static function getTimeStamp(){
|
||||||
|
return "${TODAY}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</echo>
|
||||||
|
</project>
|
@ -73,13 +73,21 @@ class Json_Album_Controller extends Controller {
|
|||||||
access::verify_csrf();
|
access::verify_csrf();
|
||||||
|
|
||||||
$target_album = ORM::factory("item", $target_album_id);
|
$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"]);
|
$js = json_decode($_REQUEST["sourceids"]);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
$source_album = null;
|
||||||
foreach ($js as $source_id) {
|
foreach ($js as $source_id) {
|
||||||
$source = ORM::factory("item", $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)) {
|
if (!$source->contains($target_album)) {
|
||||||
|
access::required("edit", $source);
|
||||||
item::move($source, $target_album);
|
item::move($source, $target_album);
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
@ -226,12 +234,7 @@ class Json_Album_Controller extends Controller {
|
|||||||
print json_encode(array("result" => "success"));
|
print json_encode(array("result" => "success"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rotate($id, $dir) {
|
public function p_rotate($item, $dir){
|
||||||
access::verify_csrf();
|
|
||||||
$item = model_cache::get("item", $id);
|
|
||||||
access::required("view", $item);
|
|
||||||
access::required("edit", $item);
|
|
||||||
|
|
||||||
$degrees = 0;
|
$degrees = 0;
|
||||||
switch($dir) {
|
switch($dir) {
|
||||||
case "ccw":
|
case "ccw":
|
||||||
@ -262,6 +265,63 @@ class Json_Album_Controller extends Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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));
|
print json_encode(self::child_json_encode($item));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
9
modules/gwtorganise/helpers/revision.php
Normal file
9
modules/gwtorganise/helpers/revision.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
<?php defined("SYSPATH") or die("No direct script access.");
|
||||||
|
class revision_Core {
|
||||||
|
static function getTimeStamp(){
|
||||||
|
return "Fri, 16-April-2010 14:55:28 NZST";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -27,6 +27,7 @@ import com.google.gwt.user.client.ui.MenuBar;
|
|||||||
import com.google.gwt.user.client.ui.MenuItem;
|
import com.google.gwt.user.client.ui.MenuItem;
|
||||||
import com.google.gwt.user.client.ui.PopupPanel;
|
import com.google.gwt.user.client.ui.PopupPanel;
|
||||||
import com.google.gwt.user.client.ui.TreeItem;
|
import com.google.gwt.user.client.ui.TreeItem;
|
||||||
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* encapsulates an album
|
* encapsulates an album
|
||||||
|
@ -28,19 +28,7 @@ public class AlbumItemDropContainer implements DropController{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDrop(DragContext context) {
|
public void onDrop(DragContext context) {
|
||||||
JSONArray jsa = new JSONArray();
|
m_Album.moveTo(Utils.extractIds(context));
|
||||||
|
|
||||||
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
|
@Override
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
package com.gloopics.g3viewer.client;
|
||||||
|
|
||||||
|
import com.google.gwt.event.dom.client.ClickEvent;
|
||||||
|
import com.google.gwt.event.dom.client.ClickHandler;
|
||||||
|
import com.google.gwt.http.client.RequestBuilder;
|
||||||
|
import com.google.gwt.http.client.RequestException;
|
||||||
|
import com.google.gwt.user.client.ui.Button;
|
||||||
|
import com.google.gwt.user.client.ui.DialogBox;
|
||||||
|
import com.google.gwt.user.client.ui.DockPanel;
|
||||||
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
|
import com.google.gwt.user.client.ui.HTML;
|
||||||
|
|
||||||
|
|
||||||
|
public class ConfirmDialogBox extends DialogBox {
|
||||||
|
|
||||||
|
public ConfirmCallBack m_Callback;
|
||||||
|
private final HTML m_Dialog;
|
||||||
|
|
||||||
|
public interface ConfirmCallBack{
|
||||||
|
void ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConfirmDialogBox(G3Viewer a_Parent){
|
||||||
|
m_Dialog = new HTML("Empty");
|
||||||
|
initComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initComponents(){
|
||||||
|
setModal(true);
|
||||||
|
addStyleName("dialog");
|
||||||
|
setAnimationEnabled(true);
|
||||||
|
setText("Confirm");
|
||||||
|
|
||||||
|
Button close = new Button("Cancel", new ClickHandler() {
|
||||||
|
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
ConfirmDialogBox.this.hide();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Button ok = new Button("ok", new ClickHandler() {
|
||||||
|
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
if (m_Callback!=null)
|
||||||
|
{
|
||||||
|
m_Callback.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfirmDialogBox.this.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
FlowPanel fp = new FlowPanel();
|
||||||
|
fp.add(ok);
|
||||||
|
fp.add(close);
|
||||||
|
fp.addStyleName("dButtons");
|
||||||
|
DockPanel dp = new DockPanel();
|
||||||
|
dp.add(m_Dialog , DockPanel.CENTER);
|
||||||
|
dp.add(fp, DockPanel.SOUTH);
|
||||||
|
dp.addStyleName("dContents");
|
||||||
|
add(dp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void doDialog(String a_Message, ConfirmCallBack a_Callback){
|
||||||
|
m_Callback = a_Callback;
|
||||||
|
m_Dialog.setHTML(a_Message);
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -17,6 +17,7 @@ package com.gloopics.g3viewer.client;
|
|||||||
|
|
||||||
|
|
||||||
import com.allen_sauer.gwt.dnd.client.PickupDragController;
|
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.core.client.GWT;
|
||||||
import com.google.gwt.dom.client.Document;
|
import com.google.gwt.dom.client.Document;
|
||||||
import com.google.gwt.dom.client.InputElement;
|
import com.google.gwt.dom.client.InputElement;
|
||||||
@ -133,11 +134,22 @@ public class G3Viewer {
|
|||||||
*/
|
*/
|
||||||
public static final String ROTATE_URL = BASE_URL + "index.php/json_album/rotate/";
|
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
|
* Resize details URL
|
||||||
*/
|
*/
|
||||||
public static final String RESIZE_DETAILS_URL = BASE_URL + "index.php/json_album/resize_config";
|
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
|
* tree
|
||||||
*/
|
*/
|
||||||
@ -158,6 +170,11 @@ public class G3Viewer {
|
|||||||
*/
|
*/
|
||||||
private final HttpDialogBox m_HttpDialogBox= new HttpDialogBox(this);
|
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
|
private class SimplePanelEx extends SimplePanel
|
||||||
{
|
{
|
||||||
public SimplePanelEx()
|
public SimplePanelEx()
|
||||||
@ -223,7 +240,7 @@ public class G3Viewer {
|
|||||||
/**
|
/**
|
||||||
* the drag controller
|
* the drag controller
|
||||||
*/
|
*/
|
||||||
private final PickupDragController m_DragController;
|
private final MyPickupDragController m_DragController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the upload control
|
* the upload control
|
||||||
@ -235,7 +252,7 @@ public class G3Viewer {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public G3Viewer(){
|
public G3Viewer(){
|
||||||
m_DragController = new PickupDragController(RootPanel.get(),false);
|
m_DragController = new MyPickupDragController(RootPanel.get(),false);
|
||||||
m_DragController.setBehaviorMultipleSelection(true);
|
m_DragController.setBehaviorMultipleSelection(true);
|
||||||
m_DragController.setBehaviorDragStartSensitivity(5);
|
m_DragController.setBehaviorDragStartSensitivity(5);
|
||||||
m_DragController.setBehaviorDragProxy(true);
|
m_DragController.setBehaviorDragProxy(true);
|
||||||
@ -313,7 +330,7 @@ public class G3Viewer {
|
|||||||
/**
|
/**
|
||||||
* returns the drag controller
|
* returns the drag controller
|
||||||
*/
|
*/
|
||||||
public PickupDragController getDragController(){
|
public MyPickupDragController getDragController(){
|
||||||
return m_DragController;
|
return m_DragController;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,6 +351,11 @@ public class G3Viewer {
|
|||||||
m_HttpDialogBox.doDialog(BASE_URL + a_Url, 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)
|
public void showImage(String a_Url)
|
||||||
{
|
{
|
||||||
m_ImageDialogBox.doDialog( a_Url);
|
m_ImageDialogBox.doDialog( a_Url);
|
||||||
|
@ -20,8 +20,9 @@ import com.google.gwt.user.client.ui.DockPanel;
|
|||||||
import com.google.gwt.user.client.ui.FlowPanel;
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
import com.google.gwt.user.client.ui.FormPanel;
|
import com.google.gwt.user.client.ui.FormPanel;
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
import com.google.gwt.user.client.ui.HTML;
|
||||||
|
import com.google.gwt.user.client.ui.FormPanel.SubmitEvent;
|
||||||
|
|
||||||
public class HttpDialogBox extends DialogBox{
|
public class HttpDialogBox extends DialogBox {
|
||||||
|
|
||||||
private FormPanel m_FormPanel = null;
|
private FormPanel m_FormPanel = null;
|
||||||
|
|
||||||
@ -30,13 +31,13 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
private final HTML m_Dialog;
|
private final HTML m_Dialog;
|
||||||
private final G3Viewer m_Parent;
|
private final G3Viewer m_Parent;
|
||||||
|
|
||||||
public HttpDialogBox(G3Viewer a_Parent){
|
public HttpDialogBox(G3Viewer a_Parent) {
|
||||||
m_Parent = a_Parent;
|
m_Parent = a_Parent;
|
||||||
m_Dialog = new HTML("Empty");
|
m_Dialog = new HTML("Empty");
|
||||||
initComponents();
|
initComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initComponents(){
|
public void initComponents() {
|
||||||
setModal(true);
|
setModal(true);
|
||||||
addStyleName("dialog");
|
addStyleName("dialog");
|
||||||
setAnimationEnabled(true);
|
setAnimationEnabled(true);
|
||||||
@ -51,18 +52,11 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Button ok = new Button("ok", new ClickHandler() {
|
Button ok = new Button("ok", new ClickHandler() {
|
||||||
|
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
if (m_FormPanel!=null)
|
|
||||||
{
|
|
||||||
submitForm();
|
submitForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpDialogBox.this.hide();
|
|
||||||
Loading.getInstance().loading("Please Wait..");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
FlowPanel fp = new FlowPanel();
|
FlowPanel fp = new FlowPanel();
|
||||||
@ -70,7 +64,7 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
fp.add(close);
|
fp.add(close);
|
||||||
fp.addStyleName("dButtons");
|
fp.addStyleName("dButtons");
|
||||||
DockPanel dp = new DockPanel();
|
DockPanel dp = new DockPanel();
|
||||||
dp.add(m_Dialog , DockPanel.CENTER);
|
dp.add(m_Dialog, DockPanel.CENTER);
|
||||||
dp.add(fp, DockPanel.SOUTH);
|
dp.add(fp, DockPanel.SOUTH);
|
||||||
dp.addStyleName("dContents");
|
dp.addStyleName("dContents");
|
||||||
add(dp);
|
add(dp);
|
||||||
@ -83,12 +77,13 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
|
|
||||||
private final String m_URL;
|
private final String m_URL;
|
||||||
|
|
||||||
public RequestCallbackImpl(String a_URL){
|
public RequestCallbackImpl(String a_URL) {
|
||||||
m_URL = a_URL;
|
m_URL = a_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onError(Request request, Throwable exception) {
|
public void onError(Request request, Throwable exception) {
|
||||||
showDialog("Could not get " + m_URL + " Exception thrown " + exception.toString());
|
showDialog("Could not get " + m_URL + " Exception thrown "
|
||||||
|
+ exception.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onResponseReceived(Request request, Response response) {
|
public void onResponseReceived(Request request, Response response) {
|
||||||
@ -101,7 +96,6 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public native static String createData(Element form) /*-{
|
public native static String createData(Element form) /*-{
|
||||||
|
|
||||||
var fieldValue = function(el, successful) {
|
var fieldValue = function(el, successful) {
|
||||||
var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
|
var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
|
||||||
if (typeof successful == 'undefined') successful = true;
|
if (typeof successful == 'undefined') successful = true;
|
||||||
@ -166,10 +160,10 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
}
|
}
|
||||||
|
|
||||||
return a;
|
return a;
|
||||||
|
|
||||||
}-*/;
|
}-*/;
|
||||||
|
|
||||||
private void submitForm(){
|
private void submitForm() {
|
||||||
|
if (m_FormPanel != null) {
|
||||||
String url = m_FormPanel.getAction();
|
String url = m_FormPanel.getAction();
|
||||||
|
|
||||||
String data = createData(m_FormPanel.getElement());
|
String data = createData(m_FormPanel.getElement());
|
||||||
@ -179,42 +173,46 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
@Override
|
@Override
|
||||||
public void success(JSONValue aValue) {
|
public void success(JSONValue aValue) {
|
||||||
JSONObject object = aValue.isObject();
|
JSONObject object = aValue.isObject();
|
||||||
if (object != null){
|
if (object != null) {
|
||||||
JSONValue result = object.get("result");
|
JSONValue result = object.get("result");
|
||||||
if (result != null)
|
if (result != null) {
|
||||||
{
|
if (result.isString().stringValue().equals(
|
||||||
if (result.isString().stringValue().equals("success")){
|
"success")) {
|
||||||
m_Callback.success(aValue.toString());
|
m_Callback.success(aValue.toString());
|
||||||
Loading.getInstance().endLoading();
|
Loading.getInstance().endLoading();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
JSONValue resul = object.get("form");
|
JSONValue resul = object.get("form");
|
||||||
showDialog(resul.isString().stringValue());
|
showDialog(resul.isString().stringValue());
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
G3Viewer.displayError("result was null ", aValue
|
||||||
{
|
.toString());
|
||||||
G3Viewer.displayError("result was null ", aValue.toString() );
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
G3Viewer.displayError("Only JSON Value Returned ", aValue.toString() );
|
G3Viewer.displayError("Only JSON Value Returned ",
|
||||||
|
aValue.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, false ,false, data);
|
}, false, false, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showDialog(String a_Text){
|
HttpDialogBox.this.hide();
|
||||||
|
Loading.getInstance().loading("Please Wait..");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showDialog(String a_Text) {
|
||||||
|
|
||||||
m_Dialog.setHTML(a_Text);
|
m_Dialog.setHTML(a_Text);
|
||||||
|
|
||||||
// hide all submits
|
// hide all submits
|
||||||
NodeList<Element> inputs = this.getElement().getElementsByTagName("input");
|
NodeList<Element> inputs = this.getElement().getElementsByTagName(
|
||||||
|
"input");
|
||||||
Element input;
|
Element input;
|
||||||
for (int i = 0; i < inputs.getLength(); i++){
|
for (int i = 0; i < inputs.getLength(); i++) {
|
||||||
input = inputs.getItem(i);
|
input = inputs.getItem(i);
|
||||||
|
|
||||||
if (input.getAttribute("type").equals("submit"))
|
if (input.getAttribute("type").equals("submit")) {
|
||||||
{
|
|
||||||
input.setAttribute("style", "display:none");
|
input.setAttribute("style", "display:none");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,32 +221,41 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
show();
|
show();
|
||||||
|
|
||||||
// find forms if it exists
|
// find forms if it exists
|
||||||
NodeList<Element> forms = this.getElement().getElementsByTagName("form");
|
NodeList<Element> forms = this.getElement()
|
||||||
if (forms.getLength() > 0)
|
.getElementsByTagName("form");
|
||||||
{
|
if (forms.getLength() > 0) {
|
||||||
Element element = this.getElement().getElementsByTagName("form").getItem(0);
|
Element element = this.getElement().getElementsByTagName("form")
|
||||||
setText(element.getElementsByTagName("legend").getItem(0).getInnerText());
|
.getItem(0);
|
||||||
|
setText(element.getElementsByTagName("legend").getItem(0)
|
||||||
|
.getInnerText());
|
||||||
|
|
||||||
m_FormPanel = FormPanel.wrap(element, true);
|
m_FormPanel = FormPanel.wrap(element, true);
|
||||||
|
m_FormPanel.addSubmitHandler(new FormPanel.SubmitHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSubmit(SubmitEvent event) {
|
||||||
|
event.cancel();
|
||||||
|
submitForm();
|
||||||
}
|
}
|
||||||
else
|
});
|
||||||
{
|
} else {
|
||||||
setText(this.getElement().getElementsByTagName("legend").getItem(0).getInnerText());
|
setText(this.getElement().getElementsByTagName("legend").getItem(0)
|
||||||
|
.getInnerText());
|
||||||
m_FormPanel = null;
|
m_FormPanel = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
setPopupPosition(Window.getClientWidth() / 2 - this.getOffsetWidth() / 2,
|
setPopupPosition(Window.getClientWidth() / 2 - this.getOffsetWidth()
|
||||||
Window.getClientHeight() / 2 - this.getOffsetHeight() / 2);
|
/ 2, Window.getClientHeight() / 2 - this.getOffsetHeight() / 2);
|
||||||
|
|
||||||
Timer t = new Timer(){
|
Timer t = new Timer() {
|
||||||
public void run(){
|
public void run() {
|
||||||
|
|
||||||
// find any scripts if they exist
|
// find any scripts if they exist
|
||||||
NodeList<Element> scripts = HttpDialogBox.this.getElement().getElementsByTagName("script");
|
NodeList<Element> scripts = HttpDialogBox.this.getElement()
|
||||||
for (int i = 0; i < scripts.getLength(); i++ )
|
.getElementsByTagName("script");
|
||||||
{
|
for (int i = 0; i < scripts.getLength(); i++) {
|
||||||
Element script = scripts.getItem(i);
|
Element script = scripts.getItem(i);
|
||||||
script.removeFromParent();
|
// script.removeFromParent();
|
||||||
Element nscript = DOM.createElement("script");
|
Element nscript = DOM.createElement("script");
|
||||||
nscript.setAttribute("type", script.getAttribute("type"));
|
nscript.setAttribute("type", script.getAttribute("type"));
|
||||||
nscript.setAttribute("src", script.getAttribute("src"));
|
nscript.setAttribute("src", script.getAttribute("src"));
|
||||||
@ -264,7 +271,9 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
/**
|
/**
|
||||||
* Gets an element by its tag name; handy for single elements like HTML,
|
* Gets an element by its tag name; handy for single elements like HTML,
|
||||||
* HEAD, BODY.
|
* HEAD, BODY.
|
||||||
* @param tagName The name of the tag.
|
*
|
||||||
|
* @param tagName
|
||||||
|
* The name of the tag.
|
||||||
* @return The element with that tag name.
|
* @return The element with that tag name.
|
||||||
*/
|
*/
|
||||||
public native static Element getElementByTagName(String tagName) /*-{
|
public native static Element getElementByTagName(String tagName) /*-{
|
||||||
@ -272,7 +281,7 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
return elem ? elem[0] : null;
|
return elem ? elem[0] : null;
|
||||||
}-*/;
|
}-*/;
|
||||||
|
|
||||||
public void doDialog(String url, HttpDialogHandler a_Callback){
|
public void doDialog(String url, HttpDialogHandler a_Callback) {
|
||||||
m_Callback = a_Callback;
|
m_Callback = a_Callback;
|
||||||
Loading.getInstance().loading("Please Wait");
|
Loading.getInstance().loading("Please Wait");
|
||||||
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
|
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
|
||||||
@ -280,9 +289,9 @@ public class HttpDialogBox extends DialogBox{
|
|||||||
try {
|
try {
|
||||||
builder.sendRequest(null, new RequestCallbackImpl(url));
|
builder.sendRequest(null, new RequestCallbackImpl(url));
|
||||||
} catch (RequestException e) {
|
} catch (RequestException e) {
|
||||||
showDialog("Could not call " + url + " Exception thrown " + e.toString());
|
showDialog("Could not call " + url + " Exception thrown "
|
||||||
|
+ e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.gloopics.g3viewer.client;
|
package com.gloopics.g3viewer.client;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile;
|
import com.gloopics.g3viewer.client.dnddesktop.DesktopDropFile;
|
||||||
import com.gloopics.g3viewer.client.dnddesktop.DesktopDroppableWidget;
|
import com.gloopics.g3viewer.client.dnddesktop.DesktopDroppableWidget;
|
||||||
@ -27,6 +28,7 @@ import com.google.gwt.event.logical.shared.CloseEvent;
|
|||||||
import com.google.gwt.event.logical.shared.CloseHandler;
|
import com.google.gwt.event.logical.shared.CloseHandler;
|
||||||
import com.google.gwt.event.shared.HandlerRegistration;
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
import com.google.gwt.gears.client.desktop.File;
|
import com.google.gwt.gears.client.desktop.File;
|
||||||
|
import com.google.gwt.json.client.JSONArray;
|
||||||
import com.google.gwt.json.client.JSONNumber;
|
import com.google.gwt.json.client.JSONNumber;
|
||||||
import com.google.gwt.json.client.JSONObject;
|
import com.google.gwt.json.client.JSONObject;
|
||||||
import com.google.gwt.json.client.JSONString;
|
import com.google.gwt.json.client.JSONString;
|
||||||
@ -164,7 +166,7 @@ public class Item extends Composite implements HasAllMouseHandlers, DesktopDropp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateImages(JSONValue a_Value){
|
public void updateImages(JSONValue a_Value){
|
||||||
JSONObject jso = a_Value.isObject();
|
JSONObject jso = a_Value.isObject();
|
||||||
|
|
||||||
if (jso != null) {
|
if (jso != null) {
|
||||||
@ -192,21 +194,22 @@ public class Item extends Composite implements HasAllMouseHandlers, DesktopDropp
|
|||||||
m_LinkedAlbum = a_Album;
|
m_LinkedAlbum = a_Album;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showPopupMenu(ContextMenuEvent event){
|
public void removeLinkedAlbum()
|
||||||
Iterator<Widget> iter = m_Container.getDragController().getSelectedWidgets().iterator();
|
|
||||||
|
|
||||||
// show views popup menu if items are selected
|
|
||||||
if (iter.hasNext())
|
|
||||||
{
|
{
|
||||||
iter.next();
|
if (m_LinkedAlbum != null){
|
||||||
if (iter.hasNext())
|
m_LinkedAlbum.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void showPopupMenu(ContextMenuEvent event){
|
||||||
|
// show views popup menu if items are selected
|
||||||
|
if (m_Container.getDragController().getSelectedWidgetcount() > 1)
|
||||||
{
|
{
|
||||||
m_View.showPopupMenu(event);
|
m_View.showPopupMenu(event);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
this.addStyleName("popped");
|
this.addStyleName("popped");
|
||||||
final PopupPanel popupPanel = new PopupPanel(true);
|
final PopupPanel popupPanel = new PopupPanel(true);
|
||||||
popupPanel.setAnimationEnabled(true);
|
popupPanel.setAnimationEnabled(true);
|
||||||
@ -270,7 +273,7 @@ public class Item extends Composite implements HasAllMouseHandlers, DesktopDropp
|
|||||||
MenuItem rotateCW = new MenuItem("Rotate Clockwise", true, new Command() {
|
MenuItem rotateCW = new MenuItem("Rotate Clockwise", true, new Command() {
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
m_ThumbImage.setUrl(Loading.URL);
|
setLoadingThumb();
|
||||||
m_Container.doJSONRequest(G3Viewer.ROTATE_URL + m_ID + "/cw", new HttpSuccessHandler() {
|
m_Container.doJSONRequest(G3Viewer.ROTATE_URL + m_ID + "/cw", new HttpSuccessHandler() {
|
||||||
|
|
||||||
public void success(JSONValue aValue) {
|
public void success(JSONValue aValue) {
|
||||||
@ -286,7 +289,7 @@ public class Item extends Composite implements HasAllMouseHandlers, DesktopDropp
|
|||||||
MenuItem rotateCCW = new MenuItem("Rotate Couter-Clockwise", true, new Command() {
|
MenuItem rotateCCW = new MenuItem("Rotate Couter-Clockwise", true, new Command() {
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
m_ThumbImage.setUrl(Loading.URL);
|
setLoadingThumb();
|
||||||
m_Container.doJSONRequest(G3Viewer.ROTATE_URL + m_ID + "/ccw", new HttpSuccessHandler() {
|
m_Container.doJSONRequest(G3Viewer.ROTATE_URL + m_ID + "/ccw", new HttpSuccessHandler() {
|
||||||
|
|
||||||
public void success(JSONValue aValue) {
|
public void success(JSONValue aValue) {
|
||||||
@ -302,6 +305,7 @@ public class Item extends Composite implements HasAllMouseHandlers, DesktopDropp
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
popupMenuBar.setVisible(true);
|
popupMenuBar.setVisible(true);
|
||||||
popupPanel.add(popupMenuBar);
|
popupPanel.add(popupMenuBar);
|
||||||
|
|
||||||
@ -320,6 +324,10 @@ public class Item extends Composite implements HasAllMouseHandlers, DesktopDropp
|
|||||||
popupPanel.show();
|
popupPanel.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLoadingThumb()
|
||||||
|
{
|
||||||
|
m_ThumbImage.setUrl(Loading.URL);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isAlbum(){
|
public boolean isAlbum(){
|
||||||
return m_IsAlbum;
|
return m_IsAlbum;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.gloopics.g3viewer.client;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.allen_sauer.gwt.dnd.client.DragContext;
|
||||||
|
import com.allen_sauer.gwt.dnd.client.PickupDragController;
|
||||||
|
import com.google.gwt.user.client.ui.AbsolutePanel;
|
||||||
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
|
||||||
|
public class MyPickupDragController extends PickupDragController{
|
||||||
|
|
||||||
|
public MyPickupDragController(AbsolutePanel boundaryPanel, boolean allowDroppingOnBoundaryPanel) {
|
||||||
|
super(boundaryPanel, allowDroppingOnBoundaryPanel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DragContext getDragContext()
|
||||||
|
{
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Widget> getSelectedWidgets()
|
||||||
|
{
|
||||||
|
return context.selectedWidgets;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSelectedWidgetcount()
|
||||||
|
{
|
||||||
|
return context.selectedWidgets.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -126,6 +126,7 @@ public class UploadFile extends Composite{
|
|||||||
{
|
{
|
||||||
m_Label.setText("Upload Error");
|
m_Label.setText("Upload Error");
|
||||||
addStyleName("upload-error");
|
addStyleName("upload-error");
|
||||||
|
G3Viewer.displayError("Error Uploading", request.getResponseText());
|
||||||
}
|
}
|
||||||
removeCapture(RS, m_Name);
|
removeCapture(RS, m_Name);
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package com.gloopics.g3viewer.client;
|
package com.gloopics.g3viewer.client;
|
||||||
|
|
||||||
|
import com.allen_sauer.gwt.dnd.client.DragContext;
|
||||||
|
import com.google.gwt.json.client.JSONArray;
|
||||||
import com.google.gwt.json.client.JSONNumber;
|
import com.google.gwt.json.client.JSONNumber;
|
||||||
import com.google.gwt.json.client.JSONValue;
|
import com.google.gwt.json.client.JSONValue;
|
||||||
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
public static int extractId(JSONValue a_Value){
|
public static int extractId(JSONValue a_Value){
|
||||||
@ -15,4 +18,17 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static JSONArray extractIds(DragContext 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++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return jsa;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,10 +13,13 @@ import com.google.gwt.event.dom.client.ContextMenuEvent;
|
|||||||
import com.google.gwt.event.logical.shared.CloseEvent;
|
import com.google.gwt.event.logical.shared.CloseEvent;
|
||||||
import com.google.gwt.event.logical.shared.CloseHandler;
|
import com.google.gwt.event.logical.shared.CloseHandler;
|
||||||
import com.google.gwt.gears.client.desktop.File;
|
import com.google.gwt.gears.client.desktop.File;
|
||||||
|
import com.google.gwt.json.client.JSONArray;
|
||||||
|
import com.google.gwt.json.client.JSONObject;
|
||||||
import com.google.gwt.json.client.JSONValue;
|
import com.google.gwt.json.client.JSONValue;
|
||||||
import com.google.gwt.user.client.Command;
|
import com.google.gwt.user.client.Command;
|
||||||
import com.google.gwt.user.client.DOM;
|
import com.google.gwt.user.client.DOM;
|
||||||
import com.google.gwt.user.client.Event;
|
import com.google.gwt.user.client.Event;
|
||||||
|
import com.google.gwt.user.client.ui.DialogBox;
|
||||||
import com.google.gwt.user.client.ui.FlowPanel;
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
import com.google.gwt.user.client.ui.HTML;
|
||||||
import com.google.gwt.user.client.ui.MenuBar;
|
import com.google.gwt.user.client.ui.MenuBar;
|
||||||
@ -143,17 +146,26 @@ public class View extends FlowPanel implements DesktopDroppableWidget{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
/*
|
popupPanel.hide();
|
||||||
m_Container.doDialog("index.php/quick/form_delete/" + m_ID, new HttpDialogHandler() {
|
|
||||||
public void success(String aResult) {
|
m_Container.doConfirm("Are you sure you wish to delete selected items?", new ConfirmDialogBox.ConfirmCallBack() {
|
||||||
m_View.removeFromView(Item.this);
|
|
||||||
if (m_LinkedAlbum != null){
|
public void ok() {
|
||||||
m_LinkedAlbum.remove();
|
JSONArray jsa = Utils.extractIds(m_Container.getDragController().getDragContext());
|
||||||
|
|
||||||
|
m_Container.doJSONRequest(G3Viewer.DELETE_ALL_URL + "?sourceids=" + jsa.toString() , new HttpSuccessHandler() {
|
||||||
|
public void success(JSONValue aValue) {
|
||||||
|
final List<Widget> widgets = m_Container.getDragController().getSelectedWidgets();
|
||||||
|
Item i;
|
||||||
|
for (Widget widget: widgets){
|
||||||
|
i = (Item)widget;
|
||||||
|
removeFromView(i);
|
||||||
|
i.removeLinkedAlbum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}}, true, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
popupPanel.hide();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -163,6 +175,62 @@ public class View extends FlowPanel implements DesktopDroppableWidget{
|
|||||||
popupMenuBar.setVisible(true);
|
popupMenuBar.setVisible(true);
|
||||||
popupPanel.add(popupMenuBar);
|
popupPanel.add(popupMenuBar);
|
||||||
|
|
||||||
|
MenuItem rotateAllCW = new MenuItem("Rotate All Clockwise", true, new Command() {
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
// change all thumbs into loading
|
||||||
|
final List<Widget> widgets = m_Container.getDragController().getSelectedWidgets();
|
||||||
|
|
||||||
|
for (Widget widget: widgets){
|
||||||
|
final Item i = ((Item)widget);
|
||||||
|
if (i.isPhoto())
|
||||||
|
{
|
||||||
|
i.setLoadingThumb();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_Container.doJSONRequest(G3Viewer.ROTATE_URL + i.getID() + "/cw",
|
||||||
|
new HttpSuccessHandler() {
|
||||||
|
|
||||||
|
public void success(JSONValue aValue) {
|
||||||
|
i.updateImages(aValue);
|
||||||
|
}
|
||||||
|
},false,true);
|
||||||
|
}
|
||||||
|
popupPanel.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
rotateAllCW.addStyleName("popup-item");
|
||||||
|
popupMenuBar.addItem(rotateAllCW);
|
||||||
|
|
||||||
|
|
||||||
|
MenuItem rotateAllCCW = new MenuItem("Rotate All Counter-Clockwise", true, new Command() {
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
// change all thumbs into loading
|
||||||
|
final List<Widget> widgets = m_Container.getDragController().getSelectedWidgets();
|
||||||
|
|
||||||
|
for (Widget widget: widgets){
|
||||||
|
final Item i = ((Item)widget);
|
||||||
|
if (i.isPhoto())
|
||||||
|
{
|
||||||
|
i.setLoadingThumb();
|
||||||
|
}
|
||||||
|
m_Container.doJSONRequest(G3Viewer.ROTATE_URL + i.getID() + "/cw",
|
||||||
|
new HttpSuccessHandler() {
|
||||||
|
|
||||||
|
public void success(JSONValue aValue) {
|
||||||
|
i.updateImages(aValue);
|
||||||
|
}
|
||||||
|
},false,true);
|
||||||
|
}
|
||||||
|
popupPanel.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
rotateAllCW.addStyleName("popup-item");
|
||||||
|
popupMenuBar.addItem(rotateAllCCW);
|
||||||
|
|
||||||
int x = DOM.eventGetClientX((Event)event.getNativeEvent());
|
int x = DOM.eventGetClientX((Event)event.getNativeEvent());
|
||||||
int y = DOM.eventGetClientY((Event)event.getNativeEvent());
|
int y = DOM.eventGetClientY((Event)event.getNativeEvent());
|
||||||
popupPanel.setPopupPosition(x, y);
|
popupPanel.setPopupPosition(x, y);
|
||||||
@ -170,6 +238,4 @@ public class View extends FlowPanel implements DesktopDroppableWidget{
|
|||||||
popupPanel.show();
|
popupPanel.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,3 +4,4 @@
|
|||||||
?>
|
?>
|
||||||
<iframe src="<?=$url?>" style="width:100%; height:500px; border:8px solid #d2e1f6; margin:0; padding:0;">
|
<iframe src="<?=$url?>" style="width:100%; height:500px; border:8px solid #d2e1f6; margin:0; padding:0;">
|
||||||
</iframe>
|
</iframe>
|
||||||
|
GWT Organise version built on <?= revision::getTimeStamp()?>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user