Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed single column browsing

updated version info
ZeroClipboard implemented
  • Loading branch information...
commit 907027895f8eb1d59fa7069b7abb1cbd3e22b3b1 1 parent 1c6cb2b
tomek authored
View
2  pom.xml
@@ -5,7 +5,7 @@
<groupId>com.kuprowski</groupId>
<artifactId>helenos</artifactId>
- <version>1.1</version>
+ <version>1.2</version>
<packaging>war</packaging>
<name>helenos</name>
<developers>
View
2  src/main/frontend/config.json
@@ -46,7 +46,7 @@
"CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache",
"ROOT" : ".",
"BUILD_PATH" : "../../../target/helenos-${HELENOS_VER}/gui/",
- "HELENOS_VER" : "1.1"
+ "HELENOS_VER" : "1.2"
},
"jobs" :
View
3  src/main/frontend/source/class/helenos/Application.js
@@ -8,7 +8,9 @@ Authors:
************************************************************************ */
/* ************************************************************************
#asset(helenos/*)
+#asset(ZeroClipboard*.*)
************************************************************************ */
+
/**
* This is the main application class of your custom application "helenos"
*/
@@ -42,6 +44,7 @@ qx.Class.define("helenos.Application",
}
qx.locale.Manager.getInstance().setLocale("en");
+ qx.Class.include(qx.ui.treevirtual.TreeVirtual, qx.ui.table.MTableContextMenu);
this.getRoot().add(new helenos.components.TopComposite(), {
edge : 0
});
View
33 src/main/frontend/source/class/helenos/components/menu/ColumnFamilyContextMenu.js
@@ -27,8 +27,11 @@ qx.Class.define('helenos.components.menu.ColumnFamilyContextMenu',
propsButton.addListener('execute', this.__showProperties);
this.add(propsButton);
- var browserMenu = new qx.ui.menu.Button('Browse', null, null, this.__getBrowseSubMenu(ksName, cfName));
- this.add(browserMenu);
+ var browseButton = new qx.ui.menu.Button('Browse data', 'icon/16/apps/office-spreadsheet.png');
+ browseButton.setUserData('KSNAME', ksName);
+ browseButton.setUserData('CFNAME', cfName);
+ browseButton.addListener('execute', this.__showBrowseByPredicatePane);
+ this.add(browseButton);
this.add(new qx.ui.menu.Separator());
@@ -49,29 +52,9 @@ qx.Class.define('helenos.components.menu.ColumnFamilyContextMenu',
__showProperties : function(e) {
var ksName = e.getTarget().getUserData('KSNAME');
var cfName = e.getTarget().getUserData('CFNAME');
-
helenos.util.GuiObserver.showColumnFamilyInfoTab(ksName, cfName);
},
- __getBrowseSubMenu : function(ksName, cfName) {
- var menu = new qx.ui.menu.Menu();
-
- var byKeyButton = new qx.ui.menu.Button('Single column', 'icon/16/apps/utilities-keyring.png');
- byKeyButton.setUserData('KSNAME', ksName);
- byKeyButton.setUserData('CFNAME', cfName);
- byKeyButton.addListener('execute', this.__showBrowseBySingleColumnPane);
-
- var predicateButton = new qx.ui.menu.Button('Predicate', 'icon/16/apps/office-spreadsheet.png');
- predicateButton.setUserData('KSNAME', ksName);
- predicateButton.setUserData('CFNAME', cfName);
- predicateButton.addListener('execute', this.__showBrowseByPredicatePane);
-
- menu.add(byKeyButton);
- menu.add(predicateButton);
- //menu.add(keyRangeButton);
- return menu;
- },
-
/**
* @lint ignoreUndefined(dialog)
*/
@@ -86,12 +69,6 @@ qx.Class.define('helenos.components.menu.ColumnFamilyContextMenu',
}, this);
},
- __showBrowseBySingleColumnPane : function(e) {
- var ksName = e.getTarget().getUserData('KSNAME');
- var cfName = e.getTarget().getUserData('CFNAME');
- helenos.util.GuiObserver.showBrowseBySingleColumnTab(ksName, cfName);
- },
-
__showBrowseByPredicatePane : function(e) {
var ksName = e.getTarget().getUserData('KSNAME');
var cfName = e.getTarget().getUserData('CFNAME');
View
28 src/main/frontend/source/class/helenos/components/tab/browse/PredicatePage.js
@@ -25,7 +25,7 @@ qx.Class.define("helenos.components.tab.browse.PredicatePage",
__keyFromTF : null,
__keyToTF : null,
- __keyMode : null,
+ __keyMode : 'predicate',
__nameStartTF : null,
__nameEndTF : null,
@@ -36,6 +36,8 @@ qx.Class.define("helenos.components.tab.browse.PredicatePage",
__rangeFromToCP : null,
__reversedCB : null,
+ _tree : null,
+
_performSearch : function(e) {
var keyFrom = this.__keyFromTF.getValue();
var keyTo = this.__keyToTF.getValue();
@@ -60,29 +62,11 @@ qx.Class.define("helenos.components.tab.browse.PredicatePage",
},
_getResultComponent : function(result) {
- var tree = new qx.ui.treevirtual.TreeVirtual(["Name", "Value", "Clock", "TTL"]);
- tree.setAlwaysShowOpenCloseSymbol(true);
- tree.setUseTreeLines(true);
+ this._tree = new helenos.ui.treevirtual.ResultsTree(result);
+
var tablePane = new qx.ui.core.scroll.ScrollPane().set({allowGrowX : true, allowGrowY : true});
- var i;
- var dataModel = tree.getDataModel();
-
- //var branch = dataModel.addBranch(null, this.__keyTF.getValue(), true);
- for(i = 0; i < result.length; i++) {
- var row = result[i];
- var branch = dataModel.addBranch(null, row.key, true);
- var j;
- for (j = 0; j < row.columns.length; j++) {
- var col = row.columns[j];
- var leaf = dataModel.addLeaf(branch, col.name);
- dataModel.setColumnData(leaf, 1, col.value);
- dataModel.setColumnData(leaf, 2, col.clock);
- dataModel.setColumnData(leaf, 3, col.ttl);
- }
- }
- dataModel.setData();
- tablePane.add(tree);
+ tablePane.add(this._tree);
return tablePane;
},
View
80 src/main/frontend/source/class/helenos/components/tab/browse/SingleColumnPage.js
@@ -1,80 +0,0 @@
-/* ************************************************************************
-Copyright:
- 2012 Tomek Kuprowski
-License:
- GPLv2: http://www.gnu.org/licences/gpl.html
-Authors:
- Tomek Kuprowski (tomekkuprowski at gmail dot com)
- ************************************************************************ */
-qx.Class.define("helenos.components.tab.browse.SingleColumnPage",
-{
- extend : helenos.components.tab.browse.AbstractBrowsePage,
-
- construct : function(ksName, cfName)
- {
- this.base(arguments, ksName, cfName);
- this.set({
- icon : 'icon/16/apps/utilities-keyring.png'
- });
- },
-
- members :
- {
- __keyTF : null,
- __nameTF : null,
- __sNameTF : null,
-
- _performSearch : function(e) {
- var key = this.__keyTF.getValue();
- var name = this.__nameTF.getValue();
- var sName = (this.__sNameTF == null ? null : this.__sNameTF.getValue());
- var column = helenos.util.RpcActionsProvider.querySingleColumn(this._cfDef, key, name, sName );
-
- this._resultView.removeAll();
- if (this._rajCB.getValue()) {
- this._resultView.add(this._getTreeFromJson(key, column.value), {flex: 1});
-
- } else {
- this._resultView.add(new helenos.ui.CompositeH([new qx.ui.basic.Label('Value'),
- new qx.ui.form.TextArea(column.value)]), {flex: 1});
- }
-
- this._resultView.add(this._getDetailsBox(column));
- },
-
- _getDetailsBox : function(column) {
- return new helenos.ui.CompositeH([
- new helenos.ui.BoldLabel('Column name:'),
- new qx.ui.form.TextField('' + column.name).set({width: 180}),
- new helenos.ui.BoldLabel('Clock:'),
- new qx.ui.form.TextField('' + column.clock).set({width: 150}),
- new helenos.ui.BoldLabel('TTL:'),
- new qx.ui.form.TextField('' + column.ttl).set({width: 150})
- ]);
- },
-
- _getCriteriaComponents : function() {
- var ret = new Array();
- this.__keyTF = new helenos.ui.RequiredTextField(this._cfDef.keyValidationClass);
- this.__nameTF = new helenos.ui.RequiredTextField(this._cfDef.comparatorType.className);
- this._manager.add(this.__keyTF);
- this._manager.add(this.__nameTF);
- //var searchButton = this._getSearchButton();
-
- ret.push(new helenos.ui.CompositeV([new qx.ui.basic.Label('Key:'), this.__keyTF]));
-
- if (this._cfDef.columnType == 'Super') {
- this.__sNameTF = new helenos.ui.RequiredTextField(this._cfDef.subComparatorType.className);
- this._manager.add(this.__sNameTF);
- ret.push(new helenos.ui.CompositeV([new qx.ui.basic.Label('Super column name:'), this.__sNameTF]));
- }
-
- ret.push(new helenos.ui.CompositeV([new qx.ui.basic.Label('Column name:'), this.__nameTF]));
- //filterGB.add(searchButton);
- //filterGB.add(this._rajCB);
-
- //this.add(filterGB);
- return ret;
- }
- }
-});
View
72 src/main/frontend/source/class/helenos/ui/treevirtual/ResultsTree.js
@@ -0,0 +1,72 @@
+/* ************************************************************************
+Copyright:
+ 2012 Tomek Kuprowski
+License:
+ GPLv2: http://www.gnu.org/licences/gpl.html
+Authors:
+ Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ ************************************************************************ */
+qx.Class.define("helenos.ui.treevirtual.ResultsTree",
+{
+ extend : qx.ui.treevirtual.TreeVirtual,
+
+ construct : function(data)
+ {
+ this.base(arguments, ["Name", "Value", "Clock", "TTL"]);
+ this.set({alwaysShowOpenCloseSymbol : true, useTreeLines : true});
+
+ var resizeBehavior = this.getTableColumnModel().getBehavior();
+ resizeBehavior.set(1, { width:"1*", minWidth:200 });
+ resizeBehavior.setWidth(3, 60);
+
+ this.setData(data);
+
+ ZeroClipboard.setMoviePath("resource/ZeroClipboard10.swf");
+ this.setContextMenuHandler(0, this._contextMenuHandler);
+ this.setContextMenuHandler(1, this._contextMenuHandler);
+ this.setContextMenuHandler(2, this._contextMenuHandler);
+ this.setContextMenuHandler(3, this._contextMenuHandler);
+ },
+
+ members : {
+
+ _contextMenuHandler : function(col, row, table, dataModel, contextMenu) {
+ var copyBtn = new qx.ui.menu.Button('Copy to clipboard');
+ var clip = new ZeroClipboard.Client();
+
+ clip.addEventListener('complete', function (client, text) {
+ client.destroy();
+ },this);
+ if (!table.getSelectionModel().isSelectionEmpty()) {
+ var text = dataModel.getValue(col, row);
+ clip.setText(text);
+ }
+
+ copyBtn.addListener("appear", function(e) {
+ clip.glue(e.getTarget().getContentElement().getDomElement());
+ }, this);
+
+ contextMenu.add(copyBtn);
+ return true;
+ },
+
+ setData : function(data) {
+ var dataModel = this.getDataModel();
+
+ var i;
+ for(i = 0; i < data.length; i++) {
+ var row = data[i];
+ var branch = dataModel.addBranch(null, row.key, true);
+ var j;
+ for (j = 0; j < row.columns.length; j++) {
+ var col = row.columns[j];
+ var leaf = dataModel.addLeaf(branch, col.name);
+ dataModel.setColumnData(leaf, 1, col.value);
+ dataModel.setColumnData(leaf, 2, col.clock);
+ dataModel.setColumnData(leaf, 3, col.ttl);
+ }
+ }
+ dataModel.setData();
+ }
+ }
+});
View
6 src/main/frontend/source/class/helenos/util/GuiObserver.js
@@ -35,12 +35,6 @@ qx.Class.define("helenos.util.GuiObserver",
this._addPageToTab(ksPage);
},
- showBrowseBySingleColumnTab : function(keyspaceName, columnFamily) {
- qx.core.Assert.assertNotNull(this.__tabbedPane,'tabbed pane not registered yet');
- var dataPage = new helenos.components.tab.browse.SingleColumnPage(keyspaceName, columnFamily);
- this._addPageToTab(dataPage);
- },
-
showBrowseByPredicateTab : function(keyspaceName, columnFamily) {
qx.core.Assert.assertNotNull(this.__tabbedPane,'tabbed pane not registered yet');
var dataPage = new helenos.components.tab.browse.PredicatePage(keyspaceName, columnFamily);
View
21 src/main/frontend/source/class/helenos/util/RpcActionsProvider.js
@@ -118,27 +118,6 @@ qx.Class.define('helenos.util.RpcActionsProvider', {
return rpc.callSync('createKeyspace', formData);
},
- querySingleColumn : function(cfDef, key, name, sName) {
- var query = {};
-
- query.keyClass = this.__findParamClass(cfDef.keyValidationClass);
- query.nameClass = this.__findParamClass(cfDef.comparatorType.className);
- query.keyspace = cfDef.keyspaceName;
- query.columnFamily = cfDef.name;
- query.key = key;
- query.name = name;
-
- var rpc = null;
- if (cfDef.columnType == 'Standard') {
- rpc = new helenos.util.Rpc(this._STANDARDQUERY);
- } else {
- rpc = new helenos.util.Rpc(this._SUPERQUERY);
- query.sNameClass = this.__findParamClass(cfDef.subComparatorType.className);
- query.sName = sName;
- }
- return rpc.callSync('singleColumn', query );
- },
-
queryPredicate : function(cfDef, keyFrom, keyTo, columnNames, nameStart, nameEnd, sName, reversed ) {
var query = {};
View
2  src/main/frontend/source/index.html
@@ -4,7 +4,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Helenos</title>
<link rel="icon" type="image/ico" href="/helenos/resource/favicon.ico"/>
+ <script type="text/javascript" src="resource/ZeroClipboard.js"></script>
<script type="text/javascript" src="script/helenos.js"></script>
+
</head>
<body></body>
</html>
View
337 src/main/frontend/source/resource/ZeroClipboard.js
@@ -0,0 +1,337 @@
+// Simple Set Clipboard System
+// Author: Joseph Huckaby
+
+window.ZeroClipboard = {
+
+ version: "1.0.8",
+ clients: {}, // registered upload clients on page, indexed by id
+ moviePath: 'ZeroClipboard.swf', // URL to movie
+ nextId: 1, // ID of next movie
+
+ $: function(thingy) {
+ // simple DOM lookup utility function
+ if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
+ if (!thingy.addClass) {
+ // extend element with a few useful methods
+ thingy.hide = function() { this.style.display = 'none'; };
+ thingy.show = function() { this.style.display = ''; };
+ thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
+ thingy.removeClass = function(name) {
+ var classes = this.className.split(/\s+/);
+ var idx = -1;
+ for (var k = 0; k < classes.length; k++) {
+ if (classes[k] == name) { idx = k; k = classes.length; }
+ }
+ if (idx > -1) {
+ classes.splice( idx, 1 );
+ this.className = classes.join(' ');
+ }
+ return this;
+ };
+ thingy.hasClass = function(name) {
+ return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
+ };
+ }
+ return thingy;
+ },
+
+ setMoviePath: function(path) {
+ // set path to ZeroClipboard.swf
+ this.moviePath = path;
+ },
+
+ // use this method in JSNI calls to obtain a new Client instance
+ newClient: function() {
+ return new ZeroClipboard.Client();
+ },
+
+ dispatch: function(id, eventName, args) {
+ // receive event from flash movie, send to client
+ var client = this.clients[id];
+ if (client) {
+ client.receiveEvent(eventName, args);
+ }
+ },
+
+ register: function(id, client) {
+ // register new client to receive events
+ this.clients[id] = client;
+ },
+
+ getDOMObjectPosition: function(obj, stopObj) {
+ // get absolute coordinates for dom element
+ var info = {
+ left: 0,
+ top: 0,
+ width: obj.width ? obj.width : obj.offsetWidth,
+ height: obj.height ? obj.height : obj.offsetHeight
+ };
+
+ while (obj && (obj != stopObj)) {
+ info.left += obj.offsetLeft;
+ info.left += obj.style.borderLeftWidth ? parseInt(obj.style.borderLeftWidth) : 0;
+ info.top += obj.offsetTop;
+ info.top += obj.style.borderTopWidth ? parseInt(obj.style.borderTopWidth) : 0;
+ obj = obj.offsetParent;
+ }
+
+ return info;
+ },
+
+ Client: function(elem) {
+ // constructor for new simple upload client
+ this.handlers = {};
+
+ // unique ID
+ this.id = ZeroClipboard.nextId++;
+ this.movieId = 'ZeroClipboardMovie_' + this.id;
+
+ // register client with singleton to receive flash events
+ ZeroClipboard.register(this.id, this);
+
+ // create movie
+ if (elem) this.glue(elem);
+ }
+};
+
+ZeroClipboard.Client.prototype = {
+
+ id: 0, // unique ID for us
+ title: "", // tooltip for the flash element
+ ready: false, // whether movie is ready to receive events or not
+ movie: null, // reference to movie object
+ clipText: '', // text to copy to clipboard
+ handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
+ cssEffects: true, // enable CSS mouse effects on dom container
+ handlers: null, // user event handlers
+ zIndex: 99, // default zIndex of the movie object
+
+ glue: function(elem, appendElem, stylesToAdd) {
+ // glue to DOM element
+ // elem can be ID or actual DOM element object
+ this.domElement = ZeroClipboard.$(elem);
+
+ // float just above object, or default zIndex if dom element isn't set
+ if (this.domElement.style.zIndex) {
+ this.zIndex = parseInt(this.domElement.style.zIndex, 10) + 1;
+ }
+
+ // check if the element has a title
+ if (this.domElement.getAttribute("title") != null) {
+ this.title = this.domElement.getAttribute("title");
+ }
+
+ if (typeof(appendElem) == 'string') {
+ appendElem = ZeroClipboard.$(appendElem);
+ }
+ else if (typeof(appendElem) == 'undefined') {
+ appendElem = document.getElementsByTagName('body')[0];
+ }
+
+ // find X/Y position of domElement
+ var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem);
+
+ // create floating DIV above element
+ this.div = document.createElement('div');
+ var style = this.div.style;
+ style.position = 'absolute';
+ style.left = '' + box.left + 'px';
+ style.top = '' + box.top + 'px';
+ style.width = '' + box.width + 'px';
+ style.height = '' + box.height + 'px';
+ style.zIndex = this.zIndex;
+
+ if (typeof(stylesToAdd) == 'object') {
+ for (var addedStyle in stylesToAdd) {
+ style[addedStyle] = stylesToAdd[addedStyle];
+ }
+ }
+
+ // style.backgroundColor = '#f00'; // debug
+
+ appendElem.appendChild(this.div);
+
+ this.div.innerHTML = this.getHTML( box.width, box.height );
+ },
+
+ getHTML: function(width, height) {
+ // return HTML for movie
+ var html = '';
+ var flashvars = 'id=' + this.id +
+ '&width=' + width +
+ '&height=' + height,
+ title = this.title ? ' title="' + this.title + '"' : '';
+
+ if (navigator.userAgent.match(/MSIE/)) {
+ // IE gets an OBJECT tag
+ var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
+ html += '<object' + title + ' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
+ }
+ else {
+ // all other browsers get an EMBED tag
+ html += '<embed' + title + ' id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
+ }
+ return html;
+ },
+
+ hide: function() {
+ // temporarily hide floater offscreen
+ if (this.div) {
+ this.div.style.left = '-2000px';
+ }
+ },
+
+ show: function() {
+ // show ourselves after a call to hide()
+ this.reposition();
+ },
+
+ destroy: function() {
+ // destroy control and floater
+ if (this.domElement && this.div) {
+ this.hide();
+ this.div.innerHTML = '';
+
+ var body = document.getElementsByTagName('body')[0];
+ try { body.removeChild( this.div ); } catch(e) {}
+
+ this.domElement = null;
+ this.div = null;
+ }
+ },
+
+ reposition: function(elem) {
+ // reposition our floating div, optionally to new container
+ // warning: container CANNOT change size, only position
+ if (elem) {
+ this.domElement = ZeroClipboard.$(elem);
+ if (!this.domElement) this.hide();
+ }
+
+ if (this.domElement && this.div) {
+ var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
+ var style = this.div.style;
+ style.left = '' + box.left + 'px';
+ style.top = '' + box.top + 'px';
+ }
+ },
+
+ setText: function(newText) {
+ // set text to be copied to clipboard
+ this.clipText = newText;
+ if (this.ready) this.movie.setText(newText);
+ },
+
+ setTitle: function(newTitle) {
+ // set title of flash element
+ this.title = newTitle;
+ if (this.ready) this.movie.setTitle(newTitle);
+ },
+
+ addEventListener: function(eventName, func) {
+ // add user event listener for event
+ // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel
+ eventName = eventName.toString().toLowerCase().replace(/^on/, '');
+ if (!this.handlers[eventName]) this.handlers[eventName] = [];
+ this.handlers[eventName].push(func);
+ },
+
+ setHandCursor: function(enabled) {
+ // enable hand cursor (true), or default arrow cursor (false)
+ this.handCursorEnabled = enabled;
+ if (this.ready) this.movie.setHandCursor(enabled);
+ },
+
+ setCSSEffects: function(enabled) {
+ // enable or disable CSS effects on DOM container
+ this.cssEffects = !!enabled;
+ },
+
+ receiveEvent: function(eventName, args) {
+ // receive event from flash
+ eventName = eventName.toString().toLowerCase().replace(/^on/, '');
+
+ // special behavior for certain events
+ switch (eventName) {
+ case 'load':
+ // movie claims it is ready, but in IE this isn't always the case...
+ // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
+ this.movie = document.getElementById(this.movieId);
+ if (!this.movie) {
+ var self = this;
+ setTimeout( function() { self.receiveEvent('load', null); }, 1 );
+ return;
+ }
+
+ // firefox on pc needs a "kick" in order to set these in certain cases
+ if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
+ var self = this;
+ setTimeout( function() { self.receiveEvent('load', null); }, 100 );
+ this.ready = true;
+ return;
+ }
+
+ this.ready = true;
+ this.movie.setText( this.clipText );
+ this.movie.setTitle( this.title );
+ this.movie.setHandCursor( this.handCursorEnabled );
+ break;
+
+ case 'mouseover':
+ if (this.domElement && this.cssEffects) {
+ this.domElement.addClass('hover');
+ if (this.recoverActive) this.domElement.addClass('active');
+ }
+ break;
+
+ case 'mouseout':
+ if (this.domElement && this.cssEffects) {
+ this.recoverActive = false;
+ if (this.domElement.hasClass('active')) {
+ this.domElement.removeClass('active');
+ this.recoverActive = true;
+ }
+ this.domElement.removeClass('hover');
+ }
+ break;
+
+ case 'mousedown':
+ if (this.domElement && this.cssEffects) {
+ this.domElement.addClass('active');
+ }
+ break;
+
+ case 'mouseup':
+ if (this.domElement && this.cssEffects) {
+ this.domElement.removeClass('active');
+ this.recoverActive = false;
+ }
+ break;
+ } // switch eventName
+
+ if (this.handlers[eventName]) {
+ for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
+ var func = this.handlers[eventName][idx];
+
+ if (typeof(func) == 'function') {
+ // actual function reference
+ func(this, args);
+ }
+ else if ((typeof(func) == 'object') && (func.length == 2)) {
+ // PHP style object + method, i.e. [myObject, 'myMethod']
+ func[0][ func[1] ](this, args);
+ }
+ else if (typeof(func) == 'string') {
+ // name of function
+ window[func](this, args);
+ }
+ } // foreach event handler defined
+ } // user defined handler for event
+ }
+
+};
+
+if (typeof module !== "undefined") {
+ module.exports = ZeroClipboard;
+}
+
View
BIN  src/main/frontend/source/resource/ZeroClipboard.swf
Binary file not shown
View
BIN  src/main/frontend/source/resource/ZeroClipboard10.swf
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.