[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qsos-commits] qsos/apps/xuleditor/chrome/content editor.js
From: |
Raphaël Semeteys |
Subject: |
[Qsos-commits] qsos/apps/xuleditor/chrome/content editor.js |
Date: |
Tue, 06 Feb 2007 18:53:03 +0000 |
CVSROOT: /sources/qsos
Module name: qsos
Changes by: Raphaël Semeteys <rsemeteys> 07/02/06 18:53:03
Modified files:
apps/xuleditor/chrome/content: editor.js
Log message:
Preferences manager
Authors integration
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qsos/apps/xuleditor/chrome/content/editor.js?cvsroot=qsos&r1=1.15&r2=1.16
Patches:
Index: editor.js
===================================================================
RCS file: /sources/qsos/qsos/apps/xuleditor/chrome/content/editor.js,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- editor.js 5 Feb 2007 07:26:21 -0000 1.15
+++ editor.js 6 Feb 2007 18:53:03 -0000 1.16
@@ -32,10 +32,6 @@
//Localized strings bundle
var strbundle;
-function init() {
-
-}
-
function changeAuthor(author) {
document.getElementById("f-a-name").value = author.label;
document.getElementById("f-a-email").value = author.value;
@@ -61,15 +57,6 @@
docChanged = "true";
}
-function doOK() {
- //Call window opener callback function
- if (docChanged == "true")
- window.arguments[1](myDoc);
- else
- window.arguments[1]("null");
- return true;
-}
-
//Window initialization after loading
function init() {
strbundle = document.getElementById("properties");
@@ -355,7 +342,11 @@
//////////////////////////
//Saves modifications to a new QSOS XML file
function saveRemote() {
- myDoc.writeremote("http://www.qsos.org/phpviewer/writeremote.php");
+ var prefManager =
Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ var saveremote =
prefManager.getCharPref("extensions.qsos-xuled.saveremote");
+
+ myDoc.writeremote(saveremote);
}
//////////////////////////
@@ -371,6 +362,14 @@
document.getElementById("f-url").value = "";
document.getElementById("f-demourl").value = "";
+ var myList = document.getElementById("f-a-list");
+ while (myList.hasChildNodes()) {
+ myList.removeChild(myList.childNodes[0]);
+ }
+
+ document.getElementById("f-a-name").value = "";
+ document.getElementById("f-a-email").value = "";
+
document.getElementById("t-software").setAttribute("label",
strbundle.getString("softwareLabel"));
document.getElementById("t-c-title").setAttribute("label",
strbundle.getString("criterionLabel"));
@@ -474,6 +473,9 @@
document.getElementById("f-desc").disabled = bool;
document.getElementById("f-url").disabled = bool;
document.getElementById("f-demourl").disabled = bool;
+ document.getElementById("f-a-list").disabled = bool;
+ document.getElementById("f-a-name").disabled = bool;
+ document.getElementById("f-a-email").disabled = bool;
}
//(Un)freezes the "Score" input files (current criteria properties)
- [Qsos-commits] qsos/apps/xuleditor/chrome/content editor.js,
Raphaël Semeteys <=