summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2006-11-13 21:42:51 (UTC)
committer Michael Krelin <hacker@klever.net>2006-11-13 21:42:51 (UTC)
commitee241f175fb9de69f17723a5cf31d0025a3a2fbd (patch) (side-by-side diff)
tree56d7a4ceb3e9e3980a40acaf0a127e4ea6555f87
parent790a0930a6d9eb52020193b8f5aabf5da1075ba3 (diff)
downloadfireflix-ee241f175fb9de69f17723a5cf31d0025a3a2fbd.zip
fireflix-ee241f175fb9de69f17723a5cf31d0025a3a2fbd.tar.gz
fireflix-ee241f175fb9de69f17723a5cf31d0025a3a2fbd.tar.bz2
removing linebreaks from generated html
git-svn-id: http://svn.klever.net/kin/fireflix/trunk@217 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--content/generated-content.js4
-rw-r--r--content/generated-content.xul1
-rw-r--r--locale/en-US/fireflix.dtd1
3 files changed, 6 insertions, 0 deletions
diff --git a/content/generated-content.js b/content/generated-content.js
index 0ad08bb..f9addd6 100644
--- a/content/generated-content.js
+++ b/content/generated-content.js
@@ -4,14 +4,18 @@ var generated = {
init: function() {
this.fireflix = window.arguments[0];
this.data = window.arguments[1];
this.databox = document.getElementById('data');
this.databox.value = this.data;
this.databox.select();
},
copy: function() {
var ch = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.getService(Components.interfaces.nsIClipboardHelper);
ch.copyString(this.data);
+ },
+ nolf: function() {
+ this.databox.value = this.data.replace(/[\r\n]/,'');
+ document.getElementById('nolf').disabled = true;
}
};
diff --git a/content/generated-content.xul b/content/generated-content.xul
index 2a91efa..fd508c2 100644
--- a/content/generated-content.xul
+++ b/content/generated-content.xul
@@ -6,15 +6,16 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="generated_content"
buttons="accept"
defaultbutton="accept"
title="&generated.title;"
onload="generated.init()"
>
<script src="generated-content.js" type="application/x-javascript"/>
<vbox class="generated wholething" flex="1">
<textbox flex="1" minheight="300" minwidth="300" id="data" multiline="true" readonly="true" />
+ <button id="nolf" label="&generated.nolf;" oncommand="generated.nolf()" />
<button id="copy" label="&generated.copy;" oncommand="generated.copy()" />
</vbox>
</dialog>
diff --git a/locale/en-US/fireflix.dtd b/locale/en-US/fireflix.dtd
index 0e158c3..46409ed 100644
--- a/locale/en-US/fireflix.dtd
+++ b/locale/en-US/fireflix.dtd
@@ -64,20 +64,21 @@
<!ENTITY panel.upload_props.filename.label "File:">
<!ENTITY panel.upload_props.title.label "Title:">
<!ENTITY panel.upload_props.tags.label "Tags:">
<!ENTITY panel.uploads.upload.label "Upload">
<!ENTITY panel.uploads.clear.label "Clear">
<!ENTITY panel.uploads.remove.label "Remove">
<!ENTITY panel.uploads.add.label "Add">
<!ENTITY panel.uploads.generate_html "Generate HTML">
<!ENTITY generated.title "Fireflix: Generated content">
<!ENTITY generated.copy "copy">
+<!ENTITY generated.nolf "remove linebreaks">
<!ENTITY browser.sidebar.label "Fireflix">
<!ENTITY browser.sidebar.title "Fireflix">
<!ENTITY photosetprops.title "Photoset properties">
<!ENTITY photosetprops.set_title.label "Photoset title:">
<!ENTITY photosetprops.set_desc.label "Photoset description:">