[Pkg-mozext-commits] [itsalltext] 27/459: Cleaned up the button/gumdrop stuff. Started trying to get the popup menu to work.
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:03 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit 144888470c35a224352255ec14704e19ef5225b0
Author: Christian Höltje <docwhat at gerf.org>
Date: Sun Dec 17 09:50:48 2006 -0500
Cleaned up the button/gumdrop stuff.
Started trying to get the popup menu to work.
---
chrome/content/itsalltext.js | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/chrome/content/itsalltext.js b/chrome/content/itsalltext.js
index dea7bc9..51d5f68 100644
--- a/chrome/content/itsalltext.js
+++ b/chrome/content/itsalltext.js
@@ -271,6 +271,7 @@ function ItsAllTextOverlay() {
self.timestamp = 0;
self.size = 0;
self.node = node;
+ self.button = null;
self.uid = hashString([ node.ownerDocument.URL,
Math.random(),
@@ -498,12 +499,8 @@ function ItsAllTextOverlay() {
* @param {Object} cache_object The Cache Object that contains the node.
*/
that.addGumDrop = function(cache_object) {
+ if (cache_object.button !== null) { return; /*already done*/ }
that.debug('addGumDrop',cache_object);
- if (cache_object._is_gummed) {
- return; // we did it already
- }
- // So we don't gum it again.
- cache_object._is_gummed = true;
var node = cache_object.node;
var doc = node.ownerDocument;
@@ -512,6 +509,7 @@ function ItsAllTextOverlay() {
var gumdrop = doc.createElementNS("http://www.w3.org/1999/xhtml", "div");
gumdrop.appendChild(doc.createTextNode('edit'));
+ cache_object.button = gumdrop; // Store it for easy finding in the future.
gumdrop.style.backgroundColor = '#24c';
gumdrop.style.color = '#fff';
gumdrop.style.direction = 'ltr';
@@ -528,7 +526,7 @@ function ItsAllTextOverlay() {
gumdrop.style.MozBorderRadius = '8px';
gumdrop.style.zIndex = 65535;
gumdrop.style.MozOpacity = "0.7";
- gumdrop.title = "It's All Text"
+ gumdrop.title = "It's All Text";
// This doesn't seem to work because it's not privelidged enough to get
// to the chrome.
@@ -539,8 +537,16 @@ function ItsAllTextOverlay() {
// gumdrop.alt = 'edit';
//gumdrop.style.paddingLeft = node.offsetWidth + "px";
+
+ var onEditClick = function(event) {
+ ////event.target.showPopup();
+ //var menu = document.getElementById('its-all-text-menu');
+ //menu.showPopup(cache_object.node,-1,-1,'context');
+ cache_object.edit();
+ };
+
// Click event handler
- gumdrop.addEventListener("click", function(){cache_object.edit();}, false);
+ gumdrop.addEventListener("click", onEditClick, false);
// Insert gumdrop into the document
//gumdrop.style.display = "none";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list